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

Some minor code improvments

This commit is contained in:
qnorsten 2016-04-27 19:37:32 +02:00
parent 94e30130b3
commit 428d4c5022
2 changed files with 4 additions and 4 deletions

View File

@ -221,7 +221,7 @@ def get_one_media(stream, options):
if options.subtitle and options.get_url:
if options.get_all_subtitles:
for sub in subs[:]:
for sub in subs:
print(sub.url)
else:
print(subs[0].url)
@ -231,7 +231,7 @@ def get_one_media(stream, options):
if options.subtitle and options.output != "-" and not options.get_url:
if subs:
if options.get_all_subtitles:
for sub in subs[:]:
for sub in subs:
sub.download()
else:
subs[0].download()

View File

@ -11,7 +11,7 @@ import platform
class subtitle(object):
def __init__(self, options, subtype, url, subfix = ""):
def __init__(self, options, subtype, url, subfix = None):
self.url = url
self.subtitle = None
self.options = options
@ -39,7 +39,7 @@ class subtitle(object):
else:
data = subdata.text
if(self.subfix != ""):
ifself.subfix:
self.options.output = self.options.output + self.subfix
if platform.system() == "Windows" and is_py3: