quintodrome/tests/fixtures
Deluan Quintão acd69f6a4f
feat(playlist): support #EXTALBUMARTURL directive and sidecar images (#5131)
* feat(playlist): add migration for playlist image field rename and external URL

* refactor(playlist): rename ImageFile to UploadedImage and ArtworkPath to UploadedImagePath

Rename playlist model fields and methods for clarity in preparation for
adding external image URL and sidecar image support. Add the new
ExternalImageURL field to the Playlist model.

* feat(playlist): parse #EXTALBUMARTURL directive in M3U imports

* feat(playlist): always sync ExternalImageURL on re-scan, preserve UploadedImage

* feat(artwork): add sidecar image discovery and cache invalidation for playlists

Add playlist sidecar image support to the artwork reader fallback chain.
A sidecar image (e.g., MyPlaylist.jpg next to MyPlaylist.m3u) is discovered
via case-insensitive base name matching using model.IsImageFile(). Cache
invalidation uses max(playlist.UpdatedAt, imageFile.ModTime()) to bust
stale artwork when sidecar or ExternalImageURL local files change.

* feat(artwork): add external image URL source to playlist artwork reader

Add fromPlaylistExternalImage source function that resolves playlist
cover art from ExternalImageURL, supporting both HTTP(S) URLs (via
the existing fromURL helper) and local file paths (via os.Open).
Insert it in the Reader() fallback chain between sidecar and tiled cover.

* refactor(artwork): simplify playlist artwork source functions

Extract shared fromLocalFile helper, use url.Parse for scheme check,
and collapse sidecar directory scan conditions.

* test(artwork): remove redundant fromPlaylistSidecar tests

These tests duplicated scenarios already covered by findPlaylistSidecarPath
tests combined with fromLocalFile (tested via fromPlaylistExternalImage).
After refactoring fromPlaylistSidecar to a one-liner composing those two
functions, the wrapper tests add no value.

* fix(playlist): address security review comments from PR #5131:

- Use url.PathUnescape instead of url.QueryUnescape for file:// URLs so
  that '+' in filenames is preserved (not decoded as space).
- Validate all local image paths (file://, absolute, relative) against
  known library boundaries via libraryMatcher, rejecting paths outside
  any configured library.
- Harden #EXTALBUMARTURL against path traversal and SSRF by adding EnableM3UExternalAlbumArt config flag (default false, also
  disabled by EnableExternalServices=false) to gate HTTP(S) URL storage
  at parse time and fetching at read time (defense in depth).
- Log a warning when os.ReadDir fails in findPlaylistSidecarPath for
  diagnosability.
- Extract resolveLocalPath helper to simplify resolveImageURL.

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

