diff options
author | Ashish Gupta <39122144+Ashish0804@users.noreply.github.com> | 2021-11-18 21:30:48 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 21:30:48 +0530 |
commit | 525d9e0c7d4e8e1ad121d75f14ae40e8ee023079 (patch) | |
tree | 1c88d5b9a5a49693e68ec85d7a8a39186494e342 /yt_dlp/extractor/hotstar.py | |
parent | 9d63137eac4a5753dae775712599dc5c7adb0e8c (diff) | |
download | hypervideo-pre-525d9e0c7d4e8e1ad121d75f14ae40e8ee023079.tar.lz hypervideo-pre-525d9e0c7d4e8e1ad121d75f14ae40e8ee023079.tar.xz hypervideo-pre-525d9e0c7d4e8e1ad121d75f14ae40e8ee023079.zip |
[HotStar] Set language field from tags (#1700)
Authored by: Ashish0804
Diffstat (limited to 'yt_dlp/extractor/hotstar.py')
-rw-r--r-- | yt_dlp/extractor/hotstar.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/yt_dlp/extractor/hotstar.py b/yt_dlp/extractor/hotstar.py index 12e6c53d4..0bdf772a1 100644 --- a/yt_dlp/extractor/hotstar.py +++ b/yt_dlp/extractor/hotstar.py @@ -230,6 +230,11 @@ class HotStarIE(HotStarBaseIE): if tags and 'encryption:plain' not in tags: for f in current_formats: f['has_drm'] = True + if tags and 'language' in tags: + lang = re.search(r'language:(?P<lang>[a-z]+)', tags).group('lang') + for f in current_formats: + if not f.get('langauge'): + f['language'] = lang formats.extend(current_formats) subs = self._merge_subtitles(subs, current_subs) if not formats and geo_restricted: |