Browse Source

Allow imdb id with int of 4-7

pull/2350/head
Ruud 12 years ago
parent
commit
1377b6315c
  1. 4
      couchpotato/core/helpers/variable.py

4
couchpotato/core/helpers/variable.py

@ -137,7 +137,7 @@ def getImdb(txt, check_inside = False, multiple = False):
output.close()
try:
ids = re.findall('(tt\d{7})', txt)
ids = re.findall('(tt\d{4,7})', txt)
if multiple:
return list(set(ids)) if len(ids) > 0 else []
return ids[0]
@ -146,7 +146,7 @@ def getImdb(txt, check_inside = False, multiple = False):
return False
def tryInt(s, default=0):
def tryInt(s, default = 0):
try: return int(s)
except: return default

Loading…
Cancel
Save