From be540fe77d00f22cf6a4f0f6865a109cf8011bdc Mon Sep 17 00:00:00 2001 From: garret Date: Sun, 11 Aug 2024 11:27:57 +0100 Subject: persons: only check the extractor arg once --- yt_dlp_plugins/extractor/radiko.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'yt_dlp_plugins/extractor') diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py index 7d06d37..618e1cb 100644 --- a/yt_dlp_plugins/extractor/radiko.py +++ b/yt_dlp_plugins/extractor/radiko.py @@ -719,10 +719,10 @@ class RadikoPersonIE(InfoExtractor): person_api = self._download_json(person_api_url, person_id) def entries(): + key_station_only = len(self._configuration_arg("key_station_only", ie_key="rajiko")) > 0 for episode in person_api.get("data"): - if len(self._configuration_arg("key_station_only", ie_key="rajiko")) > 0: - if episode.get("key_station_id") != episode.get("station_id"): - continue + if key_station_only and episode.get("key_station_id") != episode.get("station_id"): + continue share_url = traverse_obj(episode, ("radiko_url", ("pc", "sp", "android", "ios", "app"), {url_or_none}), get_all=False) -- cgit v1.2.3-70-g09d2