mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Syno ds patch 1 (#1702)
* Add Syno DS parsing #1671 as per https://forum.synology.com/enu/viewtopic.php?f=38&t=92856 * add config guidance * add syno client
This commit is contained in:
parent
0827c5bafe
commit
b793ce7933
9 changed files with 487 additions and 2 deletions
|
@ -14,12 +14,14 @@ from .deluge import configure_client as deluge_client
|
|||
from .qbittorrent import configure_client as qbittorrent_client
|
||||
from .transmission import configure_client as transmission_client
|
||||
from .utorrent import configure_client as utorrent_client
|
||||
from .synology import configure_client as synology_client
|
||||
|
||||
torrent_clients = {
|
||||
'deluge': deluge_client,
|
||||
'qbittorrent': qbittorrent_client,
|
||||
'transmission': transmission_client,
|
||||
'utorrent': utorrent_client,
|
||||
'synods': synology_client,
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,6 +41,8 @@ def pause_torrent(client_agent, input_hash, input_id, input_name):
|
|||
core.TORRENT_CLASS.stop(input_hash)
|
||||
if client_agent == 'transmission' and core.TORRENT_CLASS != '':
|
||||
core.TORRENT_CLASS.stop_torrent(input_id)
|
||||
if client_agent == 'synods' and core.TORRENT_CLASS != '':
|
||||
core.TORRENT_CLASS.pause_task(input_id)
|
||||
if client_agent == 'deluge' and core.TORRENT_CLASS != '':
|
||||
core.TORRENT_CLASS.core.pause_torrent([input_id])
|
||||
if client_agent == 'qbittorrent' and core.TORRENT_CLASS != '':
|
||||
|
@ -57,6 +61,8 @@ def resume_torrent(client_agent, input_hash, input_id, input_name):
|
|||
core.TORRENT_CLASS.start(input_hash)
|
||||
if client_agent == 'transmission' and core.TORRENT_CLASS != '':
|
||||
core.TORRENT_CLASS.start_torrent(input_id)
|
||||
if client_agent == 'synods' and core.TORRENT_CLASS != '':
|
||||
core.TORRENT_CLASS.resume_task(input_id)
|
||||
if client_agent == 'deluge' and core.TORRENT_CLASS != '':
|
||||
core.TORRENT_CLASS.core.resume_torrent([input_id])
|
||||
if client_agent == 'qbittorrent' and core.TORRENT_CLASS != '':
|
||||
|
@ -75,6 +81,8 @@ def remove_torrent(client_agent, input_hash, input_id, input_name):
|
|||
core.TORRENT_CLASS.remove(input_hash)
|
||||
if client_agent == 'transmission' and core.TORRENT_CLASS != '':
|
||||
core.TORRENT_CLASS.remove_torrent(input_id, True)
|
||||
if client_agent == 'synods' and core.TORRENT_CLASS != '':
|
||||
core.TORRENT_CLASS.delete_task(input_id)
|
||||
if client_agent == 'deluge' and core.TORRENT_CLASS != '':
|
||||
core.TORRENT_CLASS.core.remove_torrent(input_id, True)
|
||||
if client_agent == 'qbittorrent' and core.TORRENT_CLASS != '':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue