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

subtitle: don’t crash if we cant download subtitle

show a warning that we cant download it.
This commit is contained in:
Johan Andersson 2016-11-14 21:51:39 +01:00
parent ee67996d1c
commit b08d593556

View File

@ -21,7 +21,10 @@ class subtitle(object):
def download(self):
subdata = self.http.request("get", self.url, cookies=self.options.cookies)
if subdata.status_code != 200:
log.warning("Can't download subtitle file")
return
data = None
if self.subtype == "tt":