mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
Fix bug that get_thumbnail could never be called, due to overwrite of the stream variable.
This commit is contained in:
parent
57e51c8bb1
commit
71b40f975a
@ -174,26 +174,26 @@ def get_one_media(stream):
|
|||||||
list_quality(videos)
|
list_quality(videos)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
stream = select_quality(stream.config, videos)
|
fstream = select_quality(stream.config, videos)
|
||||||
if stream.config.get("get_url"):
|
if fstream.config.get("get_url"):
|
||||||
print(stream.url)
|
print(fstream.url)
|
||||||
return
|
return
|
||||||
logging.info("Selected to download %s, bitrate: %s", stream.name, stream.bitrate)
|
logging.info("Selected to download %s, bitrate: %s", fstream.name, fstream.bitrate)
|
||||||
stream.download()
|
fstream.download()
|
||||||
except UIException as e:
|
except UIException as e:
|
||||||
if stream.config.get("verbose"):
|
if fstream.config.get("verbose"):
|
||||||
raise e
|
raise e
|
||||||
log.error(e)
|
log.error(e)
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
if stream.config.get("thumbnail") and hasattr(stream, "get_thumbnail"):
|
if fstream.config.get("thumbnail") and hasattr(stream, "get_thumbnail"):
|
||||||
stream.get_thumbnail(stream.config)
|
stream.get_thumbnail(stream.config)
|
||||||
post = postprocess(stream, stream.config, subfixes)
|
post = postprocess(fstream, fstream.config, subfixes)
|
||||||
if stream.audio and post.detect:
|
if fstream.audio and post.detect:
|
||||||
post.merge()
|
post.merge()
|
||||||
if stream.audio and not post.detect and stream.finished:
|
if fstream.audio and not post.detect and fstream.finished:
|
||||||
logging.warning("Cant find ffmpeg/avconv. audio and video is in seperate files. if you dont want this use -P hls or hds")
|
logging.warning("Cant find ffmpeg/avconv. audio and video is in seperate files. if you dont want this use -P hls or hds")
|
||||||
if stream.name == "hls" or stream.config.get("remux"):
|
if fstream.name == "hls" or fstream.config.get("remux"):
|
||||||
post.remux()
|
post.remux()
|
||||||
if stream.config.get("silent_semi") and stream.finished:
|
if fstream.config.get("silent_semi") and fstream.finished:
|
||||||
logging.log(25, "Download of %s was completed" % stream.options.output)
|
logging.log(25, "Download of %s was completed" % fstream.options.output)
|
||||||
|
Loading…
Reference in New Issue
Block a user