1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-28 06:04:17 +01:00

get_one_media: added missing checks if subtitles exists before trying to print url using -g

This commit is contained in:
qnorsten 2016-05-05 09:46:12 +02:00
parent 5871f81695
commit f807f48b7a

View File

@ -225,11 +225,12 @@ def get_one_media(stream, options):
return
if options.subtitle and options.get_url:
if options.get_all_subtitles:
for sub in subs:
print(sub.url)
else:
print(subs[0].url)
if subs:
if options.get_all_subtitles:
for sub in subs:
print(sub.url)
else:
print(subs[0].url)
if options.force_subtitle:
return