]> jfr.im git - yt-dlp.git/commitdiff
[FormatSort] Fix `aext` for `--prefer-free-formats`
authorpukkandan <redacted>
Wed, 31 Aug 2022 17:19:14 +0000 (22:49 +0530)
committerpukkandan <redacted>
Thu, 1 Sep 2022 11:16:31 +0000 (16:46 +0530)
Closes #4735

README.md
yt_dlp/extractor/common.py

index 83ab309c6c2a92a9b55e9d7c1c7fad6963be4d22..176832ca99ad2e3f34d9a817f164bcdeed0cf2c8 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1530,7 +1530,7 @@ ## Sorting Formats
  - `acodec`: Audio Codec (`flac`/`alac` > `wav`/`aiff` > `opus` > `vorbis` > `aac` > `mp4a` > `mp3` > `eac3` > `ac3` > `dts` > other)
  - `codec`: Equivalent to `vcodec,acodec`
  - `vext`: Video Extension (`mp4` > `webm` > `flv` > other). If `--prefer-free-formats` is used, `webm` is preferred.
- - `aext`: Audio Extension (`m4a` > `aac` > `mp3` > `ogg` > `opus` > `webm` > other). If `--prefer-free-formats` is used, the order changes to `opus` > `ogg` > `webm` > `m4a` > `mp3` > `aac`.
+ - `aext`: Audio Extension (`m4a` > `aac` > `mp3` > `ogg` > `opus` > `webm` > other). If `--prefer-free-formats` is used, the order changes to `ogg` > `opus` > `webm` > `mp3` > `m4a` > `aac`
  - `ext`: Equivalent to `vext,aext`
  - `filesize`: Exact filesize, if known in advance
  - `fs_approx`: Approximate filesize calculated from the manifests
index b792219553706a5a9aead2846ee4199b8240d09b..b9d0305b4d2fb5142b46305a3a7d30aed7ac1903 100644 (file)
@@ -1693,7 +1693,7 @@ class FormatSort:
                      'order_free': ('webm', 'mp4', 'flv', '', 'none')},
             'aext': {'type': 'ordered', 'field': 'audio_ext',
                      'order': ('m4a', 'aac', 'mp3', 'ogg', 'opus', 'webm', '', 'none'),
-                     'order_free': ('opus', 'ogg', 'webm', 'm4a', 'mp3', 'aac', '', 'none')},
+                     'order_free': ('ogg', 'opus', 'webm', 'mp3', 'm4a', 'aac', '', 'none')},
             'hidden': {'visible': False, 'forced': True, 'type': 'extractor', 'max': -1000},
             'aud_or_vid': {'visible': False, 'forced': True, 'type': 'multiple',
                            'field': ('vcodec', 'acodec'),