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:
parent
94e30130b3
commit
428d4c5022
@ -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()
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user