Browse Source

Saver search for imdb id in userscript

pull/110/head
Ruud 13 years ago
parent
commit
d0796ee423
  1. 2
      couchpotato/core/plugins/userscript/main.py
  2. 2
      couchpotato/core/plugins/userscript/template.js

2
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/<path:filename>', self.getUserScript, static = True)

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

Loading…
Cancel
Save