Browse Source

Runtime missing first hour. fix #308

pull/381/merge
Ruud 13 years ago
parent
commit
c6a1a19bf0
  1. 4
      couchpotato/core/providers/movie/imdbapi/main.py

4
couchpotato/core/providers/movie/imdbapi/main.py

@ -110,10 +110,10 @@ class IMDBAPI(MovieProvider):
def runtimeToMinutes(self, runtime_str):
runtime = 0
regex = '(\d*.?\d+).(hr|hrs|mins|min)+'
regex = '(\d*.?\d+).(h|hr|hrs|mins|min)+'
matches = re.findall(regex, runtime_str)
for match in matches:
nr, size = match
runtime += tryInt(nr) * (60 if 'hr' in str(size) else 1)
runtime += tryInt(nr) * (60 if 'h' is str(size)[0] else 1)
return runtime

Loading…
Cancel
Save