Browse Source

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.
pull/4261/head
voidstarstar 11 years ago
parent
commit
15a0131587
  1. 12
      couchpotato/core/plugins/renamer.py

12
couchpotato/core/plugins/renamer.py

@ -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))

Loading…
Cancel
Save