navidrome/cmd
Deluan Quintão 83fff44c82
feat(archiver): add folder cover image to downloaded zips (#6224)
* feat(archiver): add folder cover image to downloaded zips

Album, artist, playlist and share downloads now include the item's cover as
folder.<ext>, the image most players and car stereos show for the files next to
it. This helps users who copy transcoded downloads to offline devices, since
transcoding drops the embedded artwork (#5841).

Album folders get the album cover, the artist zip root gets the artist image,
and playlist and share zips get the playlist or shared item's cover at the root.
The image is the same one getCoverArt serves, resized to 500px (not square),
and named by its detected type. Items without artwork get no image, and a cover
that fails to load is logged and skipped so it never breaks the archive.

The archiver reads covers through a new core.CoverArtReader interface,
implemented by artwork.CoverArtReader, to avoid an import cycle between core
and core/artwork.

* refactor(archiver): read covers through artwork.Artwork directly

The archiver no longer needs a local CoverArtReader interface and adapter.
The only reason core/artwork imported core was a core.AbsolutePath call in
loadArtistFolder, which now reads the library path from the repository and
cleans it the same way. With the import cycle gone, the archiver takes
artwork.Artwork and treats ErrUnavailable and ErrNotFound as no cover.

Covers are now written after each album's tracks (and after all tracks for
the archive root), so a slow artwork lookup does not delay the first bytes
of the download.

* fix(archiver): read share covers as admin so private playlists keep theirs

Public share downloads run with an anonymous context, and the playlist
repository hides private playlists from anonymous users, so a zip of a shared
private playlist silently had no folder image. Like the public image handler,
the share itself is the authorization: the cover lookup now runs with an admin
user. Only the cover read is elevated; streaming keeps the anonymous context,
so the transcode limiter still keys public downloads the same way.

* style(archiver): trim comments

Shorten the comments added by the folder cover image change and drop the ones the names already explain.

* fix(archiver): add one cover per album folder in artist zips

Albums with the same name share a zip folder (pre-existing naming), so an
artist zip with two such albums wrote two folder.<ext> entries at the same
path. Keep the first cover and skip the rest for that folder.
2026-09-25 16:42:49 -04:00
..
artwork.go fix(artwork): never retry absent artwork on its own (#6054) 2026-09-01 20:48:41 -04:00
artwork_test.go fix(artwork): never retry absent artwork on its own (#6054) 2026-09-01 20:48:41 -04:00
backup.go feat(cli): add 'doctor' and 'search rebuild' commands to recover from FTS5 corruption (#6069) 2026-09-11 22:26:28 -04:00
cmd_suite_test.go feat(plugins): experimental support for plugins (#3998) 2025-06-22 20:45:38 -04:00
doctor.go feat(cli): add 'doctor' and 'search rebuild' commands to recover from FTS5 corruption (#6069) 2026-09-11 22:26:28 -04:00
doctor_test.go feat(cli): add 'doctor' and 'search rebuild' commands to recover from FTS5 corruption (#6069) 2026-09-11 22:26:28 -04:00
inspect.go chore: go fix 2026-05-28 22:13:05 -03:00
missing.go feat(cli): add missing file list and remap subcommands (#5928) 2026-09-12 12:08:25 -04:00
missing_test.go feat(cli): add missing file list and remap subcommands (#5928) 2026-09-12 12:08:25 -04:00
pls.go fix(cli): write pls -p playlist output to stdout (#5996) 2026-08-20 09:04:09 -04:00
pls_test.go fix(cli): write pls -p playlist output to stdout (#5996) 2026-08-20 09:04:09 -04:00
plugin.go feat(cli): add an artwork command group for diagnosing and re-driving artwork (#5957) 2026-08-14 21:07:56 -04:00
plugin_test.go feat(cli): add a 'navidrome plugin' CLI for managing and inspecting plugins (#5682) 2026-06-28 13:26:32 -04:00
root.go fix(scanner): stop DB lock starvation during scans on slow storage (#6201) 2026-09-23 17:04:50 -04:00
root_test.go fix: assorted scanner, plugin, and server fixes from the Go 1.27 work (#6050) 2026-08-30 21:24:50 -04:00
scan.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
scan_test.go perf(db): keep query planner statistics trustworthy with full ANALYZE (#5740) 2026-07-13 12:04:29 -04:00
search.go feat(cli): add 'doctor' and 'search rebuild' commands to recover from FTS5 corruption (#6069) 2026-09-11 22:26:28 -04:00
signaller_nounix.go Fix typo 2024-05-01 23:09:11 -04:00
signaller_unix.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
svc.go fix(service): rewrite systemd service template for kardianos/service v1.3.0 (#5743) 2026-07-08 16:40:07 -04:00
svc_test.go fix(service): rewrite systemd service template for kardianos/service v1.3.0 (#5743) 2026-07-08 16:40:07 -04:00
user.go fix(cli): restore int cast for syscall.Stdin on Windows 2026-05-20 19:33:42 -03:00
utils.go feat(cli): add 'doctor' and 'search rebuild' commands to recover from FTS5 corruption (#6069) 2026-09-11 22:26:28 -04:00
wire_gen.go feat(archiver): add folder cover image to downloaded zips (#6224) 2026-09-25 16:42:49 -04:00
wire_injectors.go feat(jellyfin): add opt-in LAN auto-discovery (#6169) 2026-09-19 13:33:19 -04:00