mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 02:17:25 +02:00
test(artwork): cover artist folder lookup for a single album without images
Add an e2e spec for an artist whose only album folder has no images of its own, while the artist folder holds folder.jpg (plus unrelated images) and ArtistArtPriority starts with folder.*. Before #5856, the album's parent was promoted into the album paths, so the artist folder resolved to the library root and the artist got no image. The spec fails if that promotion comes back, and passes on current code. Refs #5823
This commit is contained in:
parent
decac50f60
commit
5bd14da65c
1 changed files with 22 additions and 0 deletions
|
|
@ -90,6 +90,28 @@ var _ = Describe("Artist artwork resolution", func() {
|
|||
})
|
||||
})
|
||||
|
||||
When("the artist's only album folder has no images of its own", func() {
|
||||
// Artist/
|
||||
// ├── backdrop1.jpg
|
||||
// ├── folder.jpg ← matched by folder.*
|
||||
// ├── logo.png
|
||||
// └── Album/
|
||||
// ├── 01 - Track.mp3
|
||||
// └── 02 - Track.mp3
|
||||
It("resolves the artist folder, not the library root", func() {
|
||||
conf.Server.ArtistArtPriority = "folder.*, artist.*, album/artist.*"
|
||||
setLayout(fstest.MapFS{
|
||||
"Artist/Album/01 - Track.mp3": trackFile(1, "Track 1", map[string]any{"albumartist": "Artist", "album": "Album"}),
|
||||
"Artist/Album/02 - Track.mp3": trackFile(2, "Track 2", map[string]any{"albumartist": "Artist", "album": "Album"}),
|
||||
"Artist/backdrop1.jpg": smallPNG("backdrop"),
|
||||
"Artist/folder.jpg": smallPNG("artist-folder"),
|
||||
"Artist/logo.png": smallPNG("logo"),
|
||||
})
|
||||
scan()
|
||||
expectArtistFolder(soleArtist(), "Artist/folder.jpg")
|
||||
})
|
||||
})
|
||||
|
||||
When("the artist's only album has its tracks in disc subfolders", func() {
|
||||
// Artist/
|
||||
// ├── artist.jpg ← wins (artist.* before album/artist.*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue