Add "I Just Watched" Reddit to userscripts. fix #2621
This commit is contained in:
@@ -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'))
|
||||
Reference in New Issue
Block a user