Automation base
Working IMDB Watchlists
This commit is contained in:
1 parent
a1065a5fd0
commit
f3887aaa44
12 files changed
+239
No files matched your search
@@ -0,0 +1,6 @@
|
||||
from .main import Automation
|
||||
|
||||
def start():
|
||||
return Automation()
|
||||
|
||||
config = []
|
||||
@@ -0,0 +1,20 @@
|
||||
from couchpotato.core.event import addEvent, fireEvent
|
||||
from couchpotato.core.logger import CPLog
|
||||
from couchpotato.core.plugins.base import Plugin
|
||||
from couchpotato.environment import Env
|
||||
|
||||
log = CPLog(__name__)
|
||||
|
||||
|
||||
class Automation(Plugin):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
if not Env.setting('development'):
|
||||
addEvent('app.load', self.addMovies)
|
||||
|
||||
def addMovies(self):
|
||||
|
||||
movies = fireEvent('automation.get_movies', merge = True)
|
||||
for imdb_id in movies:
|
||||
fireEvent('movie.add', params = {'identifier': imdb_id}, force_readd = False)
|
||||
Reference in new issue
Block a user