mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 05:24:43 +00:00
IMP: (#691) option to pas scan directory via api
This commit is contained in:
parent
6fc3443af4
commit
c54906132b
2 changed files with 16 additions and 2 deletions
|
@ -50,7 +50,8 @@ queueIssue&id=$issueid (Mark an issue as wanted and start the search.
|
|||
unqueueIssue&id=$issueid (Unmark issue as wanted / i.e. mark as skipped)
|
||||
|
||||
forceSearch (force search for wanted issues - not launched in a separate thread so it may take a bit to complete)
|
||||
forceProcess (force post process issues in download directory - also not launched in a separate thread)
|
||||
forceProcess&nzb_name&nzb_folder (force post process issues in download directory - also not launched in a separate thread
|
||||
for manual run set nzb_name to 'Manual+Run')
|
||||
|
||||
getVersion (Returns some version information: git_path, install_type, current_version, installed_version, commits_behind
|
||||
checkGithub (updates the version information above and returns getVersion data)
|
||||
|
|
15
mylar/api.py
15
mylar/api.py
|
@ -240,7 +240,20 @@ class Api(object):
|
|||
search.searchforissue()
|
||||
|
||||
def _forceProcess(self, **kwargs):
|
||||
PostProcessor.forcePostProcess()
|
||||
if 'nzb_name' not in kwargs:
|
||||
self.data = 'Missing parameter: nzb_name'
|
||||
return
|
||||
else:
|
||||
self.nzb_name = kwargs['nzb_name']
|
||||
|
||||
if 'nzb_folder' not in kwargs:
|
||||
self.data = 'Missing parameter: nzb_folder'
|
||||
return
|
||||
else:
|
||||
self.nzb_folder = kwargs['nzb_folder']
|
||||
|
||||
forceProcess = PostProcessor.PostProcessor(self.nzb_name, self.nzb_folder)
|
||||
forceProcess.Process()
|
||||
|
||||
def _getVersion(self, **kwargs):
|
||||
self.data = {
|
||||
|
|
Loading…
Reference in a new issue