diff --git a/endpoints/radio.py b/endpoints/radio.py index 608cc44..9dd8453 100644 --- a/endpoints/radio.py +++ b/endpoints/radio.py @@ -106,14 +106,17 @@ class Radio(FastAPI): Get current play queue, up to limit [default: 15k] - **limit**: Number of queue items to return, default 15k """ + queue: list = self.radio_util.active_playlist[0:limit] queue_out: list[dict] = [] - for x, item in enumerate(self.radio_util.active_playlist[0:limit]): + for x, item in enumerate(queue): queue_out.append({ 'pos': x, 'id': item.get('id'), 'uuid': item.get('uuid'), 'artist': item.get('artist'), 'song': item.get('song'), + 'album': item.get('album', 'N/A'), + 'genre': item.get('genre', 'N/A'), 'artistsong': item.get('artistsong'), 'duration': item.get('duration'), }) diff --git a/utils/radio_util.py b/utils/radio_util.py index 09006d6..e6984ed 100644 --- a/utils/radio_util.py +++ b/utils/radio_util.py @@ -194,7 +194,7 @@ class RadioUtil: """ db_query = 'SELECT distinct(artist || " - " || song) AS artistdashsong, id, artist, song, album, genre, file_path, duration FROM tracks\ - WHERE artist LIKE "%chunk! n%" GROUP BY artistdashsong ORDER BY artist ASC, album ASC, id DESC' + WHERE (artist LIKE "%color morale%") AND (NOT song LIKE "%%stripped%%" AND NOT song LIKE "%%live%%" AND NOT song LIKE "%%unzipped%%") GROUP BY artistdashsong ORDER BY RANDOM()' async with sqlite3.connect(self.active_playlist_path, timeout=2) as db_conn: