Skip to content

Commit

Permalink
include secondary genres in genres view
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Apr 29, 2024
1 parent c5e9930 commit 3863908
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions rose/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -1843,12 +1843,19 @@ def list_releases_delete_this(
genres = [genre_filter]
genres.extend(TRANSIENT_CHILD_GENRES.get(genre_filter, []))
query += f"""
AND EXISTS (
SELECT * FROM releases_genres
WHERE release_id = id AND genre IN ({",".join(["?"]*len(genres))})
AND (
EXISTS (
SELECT * FROM releases_genres
WHERE release_id = id AND genre IN ({",".join(["?"]*len(genres))})
)
OR EXISTS (
SELECT * FROM releases_secondary_genres
WHERE release_id = id AND genre IN ({",".join(["?"]*len(genres))})
)
)
"""
args.extend(genres)
args.extend(genres)
if label_filter:
query += """
AND EXISTS (
Expand Down

0 comments on commit 3863908

Please sign in to comment.