diff --git a/couchpotato/core/plugins/renamer.py b/couchpotato/core/plugins/renamer.py index bd8f14f..d0720d0 100755 --- a/couchpotato/core/plugins/renamer.py +++ b/couchpotato/core/plugins/renamer.py @@ -45,6 +45,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) @@ -68,6 +75,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))