From 5022500b307e746f2ff0426b07c4e776873c880a Mon Sep 17 00:00:00 2001 From: sentriz Date: Sat, 11 Nov 2023 12:32:33 +0000 Subject: [PATCH] fix(subsonic): return empty opensubsonic fields https://github.com/sentriz/gonic/pull/397#issuecomment-1806794844 --- scanner/scanner.go | 2 +- server/ctrlsubsonic/spec/spec.go | 18 +-- .../testdata/test_get_album_list_alpha_artist | 18 +++ .../testdata/test_get_album_list_alpha_name | 18 +++ .../testdata/test_get_album_list_newest | 18 +++ .../testdata/test_get_album_list_random | 92 +++++++++------ .../testdata/test_get_album_list_two_random | 106 +++++++++--------- .../testdata/test_get_album_without_cover | 3 + .../test_get_music_directory_with_tracks | 9 ++ .../test_get_music_directory_without_tracks | 15 +++ .../testdata/test_search_two_q_alb | 45 ++++++++ .../testdata/test_search_two_q_tra | 60 ++++++++++ 12 files changed, 304 insertions(+), 100 deletions(-) diff --git a/scanner/scanner.go b/scanner/scanner.go index e405a5a5..a5af35a1 100644 --- a/scanner/scanner.go +++ b/scanner/scanner.go @@ -440,7 +440,7 @@ func populateTrack(tx *db.DB, album *db.Album, track *db.Track, trags tagcommon. track.TagTitle = trags.Title() track.TagTitleUDec = decoded(trags.Title()) - track.TagTrackArtist = trags.Artist() + track.TagTrackArtist = tagcommon.MustArtist(trags) track.TagTrackNumber = trags.TrackNumber() track.TagDiscNumber = trags.DiscNumber() track.TagBrainzID = trags.BrainzID() diff --git a/server/ctrlsubsonic/spec/spec.go b/server/ctrlsubsonic/spec/spec.go index 9ed8677d..cd514757 100644 --- a/server/ctrlsubsonic/spec/spec.go +++ b/server/ctrlsubsonic/spec/spec.go @@ -127,10 +127,10 @@ type Album struct { // legacy or single tag mode ArtistID *specid.ID `xml:"artistId,attr,omitempty" json:"artistId,omitempty"` - Artist string `xml:"artist,attr,omitempty" json:"artist,omitempty"` + Artist string `xml:"artist,attr" json:"artist"` - Artists []*ArtistRef `xml:"artists,omitempty" json:"artists,omitempty"` - DisplayArtist string `xml:"diplayArtist,attr,omitempty" json:"displayArtist,omitempty"` + Artists []*ArtistRef `xml:"artists" json:"artists"` + DisplayArtist string `xml:"diplayArtist,attr" json:"displayArtist"` // folder stuff Title string `xml:"title,attr,omitempty" json:"title"` @@ -173,14 +173,14 @@ type TrackChild struct { AlbumID *specid.ID `xml:"albumId,attr,omitempty" json:"albumId,omitempty"` // legacy or single tag mode - Artist string `xml:"artist,attr,omitempty" json:"artist,omitempty"` - ArtistID *specid.ID `xml:"artistId,attr,omitempty" json:"artistId,omitempty"` + Artist string `xml:"artist,attr" json:"artist"` + ArtistID *specid.ID `xml:"artistId,attr,omitempty" json:"artistId,omitempty"` - Artists []*ArtistRef `xml:"artists,omitempty" json:"artists,omitempty"` - DisplayArtist string `xml:"diplayArtist,attr,omitempty" json:"displayArtist,omitempty"` + Artists []*ArtistRef `xml:"artists" json:"artists"` + DisplayArtist string `xml:"diplayArtist,attr" json:"displayArtist"` - AlbumArtists []*ArtistRef `xml:"albumArtists,omitempty" json:"albumArtists,omitempty"` - AlbumDisplayArtist string `xml:"diplayAlbumArtist,attr,omitempty" json:"displayAlbumArtist,omitempty"` + AlbumArtists []*ArtistRef `xml:"albumArtists" json:"albumArtists"` + AlbumDisplayArtist string `xml:"diplayAlbumArtist,attr" json:"displayAlbumArtist"` Bitrate int `xml:"bitRate,attr,omitempty" json:"bitRate,omitempty"` ContentType string `xml:"contentType,attr,omitempty" json:"contentType,omitempty"` diff --git a/server/ctrlsubsonic/testdata/test_get_album_list_alpha_artist b/server/ctrlsubsonic/testdata/test_get_album_list_alpha_artist index ac0fcaab..81f84c6a 100644 --- a/server/ctrlsubsonic/testdata/test_get_album_list_alpha_artist +++ b/server/ctrlsubsonic/testdata/test_get_album_list_alpha_artist @@ -11,6 +11,8 @@ "id": "al-3", "created": "2019-11-30T00:00:00Z", "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", "parent": "al-2", @@ -24,6 +26,8 @@ "id": "al-4", "created": "2019-11-30T00:00:00Z", "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", "parent": "al-2", @@ -37,6 +41,8 @@ "id": "al-5", "created": "2019-11-30T00:00:00Z", "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", "parent": "al-2", @@ -50,6 +56,8 @@ "id": "al-7", "created": "2019-11-30T00:00:00Z", "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", "parent": "al-6", @@ -63,6 +71,8 @@ "id": "al-8", "created": "2019-11-30T00:00:00Z", "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", "parent": "al-6", @@ -76,6 +86,8 @@ "id": "al-9", "created": "2019-11-30T00:00:00Z", "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", "parent": "al-6", @@ -89,6 +101,8 @@ "id": "al-11", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", "parent": "al-10", @@ -102,6 +116,8 @@ "id": "al-12", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", "parent": "al-10", @@ -115,6 +131,8 @@ "id": "al-13", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", "parent": "al-10", diff --git a/server/ctrlsubsonic/testdata/test_get_album_list_alpha_name b/server/ctrlsubsonic/testdata/test_get_album_list_alpha_name index 42040aee..0151da9c 100644 --- a/server/ctrlsubsonic/testdata/test_get_album_list_alpha_name +++ b/server/ctrlsubsonic/testdata/test_get_album_list_alpha_name @@ -11,6 +11,8 @@ "id": "al-3", "created": "2019-11-30T00:00:00Z", "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", "parent": "al-2", @@ -24,6 +26,8 @@ "id": "al-7", "created": "2019-11-30T00:00:00Z", "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", "parent": "al-6", @@ -37,6 +41,8 @@ "id": "al-11", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", "parent": "al-10", @@ -50,6 +56,8 @@ "id": "al-4", "created": "2019-11-30T00:00:00Z", "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", "parent": "al-2", @@ -63,6 +71,8 @@ "id": "al-8", "created": "2019-11-30T00:00:00Z", "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", "parent": "al-6", @@ -76,6 +86,8 @@ "id": "al-12", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", "parent": "al-10", @@ -89,6 +101,8 @@ "id": "al-5", "created": "2019-11-30T00:00:00Z", "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", "parent": "al-2", @@ -102,6 +116,8 @@ "id": "al-9", "created": "2019-11-30T00:00:00Z", "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", "parent": "al-6", @@ -115,6 +131,8 @@ "id": "al-13", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", "parent": "al-10", diff --git a/server/ctrlsubsonic/testdata/test_get_album_list_newest b/server/ctrlsubsonic/testdata/test_get_album_list_newest index ac0fcaab..81f84c6a 100644 --- a/server/ctrlsubsonic/testdata/test_get_album_list_newest +++ b/server/ctrlsubsonic/testdata/test_get_album_list_newest @@ -11,6 +11,8 @@ "id": "al-3", "created": "2019-11-30T00:00:00Z", "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", "parent": "al-2", @@ -24,6 +26,8 @@ "id": "al-4", "created": "2019-11-30T00:00:00Z", "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", "parent": "al-2", @@ -37,6 +41,8 @@ "id": "al-5", "created": "2019-11-30T00:00:00Z", "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", "parent": "al-2", @@ -50,6 +56,8 @@ "id": "al-7", "created": "2019-11-30T00:00:00Z", "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", "parent": "al-6", @@ -63,6 +71,8 @@ "id": "al-8", "created": "2019-11-30T00:00:00Z", "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", "parent": "al-6", @@ -76,6 +86,8 @@ "id": "al-9", "created": "2019-11-30T00:00:00Z", "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", "parent": "al-6", @@ -89,6 +101,8 @@ "id": "al-11", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", "parent": "al-10", @@ -102,6 +116,8 @@ "id": "al-12", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", "parent": "al-10", @@ -115,6 +131,8 @@ "id": "al-13", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", "parent": "al-10", diff --git a/server/ctrlsubsonic/testdata/test_get_album_list_random b/server/ctrlsubsonic/testdata/test_get_album_list_random index 4595ab2b..99b12dc5 100644 --- a/server/ctrlsubsonic/testdata/test_get_album_list_random +++ b/server/ctrlsubsonic/testdata/test_get_album_list_random @@ -11,6 +11,8 @@ "id": "al-4", "created": "2019-11-30T00:00:00Z", "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", "parent": "al-2", @@ -21,53 +23,46 @@ "duration": 300 }, { - "id": "al-11", - "created": "2019-11-30T00:00:00Z", - "artist": "artist-2", - "title": "album-0", - "album": "album-0", - "parent": "al-10", - "isDir": true, - "coverArt": "al-11", - "name": "album-0", - "songCount": 3, - "duration": 300 - }, - { - "id": "al-7", + "id": "al-3", "created": "2019-11-30T00:00:00Z", - "artist": "artist-1", + "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", - "parent": "al-6", + "parent": "al-2", "isDir": true, - "coverArt": "al-7", + "coverArt": "al-3", "name": "album-0", "songCount": 3, "duration": 300 }, { - "id": "al-8", + "id": "al-12", "created": "2019-11-30T00:00:00Z", - "artist": "artist-1", + "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", - "parent": "al-6", + "parent": "al-10", "isDir": true, - "coverArt": "al-8", + "coverArt": "al-12", "name": "album-1", "songCount": 3, "duration": 300 }, { - "id": "al-9", + "id": "al-5", "created": "2019-11-30T00:00:00Z", - "artist": "artist-1", + "artist": "artist-0", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", - "parent": "al-6", + "parent": "al-2", "isDir": true, - "coverArt": "al-9", + "coverArt": "al-5", "name": "album-2", "songCount": 3, "duration": 300 @@ -76,6 +71,8 @@ "id": "al-13", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", "parent": "al-10", @@ -86,40 +83,61 @@ "duration": 300 }, { - "id": "al-3", + "id": "al-11", "created": "2019-11-30T00:00:00Z", - "artist": "artist-0", + "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", - "parent": "al-2", + "parent": "al-10", "isDir": true, - "coverArt": "al-3", + "coverArt": "al-11", "name": "album-0", "songCount": 3, "duration": 300 }, { - "id": "al-5", + "id": "al-7", "created": "2019-11-30T00:00:00Z", - "artist": "artist-0", + "artist": "artist-1", + "artists": null, + "displayArtist": "", + "title": "album-0", + "album": "album-0", + "parent": "al-6", + "isDir": true, + "coverArt": "al-7", + "name": "album-0", + "songCount": 3, + "duration": 300 + }, + { + "id": "al-9", + "created": "2019-11-30T00:00:00Z", + "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-2", "album": "album-2", - "parent": "al-2", + "parent": "al-6", "isDir": true, - "coverArt": "al-5", + "coverArt": "al-9", "name": "album-2", "songCount": 3, "duration": 300 }, { - "id": "al-12", + "id": "al-8", "created": "2019-11-30T00:00:00Z", - "artist": "artist-2", + "artist": "artist-1", + "artists": null, + "displayArtist": "", "title": "album-1", "album": "album-1", - "parent": "al-10", + "parent": "al-6", "isDir": true, - "coverArt": "al-12", + "coverArt": "al-8", "name": "album-1", "songCount": 3, "duration": 300 diff --git a/server/ctrlsubsonic/testdata/test_get_album_list_two_random b/server/ctrlsubsonic/testdata/test_get_album_list_two_random index 360ed6d8..50cab380 100644 --- a/server/ctrlsubsonic/testdata/test_get_album_list_two_random +++ b/server/ctrlsubsonic/testdata/test_get_album_list_two_random @@ -8,61 +8,46 @@ "albumList2": { "album": [ { - "id": "al-5", - "created": "2019-11-30T00:00:00Z", - "artistId": "ar-1", - "artist": "artist-0", - "artists": [{ "id": "ar-1", "name": "artist-0" }], - "displayArtist": "artist-0", - "title": "album-2", - "album": "album-2", - "coverArt": "al-5", - "name": "album-2", - "songCount": 3, - "duration": 300, - "year": 2021 - }, - { - "id": "al-4", + "id": "al-12", "created": "2019-11-30T00:00:00Z", - "artistId": "ar-1", - "artist": "artist-0", - "artists": [{ "id": "ar-1", "name": "artist-0" }], - "displayArtist": "artist-0", + "artistId": "ar-3", + "artist": "artist-2", + "artists": [{ "id": "ar-3", "name": "artist-2" }], + "displayArtist": "artist-2", "title": "album-1", "album": "album-1", - "coverArt": "al-4", + "coverArt": "al-12", "name": "album-1", "songCount": 3, "duration": 300, "year": 2021 }, { - "id": "al-7", + "id": "al-11", "created": "2019-11-30T00:00:00Z", - "artistId": "ar-2", - "artist": "artist-1", - "artists": [{ "id": "ar-2", "name": "artist-1" }], - "displayArtist": "artist-1", + "artistId": "ar-3", + "artist": "artist-2", + "artists": [{ "id": "ar-3", "name": "artist-2" }], + "displayArtist": "artist-2", "title": "album-0", "album": "album-0", - "coverArt": "al-7", + "coverArt": "al-11", "name": "album-0", "songCount": 3, "duration": 300, "year": 2021 }, { - "id": "al-12", + "id": "al-13", "created": "2019-11-30T00:00:00Z", "artistId": "ar-3", "artist": "artist-2", "artists": [{ "id": "ar-3", "name": "artist-2" }], "displayArtist": "artist-2", - "title": "album-1", - "album": "album-1", - "coverArt": "al-12", - "name": "album-1", + "title": "album-2", + "album": "album-2", + "coverArt": "al-13", + "name": "album-2", "songCount": 3, "duration": 300, "year": 2021 @@ -83,35 +68,50 @@ "year": 2021 }, { - "id": "al-8", + "id": "al-4", "created": "2019-11-30T00:00:00Z", - "artistId": "ar-2", - "artist": "artist-1", - "artists": [{ "id": "ar-2", "name": "artist-1" }], - "displayArtist": "artist-1", + "artistId": "ar-1", + "artist": "artist-0", + "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "artist-0", "title": "album-1", "album": "album-1", - "coverArt": "al-8", + "coverArt": "al-4", "name": "album-1", "songCount": 3, "duration": 300, "year": 2021 }, { - "id": "al-11", + "id": "al-7", "created": "2019-11-30T00:00:00Z", - "artistId": "ar-3", - "artist": "artist-2", - "artists": [{ "id": "ar-3", "name": "artist-2" }], - "displayArtist": "artist-2", + "artistId": "ar-2", + "artist": "artist-1", + "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "artist-1", "title": "album-0", "album": "album-0", - "coverArt": "al-11", + "coverArt": "al-7", "name": "album-0", "songCount": 3, "duration": 300, "year": 2021 }, + { + "id": "al-5", + "created": "2019-11-30T00:00:00Z", + "artistId": "ar-1", + "artist": "artist-0", + "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "artist-0", + "title": "album-2", + "album": "album-2", + "coverArt": "al-5", + "name": "album-2", + "songCount": 3, + "duration": 300, + "year": 2021 + }, { "id": "al-3", "created": "2019-11-30T00:00:00Z", @@ -128,16 +128,16 @@ "year": 2021 }, { - "id": "al-13", + "id": "al-8", "created": "2019-11-30T00:00:00Z", - "artistId": "ar-3", - "artist": "artist-2", - "artists": [{ "id": "ar-3", "name": "artist-2" }], - "displayArtist": "artist-2", - "title": "album-2", - "album": "album-2", - "coverArt": "al-13", - "name": "album-2", + "artistId": "ar-2", + "artist": "artist-1", + "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "artist-1", + "title": "album-1", + "album": "album-1", + "coverArt": "al-8", + "name": "album-1", "songCount": 3, "duration": 300, "year": 2021 diff --git a/server/ctrlsubsonic/testdata/test_get_album_without_cover b/server/ctrlsubsonic/testdata/test_get_album_without_cover index 6f85d4b5..33bf2b22 100644 --- a/server/ctrlsubsonic/testdata/test_get_album_without_cover +++ b/server/ctrlsubsonic/testdata/test_get_album_without_cover @@ -8,6 +8,9 @@ "album": { "id": "al-2", "created": "2019-11-30T00:00:00Z", + "artist": "", + "artists": null, + "displayArtist": "", "title": "", "album": "", "name": "", diff --git a/server/ctrlsubsonic/testdata/test_get_music_directory_with_tracks b/server/ctrlsubsonic/testdata/test_get_music_directory_with_tracks index ddd27204..745da5f5 100644 --- a/server/ctrlsubsonic/testdata/test_get_music_directory_with_tracks +++ b/server/ctrlsubsonic/testdata/test_get_music_directory_with_tracks @@ -15,6 +15,9 @@ "album": "album-0", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-3", @@ -36,6 +39,9 @@ "album": "album-0", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-3", @@ -57,6 +63,9 @@ "album": "album-0", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-3", diff --git a/server/ctrlsubsonic/testdata/test_get_music_directory_without_tracks b/server/ctrlsubsonic/testdata/test_get_music_directory_without_tracks index 050e23bf..f794ed0f 100644 --- a/server/ctrlsubsonic/testdata/test_get_music_directory_without_tracks +++ b/server/ctrlsubsonic/testdata/test_get_music_directory_without_tracks @@ -12,6 +12,11 @@ "child": [ { "id": "al-3", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-3", "created": "2019-11-30T00:00:00Z", "isDir": true, @@ -21,6 +26,11 @@ }, { "id": "al-4", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-4", "created": "2019-11-30T00:00:00Z", "isDir": true, @@ -30,6 +40,11 @@ }, { "id": "al-5", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-5", "created": "2019-11-30T00:00:00Z", "isDir": true, diff --git a/server/ctrlsubsonic/testdata/test_search_two_q_alb b/server/ctrlsubsonic/testdata/test_search_two_q_alb index 4703917f..36766a4a 100644 --- a/server/ctrlsubsonic/testdata/test_search_two_q_alb +++ b/server/ctrlsubsonic/testdata/test_search_two_q_alb @@ -9,6 +9,11 @@ "album": [ { "id": "al-3", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-3", "created": "2019-11-30T00:00:00Z", "isDir": true, @@ -18,6 +23,11 @@ }, { "id": "al-4", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-4", "created": "2019-11-30T00:00:00Z", "isDir": true, @@ -27,6 +37,11 @@ }, { "id": "al-5", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-5", "created": "2019-11-30T00:00:00Z", "isDir": true, @@ -36,6 +51,11 @@ }, { "id": "al-7", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-7", "created": "2019-11-30T00:00:00Z", "isDir": true, @@ -45,6 +65,11 @@ }, { "id": "al-8", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-8", "created": "2019-11-30T00:00:00Z", "isDir": true, @@ -54,6 +79,11 @@ }, { "id": "al-9", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-9", "created": "2019-11-30T00:00:00Z", "isDir": true, @@ -63,6 +93,11 @@ }, { "id": "al-11", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-11", "created": "2019-11-30T00:00:00Z", "isDir": true, @@ -72,6 +107,11 @@ }, { "id": "al-12", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-12", "created": "2019-11-30T00:00:00Z", "isDir": true, @@ -81,6 +121,11 @@ }, { "id": "al-13", + "artist": "", + "artists": null, + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "coverArt": "al-13", "created": "2019-11-30T00:00:00Z", "isDir": true, diff --git a/server/ctrlsubsonic/testdata/test_search_two_q_tra b/server/ctrlsubsonic/testdata/test_search_two_q_tra index 18e27d89..0d160624 100644 --- a/server/ctrlsubsonic/testdata/test_search_two_q_tra +++ b/server/ctrlsubsonic/testdata/test_search_two_q_tra @@ -12,6 +12,9 @@ "album": "album-0", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-3", @@ -33,6 +36,9 @@ "album": "album-0", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-3", @@ -54,6 +60,9 @@ "album": "album-0", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-3", @@ -75,6 +84,9 @@ "album": "album-1", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-4", @@ -96,6 +108,9 @@ "album": "album-1", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-4", @@ -117,6 +132,9 @@ "album": "album-1", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-4", @@ -138,6 +156,9 @@ "album": "album-2", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-5", @@ -159,6 +180,9 @@ "album": "album-2", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-5", @@ -180,6 +204,9 @@ "album": "album-2", "artist": "artist-0", "artists": [{ "id": "ar-1", "name": "artist-0" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-5", @@ -201,6 +228,9 @@ "album": "album-0", "artist": "artist-1", "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-7", @@ -222,6 +252,9 @@ "album": "album-0", "artist": "artist-1", "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-7", @@ -243,6 +276,9 @@ "album": "album-0", "artist": "artist-1", "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-7", @@ -264,6 +300,9 @@ "album": "album-1", "artist": "artist-1", "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-8", @@ -285,6 +324,9 @@ "album": "album-1", "artist": "artist-1", "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-8", @@ -306,6 +348,9 @@ "album": "album-1", "artist": "artist-1", "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-8", @@ -327,6 +372,9 @@ "album": "album-2", "artist": "artist-1", "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-9", @@ -348,6 +396,9 @@ "album": "album-2", "artist": "artist-1", "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-9", @@ -369,6 +420,9 @@ "album": "album-2", "artist": "artist-1", "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-9", @@ -390,6 +444,9 @@ "album": "album-0", "artist": "artist-2", "artists": [{ "id": "ar-3", "name": "artist-2" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-11", @@ -411,6 +468,9 @@ "album": "album-0", "artist": "artist-2", "artists": [{ "id": "ar-3", "name": "artist-2" }], + "displayArtist": "", + "albumArtists": null, + "displayAlbumArtist": "", "bitRate": 100, "contentType": "audio/flac", "coverArt": "al-11",