Merge pull request #4261 from voidstarstar/develop_4211
Added renamer.progress API function. Fixes #4211.
This commit is contained in:
commit
1deb49b524
1 file changed
+12
@@ -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.scan', self.scan)
|
||||||
addEvent('renamer.check_snatched', self.checkSnatched)
|
addEvent('renamer.check_snatched', self.checkSnatched)
|
||||||
|
|
||||||
@@ -67,6 +74,11 @@ class Renamer(Plugin):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def getProgress(self, **kwargs):
|
||||||
|
return {
|
||||||
|
'progress': self.renaming_started
|
||||||
|
}
|
||||||
|
|
||||||
def scanView(self, **kwargs):
|
def scanView(self, **kwargs):
|
||||||
|
|
||||||
async = tryInt(kwargs.get('async', 0))
|
async = tryInt(kwargs.get('async', 0))
|
||||||
|
|||||||
Reference in new issue
Block a user