]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/radiko.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / radiko.py
index dbb74871509101953f57c5240600ba52b69960e3..f10292203479aed6a43def16c4530500a9ee6230 100644 (file)
@@ -43,7 +43,7 @@ def _auth_client(self):
             }).split(',')[0]
 
         auth_data = (auth_token, area_id)
-        self._downloader.cache.store('radiko', 'auth_data', auth_data)
+        self.cache.store('radiko', 'auth_data', auth_data)
         return auth_data
 
     def _extract_full_key(self):
@@ -125,7 +125,6 @@ def _extract_formats(self, video_id, station, is_onair, ft, cursor, auth_token,
                     sf['downloader_options'] = {'ffmpeg_args': ['-ss', time_to_skip]}
             formats.extend(subformats)
 
-        self._sort_formats(formats)
         return formats
 
 
@@ -150,7 +149,7 @@ def _real_extract(self, url):
         vid_int = unified_timestamp(video_id, False)
         prog, station_program, ft, radio_begin, radio_end = self._find_program(video_id, station, vid_int)
 
-        auth_cache = self._downloader.cache.load('radiko', 'auth_data')
+        auth_cache = self.cache.load('radiko', 'auth_data')
         for attempt in range(2):
             auth_token, area_id = (not attempt and auth_cache) or self._auth_client()
             formats = self._extract_formats(