add fields to returned queue dict (radio_get_queue)
This commit is contained in:
parent
6ef38f17a7
commit
c9d0edf77d
@ -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'),
|
||||
})
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user