Saver search for imdb id in userscript

This commit is contained in:
Ruud
2012-04-07 14:05:50 +02:00
parent 4726a4684b
commit d0796ee423
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ log = CPLog(__name__)
class Userscript(Plugin):
version = 1
version = 2
def __init__(self):
addApiView('userscript.get/<path:filename>', self.getUserScript, static = True)
@@ -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+'/'))