Runtime missing first hour. fix #308

This commit is contained in:
Ruud committed 2012-05-19 19:27:24 +02:00
1 parent a4dec10796
commit c6a1a19bf0
1 file changed
+2 -2
@@ -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