]> git.0d.be Git - django-panik-emissions.git/commitdiff
strip all existing metadata when creating sound files
authorFrédéric Péters <fpeters@0d.be>
Wed, 6 May 2020 12:17:12 +0000 (14:17 +0200)
committerFrédéric Péters <fpeters@0d.be>
Wed, 6 May 2020 12:17:12 +0000 (14:17 +0200)
emissions/management/commands/create-sound-files.py

index 4892415c91fa3e7e88c7b4e151815558ee8d9411..c48926838ebb899fba14a4fdd94489617cbada39 100644 (file)
@@ -159,9 +159,8 @@ class Command(BaseCommand):
         file_path = soundfile.get_format_path(format)
 
         audio = mutagen.File(file_path, easy=True)
+        audio.delete()  # strip all existing metadata
 
-        if 'comment' in audio:
-            del audio['comment']
         if soundfile.fragment is True and soundfile.title:
             audio['title'] = '%s - %s' % (
                     soundfile.episode.title,