Files
bvandeusen ebff8f69a0 fix(lidarr): address review findings on HTTP client
- 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>
2026-04-29 16:26:23 -04:00

19 lines
624 B
JSON

[
{
"foreignTrackId": "t1a2b3c4-d5e6-7890-abcd-ef1234567890",
"foreignAlbumId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"foreignArtistId": "069b64b6-7884-4f6a-94cc-e4c1d6c87a01",
"title": "Roygbiv",
"albumTitle": "Music Has the Right to Children",
"artistName": "Boards of Canada"
},
{
"foreignTrackId": "t2b3c4d5-e6f7-8901-bcde-f12345678901",
"foreignAlbumId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"foreignArtistId": "069b64b6-7884-4f6a-94cc-e4c1d6c87a01",
"title": "Aquarius",
"albumTitle": "Music Has the Right to Children",
"artistName": "Boards of Canada"
}
]