mirror of
https://github.com/beetbox/beets.git
synced 2026-01-07 16:34:45 +01:00
mediafile: delete() works with ASF (#244)
This commit is contained in:
parent
69e691f10d
commit
394d96f752
1 changed files with 9 additions and 2 deletions
|
|
@ -904,8 +904,15 @@ class MediaFile(object):
|
|||
self.mgfile.save()
|
||||
|
||||
def delete(self):
|
||||
"""Removes current metadata information associated with the path/file."""
|
||||
self.mgfile.delete()
|
||||
"""Remove the current metadata tag from the file.
|
||||
"""
|
||||
try:
|
||||
self.mgfile.delete()
|
||||
except NotImplementedError:
|
||||
# For Mutagen types that don't support deletion (notably,
|
||||
# ASF), just delete each tag individually.
|
||||
for tag in self.mgfile.keys():
|
||||
del self.mgfile[tag]
|
||||
|
||||
|
||||
# Field definitions.
|
||||
|
|
|
|||
Loading…
Reference in a new issue