Fix spotify m3u Windows path parsing

This commit is contained in:
2026-04-12 10:03:43 -05:00
parent c2db2b51e7
commit 26a968797c
4 changed files with 46 additions and 3 deletions

View File

@@ -35,6 +35,18 @@ test("parses artist title patterns", () => {
]);
});
test("cleans filename-only track names from dotted and temp media filenames", () => {
assert.deepEqual(parseArtistTitle("The.Hills.flac"), [
{ source: "The Hills", query: "The Hills", title: "The Hills" }
]);
assert.deepEqual(parseArtistTitle("15.I Feel It Coming.temp.mp3"), [
{ source: "I Feel It Coming", query: "I Feel It Coming", title: "I Feel It Coming" }
]);
assert.deepEqual(parseArtistTitle("Y.M.C.A..mp3"), [
{ source: "Y.M.C.A.", query: "Y.M.C.A.", title: "Y.M.C.A." }
]);
});
test("dedupes normalized artist title refs", () => {
const refs = dedupeTrackRefs([
{ source: "a", query: "Radiohead Karma Police", artist: "Radiohead", title: "Karma Police" },