Add "I Just Watched" Reddit to userscripts. fix #2621
This commit is contained in:
1 parent
3172a4d030
commit
9e471ac389
2 files changed
+24
No files matched your search
@@ -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