3 changed files with 27 additions and 1 deletions
@ -0,0 +1,7 @@ |
|||
from .main import Reddit |
|||
|
|||
|
|||
def start(): |
|||
return Reddit() |
|||
|
|||
config = [] |
@ -0,0 +1,17 @@ |
|||
from couchpotato import fireEvent |
|||
from couchpotato.core.helpers.variable import splitString |
|||
from couchpotato.core.providers.userscript.base import UserscriptBase |
|||
|
|||
|
|||
class Reddit(UserscriptBase): |
|||
|
|||
includes = ['*://www.reddit.com/r/Ijustwatched/comments/*'] |
|||
|
|||
def getMovie(self, url): |
|||
name = splitString(url, '/')[-1] |
|||
if name.startswith('ijw_'): |
|||
name = name[4:] |
|||
|
|||
year_name = fireEvent('scanner.name_year', name, single = True) |
|||
|
|||
return self.search(year_name.get('name'), year_name.get('year')) |
Loading…
Reference in new issue