Added renamer.progress API function. Fixes #4211.
This function reports the status of the renamer. Progress value True means the renamer is currently running. Progress value False means the renamer is not currently running.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user