Userscript update ( Fix + New Provider )

Thanks to DxCx
This commit is contained in:
Ruud
2011-12-16 22:25:12 +01:00
parent 12ce6bc7ab
commit a6f9ad6330
2 changed files with 18 additions and 0 deletions
@@ -0,0 +1,6 @@
from .main import YouTheater
def start():
return YouTheater()
config = []
@@ -0,0 +1,12 @@
from couchpotato.core.providers.userscript.base import UserscriptBase
import re
class YouTheater(UserscriptBase):
id_re = re.compile("view\.php\?id=(\d+)")
includes = ['http://www.youtheater.com/view.php?id=*', 'http://youtheater.com/view.php?id=*',
'http://www.sratim.co.il/view.php?id=*', 'http://sratim.co.il/view.php?id=*']
def getMovie(self, url):
id = self.id_re.findall(url)[0]
url = "http://www.youtheater.com/view.php?id=%s" % id
return super(YouTheater, self).getMovie(url)