aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/yt_dlp_plugins/extractor
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2023-05-08 23:22:45 +0100
committergarret <garret@airmail.cc>2023-05-08 23:25:15 +0100
commit2a3e3a8cdef86578623fdd257da2ca3ce522226f (patch)
tree483e9661efedac1816a02212d79df3b56b1e359e /yt_dlp_plugins/extractor
parent33fe77a62487b5514974a9a1518b1ec1e4c22044 (diff)
downloadyt-dlp-rajiko-2a3e3a8cdef86578623fdd257da2ca3ce522226f.tar.gz
yt-dlp-rajiko-2a3e3a8cdef86578623fdd257da2ca3ce522226f.tar.bz2
yt-dlp-rajiko-2a3e3a8cdef86578623fdd257da2ca3ce522226f.zip
re-index regions if station not present
stations change names, new ones get added, etc assume it's something like this and try to correct for it before kicking you out with an error
Diffstat (limited to 'yt_dlp_plugins/extractor')
-rwxr-xr-xyt_dlp_plugins/extractor/radiko.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py
index 7ac4aee..31d12a5 100755
--- a/yt_dlp_plugins/extractor/radiko.py
+++ b/yt_dlp_plugins/extractor/radiko.py
@@ -428,7 +428,10 @@ class _RadikoBaseIE(InfoExtractor):
return info
def _get_station_region(self, station):
- regions = self.cache.load('rajiko', 'region_index') or self._index_regions()
+ regions = self.cache.load('rajiko', 'region_index')
+ if regions is None or station not in regions:
+ regions = self._index_regions()
+
return regions[station]
def _negotiate_token(self, station_region):