Fix spotify m3u Windows path parsing
This commit is contained in:
@@ -26,6 +26,18 @@ test("falls back to filename when EXTINF is absent", () => {
|
||||
assert.equal(refs[0].title, "Karma Police");
|
||||
});
|
||||
|
||||
test("falls back to the filename from Windows paths", () => {
|
||||
const refs = parseM3u(String.raw`C:\Users\fiori\iCloudDrive\Music\Classic Hits\Owner of a Lonely Heart.mp3`);
|
||||
|
||||
assert.deepEqual(refs, [
|
||||
{
|
||||
source: "Owner of a Lonely Heart",
|
||||
query: "Owner of a Lonely Heart",
|
||||
title: "Owner of a Lonely Heart"
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
test("reads m3u from file", async () => {
|
||||
const root = await mkdtemp(join(tmpdir(), "spotify-m3u-"));
|
||||
const path = join(root, "playlist.m3u8");
|
||||
|
||||
Reference in New Issue
Block a user