fix: error when delete unexisted file
This commit is contained in:
parent
4423f499e6
commit
3fe64c96c6
@ -96,7 +96,8 @@ class MusicCache(dict):
|
|||||||
self.files.remove(item.path)
|
self.files.remove(item.path)
|
||||||
self.save_dir_cache()
|
self.save_dir_cache()
|
||||||
elif item.type == 'url':
|
elif item.type == 'url':
|
||||||
os.remove(item.path)
|
if os.path.exists(item.path):
|
||||||
|
os.remove(item.path)
|
||||||
|
|
||||||
if item.id in self:
|
if item.id in self:
|
||||||
del self[item.id]
|
del self[item.id]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user