From 2a3e3a8cdef86578623fdd257da2ca3ce522226f Mon Sep 17 00:00:00 2001 From: garret Date: Mon, 8 May 2023 23:22:45 +0100 Subject: 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 --- yt_dlp_plugins/extractor/radiko.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- cgit v1.2.3-70-g09d2