Skip to content

Commit

Permalink
Fix hiding empty playlists.
Browse files Browse the repository at this point in the history
  • Loading branch information
Komodo5197 committed May 20, 2024
1 parent 7f75555 commit 11f901f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/services/downloads_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1368,9 +1368,12 @@ class DownloadsService {
.optional(baseTypeFilter != null,
(q) => q.baseItemTypeEqualTo(baseTypeFilter!))
// If allPlaylists is info downloaded, we may have info for empty
// playlists. These should not be returned.
.optional(baseTypeFilter == BaseItemDtoType.playlist,
(q) => q.info((q) => q.requiredByIsNotEmpty()))
// playlists. We should only return playlists with at least 1 required
// song in them.
.optional(
baseTypeFilter == BaseItemDtoType.playlist,
(q) => q.info((q) =>
q.typeEqualTo(DownloadItemType.song).requiredByIsNotEmpty()))
.optional(
relatedTo != null,
(q) => q.infoFor((q) => q.info((q) => q.isarIdEqualTo(
Expand Down

0 comments on commit 11f901f

Please sign in to comment.