mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-11 09:40:26 +00:00
Revert "Added support for artist and artistId (in addition to albumArtist,"
This reverts commit 9a8f48665854c7b7bef9c628dacd7aee971e49fa.
This commit is contained in:
parent
6e05c5f728
commit
1f8f40f0a3
@ -58,15 +58,13 @@ static std::map<std::string, std::string> 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);
|
||||
}
|
||||
|
@ -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";
|
||||
|
@ -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()) },
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user