Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add postprocess apiv2 endpoint #9212

Merged
merged 1 commit into from
Feb 13, 2021
Merged

Conversation

p0psicles
Copy link
Contributor

@p0psicles p0psicles commented Feb 12, 2021

  • PR is based on the DEVELOP branch
  • Don't send big changes all at once. Split up big PRs into multiple smaller PRs that are easier to manage and review
  • Read the contribution guide

Will add endpoints:
GET: /apiv2/postprocess
GET: /apiv2/postprocess/[identifier]
POST: /apiv2/postprocess (with body params)

example body:

{
  "proc_dir": "D:\\pp",
  "resource": "",
  "process_method": "copy",
  "force": true,
  "is_priority": true,
  "delete_on": true,
  "failed": true,
  "proc_type": "auto",
  "ignore_subs": true
}

example POST: /apiv2/postprocess

{
    "status": "success",
    "message": "Post process action queued",
    "queueItem": {
        "identifier": "26c9708f-772d-4a8c-93b9-9ee4d168005c",
        "name": "POST-PROCESS",
        "priority": 20,
        "actionId": 0,
        "queueTime": "2021-02-12 14:32:46.653856",
        "success": null,
        "inProgress": false,
        "startTime": null,
        "updateTime": "2021-02-12 14:32:46.653856",
        "force": false,
        "config": {
            "path": "D:\\pp",
            "info_hash": null,
            "resource_name": "",
            "force": false,
            "is_priority": false,
            "process_method": "copy",
            "delete_on": false,
            "failed": false,
            "proc_type": false,
            "ignore_subs": false
        }
    }
}

Example GET: apiv2/postprocess/57e9522e-2e7d-474e-9af3-65c135dc9465

{
    "identifier": "57e9522e-2e7d-474e-9af3-65c135dc9465",
    "name": "POST-PROCESS",
    "priority": 20,
    "actionId": 0,
    "queueTime": "2021-02-12 14:31:53.923914",
    "success": true,
    "inProgress": false,
    "startTime": "2021-02-12 14:31:54.763323",
    "updateTime": "2021-02-12 14:33:06.518913",
    "force": false,
    "config": {
        "path": "D:\\pp",
        "info_hash": null,
        "resource_name": "",
        "force": false,
        "is_priority": false,
        "process_method": "copy",
        "delete_on": false,
        "failed": false,
        "proc_type": false,
        "ignore_subs": false
    },
    "output": [
        "Processing path: D:\\pp",
        "No resource_name passed, using path [D:\\pp] to process as a source folder",
        "Processing folder: D:\\pp",
        "Post-processing files: ['Arrow S08E05 1080p WEBDL.mkv']",
        "Post-processing video files: ['Arrow S08E05 1080p WEBDL.mkv']",
        "You're trying to post-process an automatically searched file that has already been processed, skipping: Arrow S08E05 1080p WEBDL.mkv",
        "Skipping already processed file: Arrow S08E05 1080p WEBDL.mkv",
        "Post-processing completed."
    ]
}

@p0psicles
Copy link
Contributor Author

p0psicles commented Feb 12, 2021

@clinton-hall let's have a chat in the near future, on how to implement this?

@medariox medariox merged commit d385094 into develop Feb 13, 2021
@medariox medariox deleted the feature/add-pp-apiv2-endpoint branch February 13, 2021 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants