From 5022500b307e746f2ff0426b07c4e776873c880a Mon Sep 17 00:00:00 2001 From: sentriz Date: Sat, 11 Nov 2023 12:32:33 +0000 Subject: [PATCH 1/3] 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 | 130 +++++++++-------- .../testdata/test_get_album_list_two_random | 132 +++++++++--------- .../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, 336 insertions(+), 132 deletions(-) diff --git a/scanner/scanner.go b/scanner/scanner.go index e405a5a..a5af35a 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 9ed8677..cd51475 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 ac0fcaa..81f84c6 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 42040ae..0151da9 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 ac0fcaa..81f84c6 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 4595ab2..99b12dc 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", @@ -20,10 +22,72 @@ "songCount": 3, "duration": 300 }, + { + "id": "al-3", + "created": "2019-11-30T00:00:00Z", + "artist": "artist-0", + "artists": null, + "displayArtist": "", + "title": "album-0", + "album": "album-0", + "parent": "al-2", + "isDir": true, + "coverArt": "al-3", + "name": "album-0", + "songCount": 3, + "duration": 300 + }, + { + "id": "al-12", + "created": "2019-11-30T00:00:00Z", + "artist": "artist-2", + "artists": null, + "displayArtist": "", + "title": "album-1", + "album": "album-1", + "parent": "al-10", + "isDir": true, + "coverArt": "al-12", + "name": "album-1", + "songCount": 3, + "duration": 300 + }, + { + "id": "al-5", + "created": "2019-11-30T00:00:00Z", + "artist": "artist-0", + "artists": null, + "displayArtist": "", + "title": "album-2", + "album": "album-2", + "parent": "al-2", + "isDir": true, + "coverArt": "al-5", + "name": "album-2", + "songCount": 3, + "duration": 300 + }, + { + "id": "al-13", + "created": "2019-11-30T00:00:00Z", + "artist": "artist-2", + "artists": null, + "displayArtist": "", + "title": "album-2", + "album": "album-2", + "parent": "al-10", + "isDir": true, + "coverArt": "al-13", + "name": "album-2", + "songCount": 3, + "duration": 300 + }, { "id": "al-11", "created": "2019-11-30T00:00:00Z", "artist": "artist-2", + "artists": null, + "displayArtist": "", "title": "album-0", "album": "album-0", "parent": "al-10", @@ -37,6 +101,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", @@ -46,23 +112,12 @@ "songCount": 3, "duration": 300 }, - { - "id": "al-8", - "created": "2019-11-30T00:00:00Z", - "artist": "artist-1", - "title": "album-1", - "album": "album-1", - "parent": "al-6", - "isDir": true, - "coverArt": "al-8", - "name": "album-1", - "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-6", @@ -73,53 +128,16 @@ "duration": 300 }, { - "id": "al-13", + "id": "al-8", "created": "2019-11-30T00:00:00Z", - "artist": "artist-2", - "title": "album-2", - "album": "album-2", - "parent": "al-10", - "isDir": true, - "coverArt": "al-13", - "name": "album-2", - "songCount": 3, - "duration": 300 - }, - { - "id": "al-3", - "created": "2019-11-30T00:00:00Z", - "artist": "artist-0", - "title": "album-0", - "album": "album-0", - "parent": "al-2", - "isDir": true, - "coverArt": "al-3", - "name": "album-0", - "songCount": 3, - "duration": 300 - }, - { - "id": "al-5", - "created": "2019-11-30T00:00:00Z", - "artist": "artist-0", - "title": "album-2", - "album": "album-2", - "parent": "al-2", - "isDir": true, - "coverArt": "al-5", - "name": "album-2", - "songCount": 3, - "duration": 300 - }, - { - "id": "al-12", - "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 360ed6d..50cab38 100644 --- a/server/ctrlsubsonic/testdata/test_get_album_list_two_random +++ b/server/ctrlsubsonic/testdata/test_get_album_list_two_random @@ -8,15 +8,60 @@ "albumList2": { "album": [ { - "id": "al-5", + "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-12", + "name": "album-1", + "songCount": 3, + "duration": 300, + "year": 2021 + }, + { + "id": "al-11", + "created": "2019-11-30T00:00:00Z", + "artistId": "ar-3", + "artist": "artist-2", + "artists": [{ "id": "ar-3", "name": "artist-2" }], + "displayArtist": "artist-2", + "title": "album-0", + "album": "album-0", + "coverArt": "al-11", + "name": "album-0", + "songCount": 3, + "duration": 300, + "year": 2021 + }, + { + "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-2", "album": "album-2", - "coverArt": "al-5", + "coverArt": "al-13", + "name": "album-2", + "songCount": 3, + "duration": 300, + "year": 2021 + }, + { + "id": "al-9", + "created": "2019-11-30T00:00:00Z", + "artistId": "ar-2", + "artist": "artist-1", + "artists": [{ "id": "ar-2", "name": "artist-1" }], + "displayArtist": "artist-1", + "title": "album-2", + "album": "album-2", + "coverArt": "al-9", "name": "album-2", "songCount": 3, "duration": 300, @@ -53,65 +98,20 @@ "year": 2021 }, { - "id": "al-12", + "id": "al-5", "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", - "songCount": 3, - "duration": 300, - "year": 2021 - }, - { - "id": "al-9", - "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-2", "album": "album-2", - "coverArt": "al-9", + "coverArt": "al-5", "name": "album-2", "songCount": 3, "duration": 300, "year": 2021 }, - { - "id": "al-8", - "created": "2019-11-30T00:00:00Z", - "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 - }, - { - "id": "al-11", - "created": "2019-11-30T00:00:00Z", - "artistId": "ar-3", - "artist": "artist-2", - "artists": [{ "id": "ar-3", "name": "artist-2" }], - "displayArtist": "artist-2", - "title": "album-0", - "album": "album-0", - "coverArt": "al-11", - "name": "album-0", - "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 6f85d4b..33bf2b2 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 ddd2720..745da5f 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 050e23b..f794ed0 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 4703917..36766a4 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 18e27d8..0d16062 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", From 2bf62310e76b8a44dfb14983be1d3f777e5c7563 Mon Sep 17 00:00:00 2001 From: sentriz Date: Sat, 11 Nov 2023 12:56:44 +0000 Subject: [PATCH 2/3] initialise slices for browse-by-tag children related https://github.com/sentriz/gonic/pull/397#issuecomment-1806808586 --- server/ctrlsubsonic/spec/construct_by_tags.go | 48 ++++++++++--------- .../testdata/test_get_album_without_cover | 2 +- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/server/ctrlsubsonic/spec/construct_by_tags.go b/server/ctrlsubsonic/spec/construct_by_tags.go index afcd18b..a44d4c7 100644 --- a/server/ctrlsubsonic/spec/construct_by_tags.go +++ b/server/ctrlsubsonic/spec/construct_by_tags.go @@ -9,15 +9,18 @@ import ( func NewAlbumByTags(a *db.Album, artists []*db.Artist) *Album { ret := &Album{ - Created: a.CreatedAt, ID: a.SID(), + Created: a.CreatedAt, + Artists: []*ArtistRef{}, + DisplayArtist: a.TagAlbumArtist, + Title: a.TagTitle, Album: a.TagTitle, Name: a.TagTitle, - Title: a.TagTitle, - Year: a.TagYear, TrackCount: a.ChildCount, Duration: a.Duration, - DisplayArtist: a.TagAlbumArtist, + Genres: []*GenreRef{}, + Year: a.TagYear, + Tracks: []*TrackChild{}, AverageRating: formatRating(a.AverageRating), } if a.Cover != "" { @@ -54,29 +57,29 @@ func NewAlbumByTags(a *db.Album, artists []*db.Artist) *Album { func NewTrackByTags(t *db.Track, album *db.Album) *TrackChild { ret := &TrackChild{ ID: t.SID(), - ContentType: t.MIME(), - Suffix: formatExt(t.Ext()), - ParentID: t.AlbumSID(), - CreatedAt: t.CreatedAt, - Size: t.Size, - Title: t.TagTitle, + Album: album.TagTitle, + AlbumID: album.SID(), Artist: t.TagTrackArtist, + Artists: []*ArtistRef{}, DisplayArtist: t.TagTrackArtist, + AlbumArtists: []*ArtistRef{}, AlbumDisplayArtist: album.TagAlbumArtist, + Bitrate: t.Bitrate, + ContentType: t.MIME(), + CreatedAt: t.CreatedAt, + Duration: t.Length, + Genres: []*GenreRef{}, + ParentID: t.AlbumSID(), + Path: filepath.Join(album.LeftPath, album.RightPath, t.Filename), + Size: t.Size, + Suffix: formatExt(t.Ext()), + Title: t.TagTitle, TrackNumber: t.TagTrackNumber, DiscNumber: t.TagDiscNumber, - Path: filepath.Join( - album.LeftPath, - album.RightPath, - t.Filename, - ), - Album: album.TagTitle, - AlbumID: album.SID(), - Duration: t.Length, - Bitrate: t.Bitrate, - Type: "music", - Year: album.TagYear, - AverageRating: formatRating(t.AverageRating), + Type: "music", + Year: album.TagYear, + AverageRating: formatRating(t.AverageRating), + TranscodeMeta: TranscodeMeta{}, } if album.Cover != "" { ret.CoverID = album.SID() @@ -113,6 +116,7 @@ func NewArtistByTags(a *db.Artist) *Artist { ID: a.SID(), Name: a.Name, AlbumCount: a.AlbumCount, + Albums: []*Album{}, AverageRating: formatRating(a.AverageRating), } if a.Info != nil && a.Info.ImageURL != "" { diff --git a/server/ctrlsubsonic/testdata/test_get_album_without_cover b/server/ctrlsubsonic/testdata/test_get_album_without_cover index 33bf2b2..069d3d6 100644 --- a/server/ctrlsubsonic/testdata/test_get_album_without_cover +++ b/server/ctrlsubsonic/testdata/test_get_album_without_cover @@ -9,7 +9,7 @@ "id": "al-2", "created": "2019-11-30T00:00:00Z", "artist": "", - "artists": null, + "artists": [], "displayArtist": "", "title": "", "album": "", From 1481f03534c5792a15069528bb8648fb20d9cc78 Mon Sep 17 00:00:00 2001 From: sentriz Date: Sat, 11 Nov 2023 13:09:39 +0000 Subject: [PATCH 3/3] chore: upgrade deps related #408 --- go.mod | 17 +++++++++-------- go.sum | 59 ++++++++++++++++++++++------------------------------------ 2 files changed, 31 insertions(+), 45 deletions(-) diff --git a/go.mod b/go.mod index 63b600d..d95e5d6 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/gorilla/securecookie v1.1.2 github.com/gorilla/sessions v1.2.2 github.com/jinzhu/gorm v1.9.17-0.20211120011537-5c235b72a414 - github.com/josephburnett/jd v1.5.2 + github.com/josephburnett/jd v1.7.1 github.com/mattn/go-sqlite3 v1.14.18 github.com/mitchellh/mapstructure v1.5.0 github.com/mmcdole/gofeed v1.2.1 @@ -25,9 +25,9 @@ require ( github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be github.com/sentriz/audiotags v0.0.0-20230419125925-8886243b2137 github.com/sentriz/gormstore v0.0.0-20220105134332-64e31f7f6981 - github.com/stretchr/testify v1.8.1 - golang.org/x/exp v0.0.0-20231006140011-7918f672742d - golang.org/x/net v0.17.0 + github.com/stretchr/testify v1.8.4 + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa + golang.org/x/net v0.18.0 golang.org/x/sync v0.5.0 gopkg.in/gormigrate.v1 v1.6.0 jaytaylor.com/html2text v0.0.0-20230321000545-74c2419ad056 @@ -38,8 +38,8 @@ require ( github.com/Masterminds/semver v1.5.0 // indirect github.com/PuerkitoBio/goquery v1.8.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/swag v0.21.1 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/gorilla/context v1.1.2 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/imdario/mergo v0.3.16 // indirect @@ -58,9 +58,10 @@ require ( github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/image v0.13.0 // indirect + golang.org/x/crypto v0.15.0 // indirect + golang.org/x/image v0.14.0 // indirect golang.org/x/sys v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect diff --git a/go.sum b/go.sum index 2f42c22..86231b5 100644 --- a/go.sum +++ b/go.sum @@ -13,7 +13,6 @@ github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9Pq github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss= github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -32,11 +31,10 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= @@ -77,24 +75,20 @@ github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI= github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/josephburnett/jd v1.5.2 h1:RzE34nVV4kdTmFY5Cl7Wrwwo7J3AKlFMQk9x89GvIHE= -github.com/josephburnett/jd v1.5.2/go.mod h1:2pSZGHitQCumXDDTxmJehndlsltrTeVAhrzP8WfFeuc= +github.com/josephburnett/jd v1.7.1 h1:oXBPMS+SNnILTMGj1fWLK9pexpeJUXtbVFfRku/PjBU= +github.com/josephburnett/jd v1.7.1/go.mod h1:R8ZnZnLt2D4rhW4NvBc/USTo6mzyNT6fYNIIWOJA9GY= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -122,8 +116,6 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= @@ -138,6 +130,8 @@ github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be/go.mod h1:MIDF github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/sentriz/audiotags v0.0.0-20230419125925-8886243b2137 h1:K0PSMi/p9ISHpfRFJB03d7VX+jjEsDARsTlAcN1zpac= github.com/sentriz/audiotags v0.0.0-20230419125925-8886243b2137/go.mod h1:nUVlCJ7n2jQoJ5rttpHozZ8pHJIhD9VehL6GP21FoDU= github.com/sentriz/gormstore v0.0.0-20220105134332-64e31f7f6981 h1:sLILANWN76ja66/K4k/mBqJuCjDZaM67w+Ru6rEB0s0= @@ -145,27 +139,22 @@ github.com/sentriz/gormstore v0.0.0-20220105134332-64e31f7f6981/go.mod h1:Rx8XB1 github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf h1:pvbZ0lM0XWPBqUKqFU8cmavspvIl9nulOYwdy6IFRRo= github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02nZ62WenDCkgHFerpIOmW0iT7GKmXM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg= -golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk= +golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= +golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -180,8 +169,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -219,19 +208,15 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+y golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/gormigrate.v1 v1.6.0 h1:XpYM6RHQPmzwY7Uyu+t+xxMXc86JYFJn4nEc9HzQjsI= gopkg.in/gormigrate.v1 v1.6.0/go.mod h1:Lf00lQrHqfSYWiTtPcyQabsDdM6ejZaMgV0OU6JMSlw= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= jaytaylor.com/html2text v0.0.0-20230321000545-74c2419ad056 h1:6YFJoB+0fUH6X3xU/G2tQqCYg+PkGtnZ5nMR5rpw72g=