fix: error when delete unexisted file

This commit is contained in:
Terry Geng 2020-03-19 18:53:15 +08:00
parent 4423f499e6
commit 3fe64c96c6

View File

@ -96,6 +96,7 @@ class MusicCache(dict):
self.files.remove(item.path)
self.save_dir_cache()
elif item.type == 'url':
if os.path.exists(item.path):
os.remove(item.path)
if item.id in self: