1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

get_one_media: dont try to run exclude on exceptions

This commit is contained in:
Johan Andersson 2018-05-31 00:19:34 +02:00
parent 89104b830e
commit 12021ee355

View File

@ -102,7 +102,9 @@ def get_one_media(stream):
streams = stream.get() streams = stream.get()
try: try:
for i in streams: for i in streams:
if not exclude(stream.config, formatname(i.output, stream.config)): if isinstance(i, Exception):
error.append(i)
elif not exclude(stream.config, formatname(i.output, stream.config)):
if isinstance(i, VideoRetriever): if isinstance(i, VideoRetriever):
if stream.config.get("preferred"): if stream.config.get("preferred"):
if stream.config.get("preferred").lower() == i.name: if stream.config.get("preferred").lower() == i.name:
@ -111,8 +113,6 @@ def get_one_media(stream):
videos.append(i) videos.append(i)
if isinstance(i, subtitle): if isinstance(i, subtitle):
subs.append(i) subs.append(i)
if isinstance(i, Exception):
error.append(i)
except Exception as e: except Exception as e:
if stream.config.get("verbose"): if stream.config.get("verbose"):
raise raise