From f9132cac57093e13446a1101f574168976f59104 Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Thu, 18 Jan 2024 12:39:48 -0800 Subject: [PATCH] Filter sitemaps properly (#7233) --- packages/discovery-provider/src/queries/get_sitemap.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/discovery-provider/src/queries/get_sitemap.py b/packages/discovery-provider/src/queries/get_sitemap.py index 360102666a2..5458b33406e 100644 --- a/packages/discovery-provider/src/queries/get_sitemap.py +++ b/packages/discovery-provider/src/queries/get_sitemap.py @@ -110,6 +110,8 @@ def get_max_track_count(session: Session) -> int: .filter( Track.is_current == True, Track.stem_of == None, + Track.is_unlisted == False, + Track.is_scheduled_release == False, Track.is_available == True, User.is_current == True, TrackRoute.is_current == True, @@ -201,6 +203,8 @@ def get_track_slugs(session: Session, limit: int, offset: int): Track.is_current == True, Track.stem_of == None, Track.is_available == True, + Track.is_unlisted == False, + Track.is_scheduled_release == False, User.is_current == True, TrackRoute.is_current == True, )