1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

svtplay: do not try to use ProgramTitle in filename if it is None

fix crash for svtplay, that occurs when generating automatic filename and ProgramTitle is undefined.
This commit is contained in:
qnorsten 2017-02-01 13:19:59 +01:00
parent a72282e44b
commit 95c668cbe0

View File

@ -179,7 +179,9 @@ class Svtplay(Service, OpenGraphThumbMixin):
def outputfilename(self, data, filename):
directory = os.path.dirname(filename)
name = filenamify(data["video"]["programTitle"])
name = None
if data["video"]["programTitle"]:
name = filenamify(data["video"]["programTitle"])
other = filenamify(data["video"]["title"])
if "programVersionId" in data["video"]: