]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/bandcamp.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / bandcamp.py
index 2dae49e77007d3c1447253353a725e55d1502e9e..de81e0de7b00631ed8c60a01866ed1173159572e 100644 (file)
@@ -5,16 +5,16 @@
 from .common import InfoExtractor
 from ..compat import compat_str
 from ..utils import (
+    KNOWN_EXTENSIONS,
     ExtractorError,
     float_or_none,
     int_or_none,
-    KNOWN_EXTENSIONS,
     parse_filesize,
     str_or_none,
     try_get,
-    update_url_query,
     unified_strdate,
     unified_timestamp,
+    update_url_query,
     url_or_none,
     urljoin,
 )
@@ -184,8 +184,6 @@ def _real_extract(self, url):
                             'acodec': format_id.split('-')[0],
                         })
 
-        self._sort_formats(formats)
-
         title = '%s - %s' % (artist, track) if artist else track
 
         if not duration:
@@ -211,7 +209,7 @@ def _real_extract(self, url):
         }
 
 
-class BandcampAlbumIE(BandcampIE):
+class BandcampAlbumIE(BandcampIE):  # XXX: Do not subclass from concrete IE
     IE_NAME = 'Bandcamp:album'
     _VALID_URL = r'https?://(?:(?P<subdomain>[^.]+)\.)?bandcamp\.com/album/(?P<id>[^/?#&]+)'
 
@@ -314,7 +312,7 @@ def _real_extract(self, url):
         }
 
 
-class BandcampWeeklyIE(BandcampIE):
+class BandcampWeeklyIE(BandcampIE):  # XXX: Do not subclass from concrete IE
     IE_NAME = 'Bandcamp:weekly'
     _VALID_URL = r'https?://(?:www\.)?bandcamp\.com/?\?(?:.*?&)?show=(?P<id>\d+)'
     _TESTS = [{
@@ -363,7 +361,6 @@ def _real_extract(self, url):
                 'ext': ext,
                 'vcodec': 'none',
             })
-        self._sort_formats(formats)
 
         title = show.get('audio_title') or 'Bandcamp Weekly'
         subtitle = show.get('subtitle')