From 6d932d763bc67c7f29f09c064b22542995bba847 Mon Sep 17 00:00:00 2001 From: Art Pelling Date: Thu, 9 Jul 2026 08:57:36 +0200 Subject: [PATCH 1/2] fix path normalization --- beetsplug/playlist.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/beetsplug/playlist.py b/beetsplug/playlist.py index 3edc5aadbb..0d0aa5a6ee 100644 --- a/beetsplug/playlist.py +++ b/beetsplug/playlist.py @@ -6,6 +6,7 @@ from typing import TYPE_CHECKING, ClassVar import beets +from beets.dbcore import pathutils from beets.dbcore.query import BLOB_TYPE, InQuery from beets.util import path_as_posix @@ -64,8 +65,10 @@ def __init__(self, _, pattern: str, __): continue paths.append( - beets.util.normpath( - os.path.join(relative_to_bytes, line.rstrip()) + pathutils.normalize_path_for_db( + beets.util.normpath( + os.path.join(relative_to_bytes, line) + ) ) ) f.close() From 214a973c2b65230d5e957a7da30e7f63b835cecf Mon Sep 17 00:00:00 2001 From: Art Pelling Date: Thu, 9 Jul 2026 08:59:22 +0200 Subject: [PATCH 2/2] fix line skipping --- beetsplug/playlist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beetsplug/playlist.py b/beetsplug/playlist.py index 0d0aa5a6ee..099e87c397 100644 --- a/beetsplug/playlist.py +++ b/beetsplug/playlist.py @@ -60,8 +60,9 @@ def __init__(self, _, pattern: str, __): relative_to_bytes = beets.util.bytestring_path(relative_to) for line in f: - if line[0] == "#": - # ignore comments, and extm3u extension + line = line.rstrip(b"\r\n") + if not line or line.startswith(b"#"): + # ignore blank lines, comments, and extm3u extension continue paths.append(