Proper automation for trakt watchlist

This commit is contained in:
Ruud
2012-04-08 17:10:54 +02:00
parent 41e97bbef5
commit 5aceb94915
3 changed files with 13 additions and 4 deletions
@@ -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)
+2 -1
View File
@@ -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', ''))