Allow unknown keywords for all api calls. fix #1881
This commit is contained in:
@@ -79,7 +79,7 @@ class FileManager(Plugin):
|
||||
except:
|
||||
log.error('Failed removing unused file: %s', traceback.format_exc())
|
||||
|
||||
def showCacheFile(self, route):
|
||||
def showCacheFile(self, route, **kwargs):
|
||||
Env.get('app').add_handlers(".*$", [('%s%s' % (Env.get('api_base'), route), StaticFileHandler, {'path': Env.get('cache_dir')})])
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ class FileManager(Plugin):
|
||||
|
||||
return types
|
||||
|
||||
def getTypesView(self):
|
||||
def getTypesView(self, **kwargs):
|
||||
|
||||
return {
|
||||
'types': self.getTypes()
|
||||
|
||||
@@ -114,7 +114,7 @@ class Logging(Plugin):
|
||||
'log': '[0m\n'.join(log_lines),
|
||||
}
|
||||
|
||||
def clear(self):
|
||||
def clear(self, **kwargs):
|
||||
|
||||
for x in range(0, 50):
|
||||
path = '%s%s' % (Env.get('log_path'), '.%s' % x if x > 0 else '')
|
||||
|
||||
@@ -47,7 +47,7 @@ class Manage(Plugin):
|
||||
if not Env.get('dev'):
|
||||
addEvent('app.load', self.updateLibraryQuick)
|
||||
|
||||
def getProgress(self):
|
||||
def getProgress(self, **kwargs):
|
||||
return {
|
||||
'progress': self.in_progress
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ class MoviePlugin(Plugin):
|
||||
|
||||
db.expire_all()
|
||||
|
||||
def getView(self, id = None):
|
||||
def getView(self, id = None, **kwargs):
|
||||
|
||||
movie = self.get(id) if id else None
|
||||
|
||||
@@ -298,7 +298,7 @@ class MoviePlugin(Plugin):
|
||||
'chars': chars,
|
||||
}
|
||||
|
||||
def refresh(self, id = ''):
|
||||
def refresh(self, id = '', **kwargs):
|
||||
|
||||
db = get_session()
|
||||
|
||||
@@ -320,7 +320,7 @@ class MoviePlugin(Plugin):
|
||||
'success': True,
|
||||
}
|
||||
|
||||
def search(self, q = ''):
|
||||
def search(self, q = '', **kwargs):
|
||||
|
||||
cache_key = u'%s/%s' % (__name__, simplifyString(q))
|
||||
movies = Env.get('cache').get(cache_key)
|
||||
|
||||
@@ -45,7 +45,7 @@ class ProfilePlugin(Plugin):
|
||||
movie.profile_id = default_profile.get('id')
|
||||
db.commit()
|
||||
|
||||
def allView(self):
|
||||
def allView(self, **kwargs):
|
||||
|
||||
return {
|
||||
'success': True,
|
||||
@@ -128,7 +128,7 @@ class ProfilePlugin(Plugin):
|
||||
'success': True
|
||||
}
|
||||
|
||||
def delete(self, id = None):
|
||||
def delete(self, id = None, **kwargs):
|
||||
|
||||
db = get_session()
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class QualityPlugin(Plugin):
|
||||
def preReleases(self):
|
||||
return self.pre_releases
|
||||
|
||||
def allView(self):
|
||||
def allView(self, **kwargs):
|
||||
|
||||
return {
|
||||
'success': True,
|
||||
|
||||
@@ -57,7 +57,7 @@ class Searcher(Plugin):
|
||||
def setCrons(self):
|
||||
fireEvent('schedule.cron', 'searcher.all', self.allMovies, day = self.conf('cron_day'), hour = self.conf('cron_hour'), minute = self.conf('cron_minute'))
|
||||
|
||||
def allMoviesView(self):
|
||||
def allMoviesView(self, **kwargs):
|
||||
|
||||
in_progress = self.in_progress
|
||||
if not in_progress:
|
||||
@@ -70,7 +70,7 @@ class Searcher(Plugin):
|
||||
'success': not in_progress
|
||||
}
|
||||
|
||||
def getProgress(self):
|
||||
def getProgress(self, **kwargs):
|
||||
|
||||
return {
|
||||
'progress': self.in_progress
|
||||
|
||||
@@ -41,7 +41,7 @@ class StatusPlugin(Plugin):
|
||||
}"""}
|
||||
})
|
||||
|
||||
def list(self):
|
||||
def list(self, **kwargs):
|
||||
|
||||
return {
|
||||
'success': True,
|
||||
|
||||
@@ -35,14 +35,14 @@ class Userscript(Plugin):
|
||||
|
||||
return self.renderTemplate(__file__, 'bookmark.js', **params)
|
||||
|
||||
def getIncludes(self):
|
||||
def getIncludes(self, **kwargs):
|
||||
|
||||
return {
|
||||
'includes': fireEvent('userscript.get_includes', merge = True),
|
||||
'excludes': fireEvent('userscript.get_excludes', merge = True),
|
||||
}
|
||||
|
||||
def getUserScript(self, route):
|
||||
def getUserScript(self, route, **kwargs):
|
||||
|
||||
klass = self
|
||||
|
||||
|
||||
Reference in New Issue
Block a user