do not update tracks already referenced via relative paths

This commit is contained in:
Brennen Raimer
2026-05-04 11:28:03 -04:00
parent 92e767c3d5
commit 1b22628903
+4 -1
View File
@@ -18,7 +18,10 @@ def main(music_folder: Path):
with m3u.open("w") as updated_contents:
for track in tracks:
updated_contents.write(str(track.relative_to(m3u, walk_up=True)).replace("\\", "/"))
if track.is_absolute():
updated_contents.write(str(track.relative_to(m3u, walk_up=True)).replace("\\", "/"))
else:
updated_contents.write(str(track).replace("\\", "/"))
if __name__ == "__main__":