diff --git a/src/core/library/query/local/AlbumListQuery.cpp b/src/core/library/query/local/AlbumListQuery.cpp index a22861986..4c994164d 100644 --- a/src/core/library/query/local/AlbumListQuery.cpp +++ b/src/core/library/query/local/AlbumListQuery.cpp @@ -58,15 +58,13 @@ static std::map FIELD_TO_FOREIGN_KEY = { static const std::string COLUMNS = "albums.id, " - "albums.name AS album, " + "albums.name as album, " "tracks.album_artist_id, " - "album_artists.name AS album_artist, " - "tracks.visual_artist_id AS artist_id, " - "artists.name AS artist, " + "artists.name as album_artist, " "albums.thumbnail_id "; static const std::string TABLES = - "albums, tracks, artists AS album_artists, artists "; + "albums, tracks, artists "; static const std::string VISIBLE_PREDICATE = " tracks.visible == 1 AND "; @@ -79,8 +77,7 @@ static const std::string CATEGORY_PREDICATE = static const std::string GENERAL_PREDICATE = "albums.id = tracks.album_id AND " - "artists.id = tracks.visual_artist_id AND " - "album_artists.id = tracks.album_artist_id "; + "artists.id = tracks.album_artist_id "; static const std::string ORDER = "albums.name asc "; @@ -152,9 +149,7 @@ bool AlbumListQuery::OnRun(Connection& db) { row->SetValue(Track::ALBUM_ARTIST_ID, stmt.ColumnText(2)); row->SetValue(Track::ALBUM_ARTIST, stmt.ColumnText(3)); - row->SetValue(Track::ARTIST_ID, stmt.ColumnText(4)); - row->SetValue(Track::ARTIST, stmt.ColumnText(5)); - row->SetValue(Track::THUMBNAIL_ID, stmt.ColumnText(6)); + row->SetValue(Track::THUMBNAIL_ID, stmt.ColumnText(4)); result->Add(row); } diff --git a/src/plugins/websocket_remote/Constants.h b/src/plugins/websocket_remote/Constants.h index 989e6b7eb..d7b25b6e4 100644 --- a/src/plugins/websocket_remote/Constants.h +++ b/src/plugins/websocket_remote/Constants.h @@ -88,10 +88,8 @@ namespace key { static const std::string album_artist = "album_artist"; static const std::string genre = "genre"; static const std::string thumbnail_id = "thumbnail_id"; - static const std::string visual_genre_id = "visual_genre_id"; - static const std::string genre_id = "genre_id"; - static const std::string artist_id = "artist_id"; - static const std::string visual_artist_id = "visual_artist_id"; + static const std::string genre_id = "visual_genre_id"; + static const std::string artist_id = "visual_artist_id"; static const std::string track_num = "track"; static const std::string album_artist_id = "album_artist_id"; static const std::string album_id = "album_id"; diff --git a/src/plugins/websocket_remote/WebSocketServer.cpp b/src/plugins/websocket_remote/WebSocketServer.cpp index f45e31d50..4577f9023 100644 --- a/src/plugins/websocket_remote/WebSocketServer.cpp +++ b/src/plugins/websocket_remote/WebSocketServer.cpp @@ -713,9 +713,7 @@ void WebSocketServer::RespondWithQueryAlbums(connection_hdl connection, json& re { key::id, album->GetId() }, { key::thumbnail_id, album->GetInt64(key::thumbnail_id.c_str()) }, { key::album_artist_id, album->GetInt64(key::album_artist_id.c_str()) }, - { key::album_artist, GetMetadataString(album, key::album_artist) }, - { key::artist_id, album->GetInt64(key::visual_artist_id.c_str()) }, - { key::artist, GetMetadataString(album, key::artist) }, + { key::album_artist, GetMetadataString(album, key::album_artist) } }); album->Release(); @@ -1110,9 +1108,9 @@ json WebSocketServer::WebSocketServer::ReadTrackMetadata(ITrack* track) { { key::album_artist, GetMetadataString(track, key::album_artist) }, { key::album_artist_id, track->GetInt64(key::album_artist_id.c_str()) }, { key::artist, GetMetadataString(track, key::artist) }, - { key::artist_id, track->GetInt64(key::visual_artist_id.c_str()) }, + { key::artist_id, track->GetInt64(key::artist_id.c_str()) }, { key::genre, GetMetadataString(track, key::genre) }, - { key::genre_id, track->GetInt64(key::visual_genre_id.c_str()) }, + { key::genre_id, track->GetInt64(key::genre_id.c_str()) }, { key::thumbnail_id, track->GetInt64(key::thumbnail_id.c_str()) }, }; }