Merge pull request #4261 from voidstarstar/develop_4211

Added renamer.progress API function. Fixes #4211.
This commit is contained in:
Ruud Burger
2014-12-01 15:12:21 +01:00
+12
View File
@@ -44,6 +44,13 @@ class Renamer(Plugin):
},
})
addApiView('renamer.progress', self.getProgress, docs = {
'desc': 'Get the progress of current renamer scan',
'return': {'type': 'object', 'example': """{
'progress': False || True,
}"""},
})
addEvent('renamer.scan', self.scan)
addEvent('renamer.check_snatched', self.checkSnatched)
@@ -67,6 +74,11 @@ class Renamer(Plugin):
return True
def getProgress(self, **kwargs):
return {
'progress': self.renaming_started
}
def scanView(self, **kwargs):
async = tryInt(kwargs.get('async', 0))