Made it work with relative paths also.

This commit is contained in:
The Wobbler 2025-01-26 14:07:00 +01:00
parent 74bff6ea13
commit b2bd8ef784
4 changed files with 11 additions and 5 deletions

View file

@ -112,7 +112,7 @@ class Playlist:
for track in self.tracks:
wbz_data += f"{track.path}\n"
wbz = open(f"{self.app.settings.library_path}/playlists/{self.title.replace(" ", "_")}.wbz.m3u", "w")
wbz = open(os.path.expanduser(f"{self.app.settings.library_path}/playlists/{self.title.replace(" ", "_")}.wbz.m3u"), "w")
wbz.write(wbz_data)
wbz.close()