Proper automation for trakt watchlist
This commit is contained in:
@@ -16,21 +16,27 @@ config = [{
|
||||
{
|
||||
'name': 'year',
|
||||
'default': 2011,
|
||||
'Label': 'Year',
|
||||
'type': 'int',
|
||||
},
|
||||
{
|
||||
'name': 'votes',
|
||||
'default': 1000,
|
||||
'Label': 'Votes',
|
||||
'type': 'int',
|
||||
},
|
||||
{
|
||||
'name': 'rating',
|
||||
'default': 6.0,
|
||||
'Label': 'Rating',
|
||||
'type': 'float',
|
||||
},
|
||||
{
|
||||
'name': 'hour',
|
||||
'advanced': True,
|
||||
'default': 12,
|
||||
'label': 'Check every',
|
||||
'type': 'int',
|
||||
'unit': 'hours',
|
||||
'description': 'hours',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -10,6 +10,8 @@ class Automation(Plugin):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
fireEvent('schedule.interval', 'updater.check', self.addMovies, hours = self.conf('hour', default = 12))
|
||||
|
||||
if not Env.get('dev'):
|
||||
addEvent('app.load', self.addMovies)
|
||||
|
||||
|
||||
@@ -264,7 +264,8 @@ class MoviePlugin(Plugin):
|
||||
if not m:
|
||||
m = Movie(
|
||||
library_id = library.get('id'),
|
||||
profile_id = params.get('profile_id', default_profile.get('id'))
|
||||
profile_id = params.get('profile_id', default_profile.get('id')),
|
||||
status_id = status_active.get('id'),
|
||||
)
|
||||
db.add(m)
|
||||
fireEvent('library.update', params.get('identifier'), default_title = params.get('title', ''))
|
||||
|
||||
Reference in New Issue
Block a user