mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-28 06:04:17 +01:00
fix error msg formating
This commit is contained in:
parent
3fc3fbc9ef
commit
493b01a856
@ -45,10 +45,10 @@ class Tv4play(Service, OpenGraphThumbMixin):
|
|||||||
elif code == "ASSET_PLAYBACK_INVALID_GEO_LOCATION":
|
elif code == "ASSET_PLAYBACK_INVALID_GEO_LOCATION":
|
||||||
yield ServiceError("Can't download this video because of geoblock.")
|
yield ServiceError("Can't download this video because of geoblock.")
|
||||||
else:
|
else:
|
||||||
yield ServiceError("Can't find any info for that video")
|
yield ServiceError("Can't find any info for that video.")
|
||||||
return
|
return
|
||||||
if data.status_code == 404:
|
if data.status_code == 404:
|
||||||
yield ServiceError("Can't find the video api")
|
yield ServiceError("Can't find the video api.")
|
||||||
return
|
return
|
||||||
xml = ET.XML(data.content)
|
xml = ET.XML(data.content)
|
||||||
ss = xml.find("items")
|
ss = xml.find("items")
|
||||||
@ -61,10 +61,10 @@ class Tv4play(Service, OpenGraphThumbMixin):
|
|||||||
if xml.find("live").text != "false":
|
if xml.find("live").text != "false":
|
||||||
self.options.live = True
|
self.options.live = True
|
||||||
if xml.find("drmProtected").text == "true":
|
if xml.find("drmProtected").text == "true":
|
||||||
yield ServiceError("We cant download DRM protected content from this site.")
|
yield ServiceError("We can't download DRM protected content from this site.")
|
||||||
return
|
return
|
||||||
if xml.find("playbackStatus").text == "NOT_STARTED":
|
if xml.find("playbackStatus").text == "NOT_STARTED":
|
||||||
yield ServiceError("Can't download something that is not started")
|
yield ServiceError("Can't download something that is not started.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.options.output_auto:
|
if self.options.output_auto:
|
||||||
@ -72,7 +72,7 @@ class Tv4play(Service, OpenGraphThumbMixin):
|
|||||||
self.options.service = "tv4play"
|
self.options.service = "tv4play"
|
||||||
basename = self._autoname(vid)
|
basename = self._autoname(vid)
|
||||||
if basename is None:
|
if basename is None:
|
||||||
yield ServiceError("Cant find vid id for autonaming")
|
yield ServiceError("Cant find vid id for autonaming.")
|
||||||
return
|
return
|
||||||
title = "{0}-{1}-{2}".format(basename, vid, self.options.service)
|
title = "{0}-{1}-{2}".format(basename, vid, self.options.service)
|
||||||
title = filenamify(title)
|
title = filenamify(title)
|
||||||
@ -82,7 +82,7 @@ class Tv4play(Service, OpenGraphThumbMixin):
|
|||||||
self.options.output = title
|
self.options.output = title
|
||||||
|
|
||||||
if self.exclude():
|
if self.exclude():
|
||||||
yield ServiceError("Excluding video")
|
yield ServiceError("Excluding video.")
|
||||||
return
|
return
|
||||||
|
|
||||||
for i in sa:
|
for i in sa:
|
||||||
|
Loading…
Reference in New Issue
Block a user