mirror of
https://github.com/ihabunek/twitch-dl
synced 2024-08-30 18:32:25 +00:00
parent
b982cba566
commit
bb16108572
@ -1,6 +1,11 @@
|
|||||||
Twitch Downloader change log
|
Twitch Downloader change log
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
1.12.0 (TBA)
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
* Added `source` as alias for best available quality (#33)
|
||||||
|
|
||||||
1.11.0 (2020-09-03)
|
1.11.0 (2020-09-03)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
@ -125,6 +125,12 @@ Specify video quality to download:
|
|||||||
twitch-dl download -q 720p 221837124
|
twitch-dl download -q 720p 221837124
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Setting quality to `source` will download the best available quality:
|
||||||
|
|
||||||
|
```
|
||||||
|
twitch-dl download -q source 221837124
|
||||||
|
```
|
||||||
|
|
||||||
Download a clip by slug or URL:
|
Download a clip by slug or URL:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -83,6 +83,10 @@ def _parse_playlists(playlists_m3u8):
|
|||||||
|
|
||||||
|
|
||||||
def _get_playlist_by_name(playlists, quality):
|
def _get_playlist_by_name(playlists, quality):
|
||||||
|
if quality == "source":
|
||||||
|
_, _, uri = playlists[0]
|
||||||
|
return uri
|
||||||
|
|
||||||
for name, _, uri in playlists:
|
for name, _, uri in playlists:
|
||||||
if name == quality:
|
if name == quality:
|
||||||
return uri
|
return uri
|
||||||
@ -193,6 +197,9 @@ def _get_clip_url(clip, args):
|
|||||||
|
|
||||||
# Quality given as an argument
|
# Quality given as an argument
|
||||||
if args.quality:
|
if args.quality:
|
||||||
|
if args.quality == "source":
|
||||||
|
return qualities[0]["sourceURL"]
|
||||||
|
|
||||||
selected_quality = args.quality.rstrip("p") # allow 720p as well as 720
|
selected_quality = args.quality.rstrip("p") # allow 720p as well as 720
|
||||||
for q in qualities:
|
for q in qualities:
|
||||||
if q["quality"] == selected_quality:
|
if q["quality"] == selected_quality:
|
||||||
|
@ -115,7 +115,7 @@ COMMANDS = [
|
|||||||
"default": False,
|
"default": False,
|
||||||
}),
|
}),
|
||||||
(["-q", "--quality"], {
|
(["-q", "--quality"], {
|
||||||
"help": "Video quality.",
|
"help": "Video quality, e.g. 720p. Set to 'source' to get best quality.",
|
||||||
"type": str,
|
"type": str,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user