From c6a1a19bf035249e6d316a65749b024de04eae88 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 19 May 2012 19:27:24 +0200 Subject: [PATCH] Runtime missing first hour. fix #308 --- couchpotato/core/providers/movie/imdbapi/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/providers/movie/imdbapi/main.py b/couchpotato/core/providers/movie/imdbapi/main.py index 7aa3d978..7456a3c9 100644 --- a/couchpotato/core/providers/movie/imdbapi/main.py +++ b/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