Fixed crash that occurred when renaming new playlists.

This commit is contained in:
The Wobbler 2025-01-27 18:21:41 +01:00
parent 3e579a4fcb
commit b95081e840

View file

@ -124,11 +124,10 @@ class Playlist:
wbz.close() wbz.close()
def delete(self): def delete(self):
os.remove( path = f"{self.app.settings.library_path}/playlists/{self.title.replace(" ", "_")}.wbz.m3u"
os.path.expanduser(
f"{self.app.settings.library_path}/playlists/{self.title.replace(" ", "_")}.wbz.m3u" if os.path.exists(path):
), os.remove(os.path.expanduser(path))
)
def append_track(self, track): def append_track(self, track):
self.tracks.append(track) self.tracks.append(track)