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+'/'))