* feat(playlist): implement human-friendly filename generation for uploaded playlist cover images

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

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-03-02 11:39:59 -05:00
..
#snapshot Fix pipeline 2024-09-13 17:43:50 -04:00
$Recycle.Bin Fix pipeline. 2023-03-09 22:25:56 -05:00
...unhidden_folder Improve scanner (#1054) 2021-04-28 19:51:02 -04:00
.hidden_folder Fix ignoring hidden folders when scanning 2020-10-22 13:59:54 -04:00
artist Implement artist art priority (#2266) 2023-03-30 18:28:05 -04:00
empty_folder Move test file to fixtures folder 2020-04-28 11:59:47 -04:00
ignored_folder Skip scanning folders if they contain a .ndignore file. Closes #297 2020-05-18 14:37:01 -04:00
invalid-files Add OS Lyrics extension (#2656) 2023-12-27 20:20:29 -05:00
playlists feat(playlist): support #EXTALBUMARTURL directive and sidecar images (#5131) 2026-03-02 11:39:59 -05:00
._02 Invisible.mp3 Ignore "hidden" files when importing a folder 2020-08-21 11:50:18 -04:00
01 Invisible (RED) Edit Version.m4a fix(scanner): check if aiff/wma file has cover art (#3996) 2025-04-25 13:00:26 -04:00
01 Invisible (RED) Edit Version.mp3 getCoverArt.view working 2016-03-03 12:08:44 -05:00
bom-test.lrc fix: handle UTF BOM in lyrics and playlist files (#4637) 2025-10-31 09:07:23 -04:00
bom-utf16-test.lrc fix: handle UTF BOM in lyrics and playlist files (#4637) 2025-10-31 09:07:23 -04:00
deezer.artist.bio.empty.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
deezer.artist.bio.en.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
deezer.artist.bio.fr.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
deezer.artist.related.json feat(deezer): Add artist bio, top tracks, related artists and language support (#4720) 2025-11-21 15:09:24 -05:00
deezer.artist.top.json feat(deezer): Add artist bio, top tracks, related artists and language support (#4720) 2025-11-21 15:09:24 -05:00
deezer.search.artist.json feat(agents): Add Deezer API artist image provider agent (#4180) 2025-06-28 17:50:06 -04:00
empty.txt fix(scanner): improve M3U playlist import times (#2706) 2024-09-18 20:12:12 -04:00
index.html Fix background images when BaseURL is specified 2022-11-29 14:48:05 -05:00
itunes-library.xml Retrofitting with tests 2016-02-29 10:04:30 -05:00
lastfm.album.getinfo.empty.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
lastfm.album.getinfo.empty_urls.json Get album info (when available) from Last.fm, add getAlbumInfo endpoint (#2061) 2023-01-17 20:22:54 -05:00
lastfm.album.getinfo.en.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
lastfm.album.getinfo.json Get album info (when available) from Last.fm, add getAlbumInfo endpoint (#2061) 2023-01-17 20:22:54 -05:00
lastfm.artist.getinfo.empty.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
lastfm.artist.getinfo.en.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
lastfm.artist.getinfo.json Add initial last.fm client implementation 2020-10-20 16:07:31 -04:00
lastfm.artist.getinfo.unknown.json Retry calls to Last.FM without MBIDs when if returns artist invalid (#1138) 2021-05-27 20:53:24 -04:00
lastfm.artist.getsimilar.json Add dedicated SimilarArtists call 2020-10-20 16:07:31 -04:00
lastfm.artist.getsimilar.unknown.json Retry calls to Last.FM without MBIDs when if returns artist invalid (#1138) 2021-05-27 20:53:24 -04:00
lastfm.artist.gettoptracks.json Add "real" TopSongs 2020-10-20 22:53:52 -04:00
lastfm.artist.gettoptracks.unknown.json Retry calls to Last.FM without MBIDs when if returns artist invalid (#1138) 2021-05-27 20:53:24 -04:00
lastfm.artist.page.html fix(lastfm): ignore artist placeholder image. 2025-11-19 20:49:29 -05:00
lastfm.artist.page.ignored.html fix(lastfm): ignore artist placeholder image. 2025-11-19 20:49:29 -05:00
lastfm.artist.page.no_meta.html fix(lastfm): ignore artist placeholder image. 2025-11-19 20:49:29 -05:00
lastfm.track.getsimilar.json feat: add similar songs functionality in agents, and Instant Mix (song-based) to UI (#4919) 2026-01-25 16:16:43 -05:00
lastfm.track.getsimilar.unknown.json feat: add similar songs functionality in agents, and Instant Mix (song-based) to UI (#4919) 2026-01-25 16:16:43 -05:00
listenbrainz.artist.metadata.homepage.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.artist.metadata.no_homepage.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.labs.similar-artists.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.labs.similar-recordings-real-out-of-order.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.labs.similar-recordings.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.nowplaying.request.json 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
listenbrainz.popularity.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.scrobble.request.json 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
mixed-lyrics.flac fix(scanner): lyrics tag parsing to properly handle both ID3 and aliased tags 2025-07-09 00:27:40 -03:00
no_replaygain.mp3 fix: Allow nullable ReplayGain and support 0.0 (#4239) 2025-06-17 12:02:25 -04:00
robots.txt Rename manifest.json to manifest.webmanifest (#1399) 2021-10-12 20:06:09 -04:00
spotify.search.artist.json Add initial spotify client implementation 2020-10-20 16:07:31 -04:00
symlink Follow symlinks to directories when scanning 2020-04-23 20:31:44 -04:00
symlink2dir WIP 2020-10-29 23:19:26 -04:00
test.aiff fix(scanner): check if aiff/wma file has cover art (#3996) 2025-04-25 13:00:26 -04:00
test.flac fix(scanner): check if aiff/wma file has cover art (#3996) 2025-04-25 13:00:26 -04:00
test.lrc feat:(server): support reading lyrics from filesystem (#2897) 2025-04-30 08:10:19 -04:00
test.m4a fix(scanner): check if aiff/wma file has cover art (#3996) 2025-04-25 13:00:26 -04:00
test.mp3 fix(scanner): check if aiff/wma file has cover art (#3996) 2025-04-25 13:00:26 -04:00
test.ogg fix(scanner): check if aiff/wma file has cover art (#3996) 2025-04-25 13:00:26 -04:00
test.opus fix(scanner): pass filename hint to gotaglib's OpenStream for format detection (#5012) 2026-02-09 16:16:28 -05:00
test.tak 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
test.txt feat:(server): support reading lyrics from filesystem (#2897) 2025-04-30 08:10:19 -04:00
test.wav fix(scanner): check if aiff/wma file has cover art (#3996) 2025-04-25 13:00:26 -04:00
test.wma fix(scanner): check if aiff/wma file has cover art (#3996) 2025-04-25 13:00:26 -04:00
test.wv fix(scanner): check if aiff/wma file has cover art (#3996) 2025-04-25 13:00:26 -04:00
zero_replaygain.mp3 fix: Allow nullable ReplayGain and support 0.0 (#4239) 2025-06-17 12:02:25 -04:00