Flexget icon indicating copy to clipboard operation
Flexget copied to clipboard

Aria2 jsonrpc support

Open RyoLee opened this issue 3 years ago • 0 comments

Motivation for changes:

  • Add support for JSON-RPC

Detailed changes:

  • Add configs:
    • scheme: http(default)/https
    • rpc_mode: xml(default)/json
    • rpc_path: rpc(default)
  • JSON-RPC client

Addressed issues:

  • Fixes #3460 .

Implemented feature requests:

  • N/A

Config usage if relevant (new plugin or updated schema):

web_server:
  bind: 0.0.0.0
  port: 5050
  web_ui: yes

tasks:
  SPYxFAMILY:
    rss: https://******
    accept_all: yes
    aria2:
        server: ******
        port: ******
        scheme: https
        secret: ******
        rpc_mode: json
        rpc_path: jsonrpc
        path: /downloads/Flexget
schedules:
  - tasks: '*'
    interval:
      minutes: 10

Log and/or tests output (preferably both):

flexget:

2022-07-31 03:46:43 INFO     web_server_daemon                 Running web server at IP 0.0.0.0:5050
2022-07-31 03:46:43 INFO     web_server_daemon                 Initiating API
2022-07-31 03:46:43 INFO     web_server_daemon                 Registering WebUI v2
2022-07-31 03:46:43 INFO     web_server                    Web server started at http://10.42.0.102:5050
2022-07-31 03:46:43 INFO     web_server                    API available at http://10.42.0.102:5050/api
2022-07-31 03:46:43 INFO     scheduler                     Starting scheduler
2022-07-31 03:46:43 INFO     web_server                    WebUI (v2) available at http://10.42.0.102:5050/
2022-07-31 03:46:49 INFO     aria2         SPYxFAMILY      Connecting to daemon at https://******:******/jsonrpc
2022-07-31 03:49:05 INFO     aria2         SPYxFAMILY      Connecting to daemon at https://******:******/jsonrpc
2022-07-31 03:59:10 INFO     aria2         SPYxFAMILY      Connecting to daemon at https://******:******/jsonrpc

aria2:

07/31 03:46:51 [NOTICE] Serialized session to '/config/aria2.session' successfully.

07/31 03:46:51 [NOTICE] Download complete: /downloads/Flexget/[诸神字幕组][间谍过家家][Spy x Family][12][简繁日语字幕][1080P][MKV HEVC].torrent

07/31 03:46:51 [NOTICE] Download complete: /downloads/Flexget/[诸神字幕组][间谍过家家][Spy x Family][10][简繁日语字幕][1080P][MKV HEVC].torrent
07/31 03:46:51 [WARRING] Skip delete. Task status invalid: complete
07/31 03:46:51 [WARRING] Skip delete. Task status invalid: complete
07/31 03:46:51 [INFO] General download task, skipped delete .torrent file.
07/31 03:46:51 [INFO] Deleting empty directory ...
07/31 03:46:51 [INFO] General download task, skipped delete .torrent file.
07/31 03:46:51 [INFO] Deleting empty directory ...

07/31 03:46:51 [NOTICE] Download complete: /downloads/Flexget/[诸神字幕组][间谍过家家][Spy x Family][09][简繁日语字幕][1080P][MKV HEVC].torrent
07/31 03:46:51 [WARRING] Skip delete. Task status invalid: complete
07/31 03:46:51 [INFO] General download task, skipped delete .torrent file.
07/31 03:46:51 [INFO] Deleting empty directory ...

To Do:

  • [x] ~~Testing requirements: XML-RPC client (I am using a custom version of Aria2, which prevents me from testing the XML-RPC client)~~ Tested
  • [ ] WS(and WSS) protocol support

RyoLee avatar Jul 31 '22 15:07 RyoLee