|
|
|
|
@ -6054,6 +6054,8 @@ class MusicDatabase:
|
|
|
|
|
a.audiodb_id,
|
|
|
|
|
a.lastfm_url,
|
|
|
|
|
a.genius_url,
|
|
|
|
|
a.tidal_id,
|
|
|
|
|
a.qobuz_id,
|
|
|
|
|
COUNT(DISTINCT al.id) as album_count,
|
|
|
|
|
COUNT(DISTINCT t.id) as track_count
|
|
|
|
|
FROM artists a
|
|
|
|
|
@ -6064,7 +6066,7 @@ class MusicDatabase:
|
|
|
|
|
WHERE {where_clause}
|
|
|
|
|
AND a.id = (SELECT MIN(a2.id) FROM artists a2
|
|
|
|
|
WHERE a2.name = a.name AND a2.server_source = a.server_source)
|
|
|
|
|
GROUP BY a.id, a.name, a.thumb_url, a.genres, a.musicbrainz_id, a.spotify_artist_id, a.itunes_artist_id, a.deezer_id, a.audiodb_id, a.lastfm_url, a.genius_url
|
|
|
|
|
GROUP BY a.id, a.name, a.thumb_url, a.genres, a.musicbrainz_id, a.spotify_artist_id, a.itunes_artist_id, a.deezer_id, a.audiodb_id, a.lastfm_url, a.genius_url, a.tidal_id, a.qobuz_id
|
|
|
|
|
ORDER BY a.name COLLATE NOCASE
|
|
|
|
|
LIMIT ? OFFSET ?
|
|
|
|
|
"""
|
|
|
|
|
@ -6114,6 +6116,8 @@ class MusicDatabase:
|
|
|
|
|
'audiodb_id': row['audiodb_id'],
|
|
|
|
|
'lastfm_url': row['lastfm_url'],
|
|
|
|
|
'genius_url': row['genius_url'],
|
|
|
|
|
'tidal_id': row['tidal_id'],
|
|
|
|
|
'qobuz_id': row['qobuz_id'],
|
|
|
|
|
'album_count': row['album_count'] or 0,
|
|
|
|
|
'track_count': row['track_count'] or 0,
|
|
|
|
|
'is_watched': bool(is_watched)
|
|
|
|
|
@ -6171,7 +6175,8 @@ class MusicDatabase:
|
|
|
|
|
SELECT
|
|
|
|
|
id, name, thumb_url, genres, server_source,
|
|
|
|
|
musicbrainz_id, deezer_id, audiodb_id,
|
|
|
|
|
spotify_artist_id, itunes_artist_id, lastfm_url, genius_url
|
|
|
|
|
spotify_artist_id, itunes_artist_id, lastfm_url, genius_url,
|
|
|
|
|
tidal_id, qobuz_id
|
|
|
|
|
FROM artists
|
|
|
|
|
WHERE id = ?
|
|
|
|
|
""", (artist_id,))
|
|
|
|
|
@ -6324,6 +6329,8 @@ class MusicDatabase:
|
|
|
|
|
'itunes_artist_id': artist_row['itunes_artist_id'],
|
|
|
|
|
'lastfm_url': artist_row['lastfm_url'],
|
|
|
|
|
'genius_url': artist_row['genius_url'],
|
|
|
|
|
'tidal_id': artist_row['tidal_id'],
|
|
|
|
|
'qobuz_id': artist_row['qobuz_id'],
|
|
|
|
|
'album_count': album_count,
|
|
|
|
|
'track_count': track_count
|
|
|
|
|
},
|
|
|
|
|
|