ebff8f69a0
- Add ArtistMBID/AlbumMBID to LookupResult so handlers can build the full lidarr_requests row from album/track lookups (parent MBID is needed for the AddAlbum API call and for the schema's NOT NULL lidarr_artist_mbid) - Trim trailing slash on BaseURL before joining paths to avoid double-slash URLs when operators enter "http://lidarr.lan/" - Check json.Marshal errors in AddArtist/AddAlbum - Extract lidarrImage as a named unexported type instead of repeating the anonymous struct three times - Add NewClient(baseURL, apiKey) constructor with 30s default timeout - Add ErrLookupFailed test coverage for the 4xx-non-auth branch on both get and post helpers - Rename TestListRootFolders_BadJSON -> _NullBody (it tests null, not malformed); add a real malformed-JSON test - Defensive separator guard on LookupAlbum.Secondary so an empty ArtistName doesn't produce a leading " · " Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
760 B
JSON
24 lines
760 B
JSON
[
|
|
{
|
|
"foreignAlbumId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
"foreignArtistId": "069b64b6-7884-4f6a-94cc-e4c1d6c87a01",
|
|
"title": "Music Has the Right to Children",
|
|
"artistName": "Boards of Canada",
|
|
"releaseDate": "1998-04-27",
|
|
"trackCount": 18,
|
|
"images": [
|
|
{"coverType": "cover", "remoteUrl": "https://example.invalid/mhtrtc.jpg", "url": ""},
|
|
{"coverType": "poster", "remoteUrl": "https://example.invalid/mhtrtc-poster.jpg", "url": ""}
|
|
]
|
|
},
|
|
{
|
|
"foreignAlbumId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
"foreignArtistId": "069b64b6-7884-4f6a-94cc-e4c1d6c87a01",
|
|
"title": "Geogaddi",
|
|
"artistName": "Boards of Canada",
|
|
"releaseDate": "2002-02-11",
|
|
"trackCount": 23,
|
|
"images": []
|
|
}
|
|
]
|