merge the same groups: create id from title

This commit is contained in:
Yuriy Liskov
2025-06-16 19:28:39 +03:00
parent 699630c215
commit 530bc8d686
2 changed files with 3 additions and 2 deletions

View File

@@ -93,11 +93,12 @@ public class VideoGroup {
VideoGroup videoGroup = new VideoGroup();
videoGroup.mSection = section;
videoGroup.mPosition = groupPosition;
videoGroup.mId = videoGroup.hashCode();
videoGroup.mVideos = new ArrayList<>();
videoGroup.mMediaGroup = mediaGroup;
videoGroup.mTitle = mediaGroup != null && mediaGroup.getTitle() != null ?
mediaGroup.getTitle() : section != null ? section.getTitle() : null;
// Fix duplicated rows e.g. Shorts
videoGroup.mId = videoGroup.mTitle != null ? videoGroup.mTitle.hashCode() : videoGroup.hashCode();
if (mediaGroup == null) {
return videoGroup;