1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-07-19 01:16:40 +00:00

[ie/hotstar] Improve error handling (#13727)

Authored by: bashonly
This commit is contained in:
bashonly 2025-07-14 12:24:52 -05:00 committed by GitHub
parent d57a0b5aa7
commit 7e0af2b1f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -383,10 +383,13 @@ class HotStarIE(HotStarBaseIE):
formats.extend(current_formats) formats.extend(current_formats)
subs = self._merge_subtitles(subs, current_subs) subs = self._merge_subtitles(subs, current_subs)
if not formats and geo_restricted: if not formats:
if geo_restricted:
self.raise_geo_restricted(countries=['IN'], metadata_available=True) self.raise_geo_restricted(countries=['IN'], metadata_available=True)
elif not formats and has_drm: elif has_drm:
self.report_drm(video_id) self.report_drm(video_id)
elif not self._has_active_subscription(cookies, st):
self.raise_no_formats('Your account does not have access to this content', expected=True)
self._remove_duplicate_formats(formats) self._remove_duplicate_formats(formats)
for f in formats: for f in formats:
f.setdefault('http_headers', {}).update(headers) f.setdefault('http_headers', {}).update(headers)