From e05a7cd2117e420e9add915713d65f43841a976e Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Sun, 12 Oct 2014 21:19:22 +0200 Subject: [PATCH] Get rid of some unnecessary thumbnail related output Also, this change also makes svtplay-dl print an error if thumbnail was requested but we write to stdout (--output -). --- lib/svtplay_dl/__init__.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/svtplay_dl/__init__.py b/lib/svtplay_dl/__init__.py index a2cca1d..b43998e 100644 --- a/lib/svtplay_dl/__init__.py +++ b/lib/svtplay_dl/__init__.py @@ -147,14 +147,12 @@ def get_one_media(stream, options): 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) - else: - log.debug("no thumb requested") + if options.thumbnail and hasattr(stream, "get_thumbnail"): + if options.output != "-": + log.info("Getting thumbnail") + stream.get_thumbnail(options) + else: + log.warning("Can not get thumbnail when fetching to stdout") def setup_log(silent, verbose=False):