navidrome/server/subsonic
Deluan Quintão 49a14d4583
feat(artwork): add per-disc cover art support (#5182)
* feat(artwork): add KindDiscArtwork and ParseDiscArtworkID

Add new disc artwork kind with 'dc' prefix for per-disc cover art
support. The composite ID format is albumID:discNumber, parsed by
the new ParseDiscArtworkID helper.

* feat(conf): add DiscArtPriority configuration option

Default: 'disc*.*, cd*.*, embedded'. Controls how per-disc cover
art is resolved, following the same pattern as CoverArtPriority
and ArtistArtPriority.

* feat(artwork): implement extractDiscNumber helper

Extracts disc number from filenames based on glob patterns by
parsing leading digits from the wildcard-matched portion.
Used for matching disc-specific artwork files like disc1.jpg.

* feat(artwork): implement fromDiscExternalFile source function

Disc-aware variant of fromExternalFile that filters image files
by disc number (extracted from filename) or folder association
(for multi-folder albums).

* feat(artwork): implement discArtworkReader

Resolves disc artwork using DiscArtPriority config patterns.
Supports glob patterns with disc number extraction, embedded
images from first track, and falls back to album cover art.
Handles both multi-folder and single-folder multi-disc albums.

* feat(artwork): register disc artwork reader in dispatcher

Add KindDiscArtwork case to getArtworkReader switch, routing
disc artwork requests to the new discArtworkReader.

* feat(subsonic): add CoverArt field to DiscTitle response

Implements OpenSubsonic PR #220: optional cover art ID in
DiscTitle responses for per-disc artwork support.

* feat(subsonic): populate CoverArt in DiscTitle responses

Each DiscTitle now includes a disc artwork ID (dc-albumID:discNum)
that clients can use with getCoverArt to retrieve per-disc artwork.

* style: fix file permission in test to satisfy gosec

* feat(ui): add disc cover art display and lightbox functionality

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor: simplify disc artwork code

- Add DiscArtworkID constructor to encapsulate the "albumID:discNumber"
  format in one place
- Convert fromDiscExternalFile to a method on discArtworkReader,
  reducing parameter count from 6 to 2
- Remove unused rootFolder field from discArtworkReader

* style: fix prettier formatting in subsonic index

* style(ui): move cursor style to makeStyles in SongDatagrid

* feat(artwork): add discsubtitle option to DiscArtPriority

Allow matching disc cover art by the disc's subtitle/name.
When the "discsubtitle" keyword is in the priority list, image files
whose stem matches the disc subtitle (case-insensitive) are used.
This is useful for box sets with named discs (e.g., "The Blue Disc.jpg").

* feat(configuration): update discartpriority to include cover art options

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-03-13 18:33:18 -04:00
..
filter fix(subsonic): only use genre tag when searching by genre (#4361) 2025-07-19 21:52:29 -04:00
responses feat(artwork): add per-disc cover art support (#5182) 2026-03-13 18:33:18 -04:00
album_lists.go feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
album_lists_test.go feat(subsonic): implement OpenSubsonic Transcoding extension (#4990) 2026-03-08 23:57:49 -04:00
api.go refactor: rename core/transcode to core/stream, simplify MediaStreamer (#5166) 2026-03-09 22:22:58 -04:00
api_suite_test.go feat:(server): support reading lyrics from filesystem (#2897) 2025-04-30 08:10:19 -04:00
api_test.go fix(subsonic): validate JSONP callback parameter 2026-02-08 10:33:46 -05:00
bookmarks.go fix(subsonic): always return required playqueue fields (#5172) 2026-03-12 08:29:37 -04:00
browsing.go feat(subsonic): append album version to names in Subsonic API (#5111) 2026-02-26 10:50:12 -05:00
browsing_test.go feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
helpers.go feat(artwork): add per-disc cover art support (#5182) 2026-03-13 18:33:18 -04:00
helpers_test.go feat(artwork): add per-disc cover art support (#5182) 2026-03-13 18:33:18 -04:00
jukebox.go refactor: small improvements and clean up (#3423) 2024-10-22 22:54:31 -04:00
library_scanning.go fix(server): return correct scanType in startScan response (#5159) 2026-03-09 14:19:53 -04:00
library_scanning_test.go fix(server): return correct scanType in startScan response (#5159) 2026-03-09 14:19:53 -04:00
media_annotation.go feat(plugins): experimental support for plugins (#3998) 2025-06-22 20:45:38 -04:00
media_annotation_test.go feat(subsonic): implement OpenSubsonic Transcoding extension (#4990) 2026-03-08 23:57:49 -04:00
media_retrieval.go feat(plugins): add lyrics provider plugin capability (#5126) 2026-03-03 15:48:39 -05:00
media_retrieval_test.go feat(subsonic): implement OpenSubsonic Transcoding extension (#4990) 2026-03-08 23:57:49 -04:00
middlewares.go chore: upgrade golangci-lint to 2.11 and fix lint issues 2026-03-06 19:23:47 -05:00
middlewares_test.go feat: rename "reverse proxy authentication" to "external authentication" (#4418) 2025-12-02 12:01:48 -05:00
opensubsonic.go feat(subsonic): implement OpenSubsonic Transcoding extension (#4990) 2026-03-08 23:57:49 -04:00
opensubsonic_test.go feat(subsonic): implement OpenSubsonic Transcoding extension (#4990) 2026-03-08 23:57:49 -04:00
playlists.go refactor: move playlist business logic from repositories to service layer (#5027) 2026-02-21 19:57:13 -05:00
playlists_test.go feat(subsonic): implement OpenSubsonic Transcoding extension (#4990) 2026-03-08 23:57:49 -04:00
radio.go Replace all utils.Param* with req.Params 2023-12-21 17:41:09 -05:00
searching.go feat(subsonic): sort search3 results by relevance (#5086) 2026-02-23 08:51:54 -05:00
searching_test.go feat(subsonic): implement OpenSubsonic Transcoding extension (#4990) 2026-03-08 23:57:49 -04:00
sharing.go fix(subsonic): make Share's lastVisited optional 2025-01-09 16:10:53 -05:00
stream.go refactor: rename core/transcode to core/stream, simplify MediaStreamer (#5166) 2026-03-09 22:22:58 -04:00
system.go Some cleanup, adding missing context handling 2022-12-06 19:57:47 -05:00
transcode.go fix: use ADTS for AAC transcoding, temporarily exclude AAC from transcode decisions (#5167) 2026-03-11 09:26:32 -04:00
transcode_test.go fix: use ADTS for AAC transcoding, temporarily exclude AAC from transcode decisions (#5167) 2026-03-11 09:26:32 -04:00
users.go feat(server): add EnableCoverArtUpload config option 2026-03-02 16:59:05 -05:00
users_test.go feat(server): add EnableCoverArtUpload config option 2026-03-02 16:59:05 -05:00