From 7126b472601814b7fd8c9de02069e8fff1764891 Mon Sep 17 00:00:00 2001 From: bashonly <88596187+bashonly@users.noreply.github.com> Date: Sun, 23 Feb 2025 11:59:22 -0600 Subject: [PATCH] [ie/lbry] Raise appropriate error for non-media files (#12462) Closes #12182 Authored by: bashonly --- yt_dlp/extractor/lbry.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/lbry.py b/yt_dlp/extractor/lbry.py index 7b22f90e9b..b0a82be62b 100644 --- a/yt_dlp/extractor/lbry.py +++ b/yt_dlp/extractor/lbry.py @@ -26,6 +26,7 @@ class LBRYBaseIE(InfoExtractor): _CLAIM_ID_REGEX = r'[0-9a-f]{1,40}' _OPT_CLAIM_ID = f'[^$@:/?#&]+(?:[:#]{_CLAIM_ID_REGEX})?' _SUPPORTED_STREAM_TYPES = ['video', 'audio'] + _UNSUPPORTED_STREAM_TYPES = ['binary'] _PAGE_SIZE = 50 def _call_api_proxy(self, method, display_id, params, resource): @@ -341,7 +342,7 @@ class LBRYIE(LBRYBaseIE): HEADRequest(streaming_url), display_id, headers=headers, note='Downloading streaming redirect url info').url - elif result.get('value_type') == 'stream': + elif result.get('value_type') == 'stream' and stream_type not in self._UNSUPPORTED_STREAM_TYPES: claim_id, is_live = result['signing_channel']['claim_id'], True live_data = self._download_json( 'https://api.odysee.live/livestream/is_live', claim_id,