implemented the source table of the db to the database querry
This commit is contained in:
parent
d6cb5d706b
commit
0ccb3f244c
@ -131,7 +131,8 @@ class Database:
|
||||
"track.release_id == release_.id",
|
||||
"release_group.id == release_.release_group_id",
|
||||
"artist_track.artist_id == artist.id",
|
||||
"artist_track.track_id == track.id"
|
||||
"artist_track.track_id == track.id",
|
||||
"source.track_id == track.id"
|
||||
]
|
||||
where_args.extend(custom_where)
|
||||
|
||||
@ -147,6 +148,15 @@ SELECT DISTINCT
|
||||
)
|
||||
)
|
||||
),
|
||||
'source', json_group_array(
|
||||
(
|
||||
SELECT DISTINCT json_object(
|
||||
'src', source.src,
|
||||
'url', source.url,
|
||||
'valid', source.valid
|
||||
)
|
||||
)
|
||||
),
|
||||
'id', track.id,
|
||||
'tracknumber', track.tracknumber,
|
||||
'titlesort ', track.tracknumber,
|
||||
@ -174,7 +184,7 @@ SELECT DISTINCT
|
||||
'src', track.src,
|
||||
'lyrics', track.lyrics
|
||||
)
|
||||
FROM track, release_, release_group,artist, artist_track
|
||||
FROM track, release_, release_group, artist, artist_track, source
|
||||
WHERE
|
||||
{where_arg}
|
||||
GROUP BY track.id;
|
||||
|
Loading…
Reference in New Issue
Block a user