From d0796ee423798eb3587a02872177c74e6c0eb08a Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 7 Apr 2012 14:05:50 +0200 Subject: [PATCH] Saver search for imdb id in userscript --- couchpotato/core/plugins/userscript/main.py | 2 +- couchpotato/core/plugins/userscript/template.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/userscript/main.py b/couchpotato/core/plugins/userscript/main.py index 160d85ab..f3a6f5d7 100644 --- a/couchpotato/core/plugins/userscript/main.py +++ b/couchpotato/core/plugins/userscript/main.py @@ -16,7 +16,7 @@ log = CPLog(__name__) class Userscript(Plugin): - version = 1 + version = 2 def __init__(self): addApiView('userscript.get/', self.getUserScript, static = True) diff --git a/couchpotato/core/plugins/userscript/template.js b/couchpotato/core/plugins/userscript/template.js index 158638e7..d2d58adf 100644 --- a/couchpotato/core/plugins/userscript/template.js +++ b/couchpotato/core/plugins/userscript/template.js @@ -90,7 +90,7 @@ var osd = function(){ // Try and get imdb url try { - var regex = new RegExp(/tt(\d+)/); + var regex = new RegExp(/tt(\d{7})/); var imdb_id = document.body.innerHTML.match(regex)[0]; if (imdb_id) iframe.setAttribute('src', createApiUrl('http://imdb.com/title/'+imdb_id+'/'))