1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

get_one_media: display error message when we can’t find any videos.

This commit is contained in:
Johan Andersson 2014-06-23 21:24:34 +02:00
parent 507cf21e3d
commit 402fca5bfc

View File

@ -120,24 +120,26 @@ def get_one_media(stream, options):
if options.force_subtitle:
return
if len(videos) > 0:
stream = select_quality(options, videos)
try:
stream.download()
except UIException as e:
if options.verbose:
raise e
log.error(e.message)
sys.exit(2)
stream = select_quality(options, videos)
try:
stream.download()
except UIException as e:
if options.verbose:
raise e
log.error(e.message)
sys.exit(2)
if options.thumbnail:
if hasattr(stream, "get_thumbnail"):
log.info("thumb requested")
if options.output != "-":
log.info("getting thumbnail")
stream.get_thumbnail(options)
if options.thumbnail:
if hasattr(stream, "get_thumbnail"):
log.info("thumb requested")
if options.output != "-":
log.info("getting thumbnail")
stream.get_thumbnail(options)
else:
log.info("no thumb requested")
else:
log.info("no thumb requested")
log.error("Can't find any streams for that url")
else:
log.error("Can't find any streams for that url")