]> git.0d.be Git - django-panik-emissions.git/commitdiff
add intermediate sound quality
authorFrédéric Péters <fpeters@0d.be>
Wed, 8 Apr 2020 06:13:23 +0000 (08:13 +0200)
committerFrédéric Péters <fpeters@0d.be>
Wed, 8 Apr 2020 06:13:23 +0000 (08:13 +0200)
emissions/management/commands/create-sound-files.py
emissions/models.py

index 84799f657e0134bbac0840de06edcd6693e133d1..4892415c91fa3e7e88c7b4e151815558ee8d9411 100644 (file)
@@ -124,8 +124,10 @@ class Command(BaseCommand):
         orig_bitrate = get_bitrate(soundfile.file.path)
         vorbis_q = 5
         if orig_bitrate is not None:
-            if soundfile.episode.emission.podcast_sound_quality == 'high':
+            if soundfile.episode.emission.podcast_sound_quality == 'highest':
                 vorbis_q = 9
+            elif soundfile.episode.emission.podcast_sound_quality == 'high':
+                vorbis_q = 7
             # cap quality to original bitrate (using vorbis quality mapping)
             for i, rate in enumerate(vorbis_rates):
                 if orig_bitrate < rate:
index e4903fa3cd1c5bfee0a3dd074f4e8a8b8521bf0f..8dade8c5e6c9d38660b2adc85656cf0af79fea22 100644 (file)
@@ -35,6 +35,7 @@ LICENSES = (
 PODCAST_SOUND_QUALITY_LIST = (
     ('standard', _('Standard')),
     ('high', _('High')),
+    ('highest', _('Highest')),
 )