From 9472e93aa6ebe72429b2ba9ab66c9139bc700d14 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Wed, 29 Jan 2020 12:47:33 +1300 Subject: [PATCH 1/2] Add 8 digit imdb_id --- couchpotato/core/helpers/variable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/helpers/variable.py b/couchpotato/core/helpers/variable.py index a3dfff5..caa7b4f 100755 --- a/couchpotato/core/helpers/variable.py +++ b/couchpotato/core/helpers/variable.py @@ -194,7 +194,7 @@ def getImdb(txt, check_inside = False, multiple = False): output.close() try: - ids = re.findall('(tt\d{4,7})', txt) + ids = re.findall('(tt\d{4,8})', txt) if multiple: return removeDuplicate(['tt%07d' % tryInt(x[2:]) for x in ids]) if len(ids) > 0 else [] From 1945b075d27d8ceff54012c2d5cd2bfb093e7205 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Wed, 29 Jan 2020 12:49:10 +1300 Subject: [PATCH 2/2] add 8 digit imdb --- couchpotato/core/plugins/userscript/template.js_tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/userscript/template.js_tmpl b/couchpotato/core/plugins/userscript/template.js_tmpl index 25e1842..8023b18 100644 --- a/couchpotato/core/plugins/userscript/template.js_tmpl +++ b/couchpotato/core/plugins/userscript/template.js_tmpl @@ -100,7 +100,7 @@ var osd = function(){ // Try and get imdb url try { - var regex = new RegExp(/tt(\d{7})/); + var regex = new RegExp(/tt(\d{8})/); var imdb_id = document.body.innerHTML.match(regex)[0]; if (imdb_id) iframe.setAttribute('src', createApiUrl('http://imdb.com/title/'+imdb_id+'/'))