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

output.findexpisode: don’t crash if we don’t have an id

fixes: #1000
This commit is contained in:
Johan Andersson 2018-11-18 12:54:37 +01:00
parent 36116c7a3b
commit 72143b7172

View File

@ -221,7 +221,7 @@ def findexpisode(output, directory, name):
lsname, lsext = os.path.splitext(i)
if output["service"]:
if orgext[1:] in subtitlefiles:
if name.find(output["service"]) > 0 and lsname.find(output["service"]) > 0 and \
if output["id"] and name.find(output["service"]) > 0 and lsname.find(output["service"]) > 0 and \
name.find(output["id"]) > 0 and lsname.find(output["id"]) > 0 and \
orgext == lsext:
return True