mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 03:01:25 +01:00
Compare commits
No commits in common. "68c8d0bb729eefda4610eec2c6a15820b326e783" and "ada47b67ebf7c0632ffb8aa20812be6ece6c2145" have entirely different histories.
68c8d0bb72
...
ada47b67eb
|
@ -1889,7 +1889,7 @@ The following extractors use this feature:
|
||||||
* `type`: Type(s) of game replays to extract. Valid types are: `full_game`, `full_game_spanish`, `condensed_game` and `all_22`. You can use `all` to extract all available replay types, which is the default
|
* `type`: Type(s) of game replays to extract. Valid types are: `full_game`, `full_game_spanish`, `condensed_game` and `all_22`. You can use `all` to extract all available replay types, which is the default
|
||||||
|
|
||||||
#### jiosaavn
|
#### jiosaavn
|
||||||
* `bitrate`: Audio bitrates to request. One or more of `16`, `32`, `64`, `128`, `320`. Default is `128,320`
|
* `bitrate`: Which bitrates to request. Valid options are `16`, `32`, `64`, `128`, and `320` or a comma-separated list of these values. Defaults to `128,320`.
|
||||||
|
|
||||||
**Note**: These options may be changed/removed in the future without concern for backward compatibility
|
**Note**: These options may be changed/removed in the future without concern for backward compatibility
|
||||||
|
|
||||||
|
|
|
@ -37,15 +37,12 @@ class JioSaavnSongIE(JioSaavnBaseIE):
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
_VALID_BITRATES = ('16', '32', '64', '128', '320')
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
audio_id = self._match_id(url)
|
audio_id = self._match_id(url)
|
||||||
|
|
||||||
extract_bitrates = self._configuration_arg('bitrate', ['128', '320'], ie_key='JioSaavn')
|
extract_bitrates = self._configuration_arg('bitrate', ['128', '320'], ie_key='JioSaavn')
|
||||||
if invalid_bitrates := [br for br in extract_bitrates if br not in self._VALID_BITRATES]:
|
if not all(bitrate in ('16', '32', '64', '128', '320') for bitrate in extract_bitrates):
|
||||||
raise ValueError(
|
raise ValueError(f'Invalid bitrate(s) {extract_bitrates}')
|
||||||
f'Invalid bitrate(s): {", ".join(invalid_bitrates)}. '
|
|
||||||
+ f'Valid bitrates are: {", ".join(self._VALID_BITRATES)}')
|
|
||||||
|
|
||||||
song_data = self._extract_initial_data(url, audio_id)['song']['song']
|
song_data = self._extract_initial_data(url, audio_id)['song']['song']
|
||||||
formats = []
|
formats = []
|
||||||
|
@ -68,7 +65,6 @@ class JioSaavnSongIE(JioSaavnBaseIE):
|
||||||
'abr': int(bitrate),
|
'abr': int(bitrate),
|
||||||
'vcodec': 'none',
|
'vcodec': 'none',
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': audio_id,
|
'id': audio_id,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user