navidrome/tests/fixtures
Deluan Quintão 91fab68578
fix: handle UTF BOM in lyrics and playlist files (#4637)
* fix: handle UTF-8 BOM in lyrics and playlist files

Added UTF-8 BOM (Byte Order Mark) detection and stripping for external lyrics files and playlist files. This ensures that files with BOM markers are correctly parsed and recognized as synced lyrics or valid playlists.

The fix introduces a new ioutils package with UTF8Reader and UTF8ReadFile functions that automatically detect and remove UTF-8, UTF-16 LE, and UTF-16 BE BOMs. These utilities are now used when reading external lyrics and playlist files to ensure consistent parsing regardless of BOM presence.

Added comprehensive tests for BOM handling in both lyrics and playlists, including test fixtures with actual BOM markers to verify correct behavior.

* test: add test for UTF-16 LE encoded LRC files

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

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2025-10-31 09:07:23 -04: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
.hidden_folder
artist Implement artist art priority (#2266) 2023-03-30 18:28:05 -04:00
empty_folder
ignored_folder
invalid-files Add OS Lyrics extension (#2656) 2023-12-27 20:20:29 -05:00
playlists fix: handle UTF BOM in lyrics and playlist files (#4637) 2025-10-31 09:07:23 -04:00
._02 Invisible.mp3
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
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.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
itunes-library.xml
lastfm.album.getinfo.empty_urls.json
lastfm.album.getinfo.json
lastfm.artist.getinfo.json
lastfm.artist.getinfo.unknown.json
lastfm.artist.getsimilar.json
lastfm.artist.getsimilar.unknown.json
lastfm.artist.gettoptracks.json
lastfm.artist.gettoptracks.unknown.json
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.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
spotify.search.artist.json
symlink
symlink2dir
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.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