mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
Refactor QBITTORENT*
This commit is contained in:
parent
1aa0ea6e75
commit
182a542bda
2 changed files with 12 additions and 12 deletions
|
@ -164,10 +164,10 @@ DELUGE_PORT = None
|
|||
DELUGE_USER = None
|
||||
DELUGE_PASSWORD = None
|
||||
|
||||
QBITTORRENTHOST = None
|
||||
QBITTORRENTPORT = None
|
||||
QBITTORRENTUSR = None
|
||||
QBITTORRENTPWD = None
|
||||
QBITTORRENT_HOST = None
|
||||
QBITTORRENT_PORT = None
|
||||
QBITTORRENT_USER = None
|
||||
QBITTORRENT_PASSWORD = None
|
||||
|
||||
PLEXSSL = None
|
||||
PLEXHOST = None
|
||||
|
@ -269,7 +269,7 @@ def initialize(section=None):
|
|||
DELETE_ORIGINAL, TORRENT_CHMOD_DIRECTORY, PASSWORDSFILE, USER_DELAY, USER_SCRIPT, USER_SCRIPT_CLEAN, USER_SCRIPT_MEDIAEXTENSIONS, \
|
||||
USER_SCRIPT_PARAM, USER_SCRIPT_RUNONCE, USER_SCRIPT_SUCCESSCODES, DOWNLOADINFO, CHECK_MEDIA, SAFE_MODE, \
|
||||
TORRENT_DEFAULTDIR, TORRENT_RESUME_ON_FAILURE, NZB_DEFAULTDIR, REMOTEPATHS, LOG_ENV, PID_FILE, MYAPP, ACHANNELS, ACHANNELS2, ACHANNELS3, \
|
||||
PLEXSSL, PLEXHOST, PLEXPORT, PLEXTOKEN, PLEXSEC, TORRENT_RESUME, PAR2CMD, QBITTORRENTHOST, QBITTORRENTPORT, QBITTORRENTUSR, QBITTORRENTPWD
|
||||
PLEXSSL, PLEXHOST, PLEXPORT, PLEXTOKEN, PLEXSEC, TORRENT_RESUME, PAR2CMD, QBITTORRENT_HOST, QBITTORRENT_PORT, QBITTORRENT_USER, QBITTORRENT_PASSWORD
|
||||
|
||||
if __INITIALIZED__:
|
||||
return False
|
||||
|
@ -420,10 +420,10 @@ def initialize(section=None):
|
|||
DELUGE_USER = CFG['Torrent']['DelugeUSR'] # mysecretusr
|
||||
DELUGE_PASSWORD = CFG['Torrent']['DelugePWD'] # mysecretpwr
|
||||
|
||||
QBITTORRENTHOST = CFG['Torrent']['qBittorrenHost'] # localhost
|
||||
QBITTORRENTPORT = int(CFG['Torrent']['qBittorrentPort']) # 8080
|
||||
QBITTORRENTUSR = CFG['Torrent']['qBittorrentUSR'] # mysecretusr
|
||||
QBITTORRENTPWD = CFG['Torrent']['qBittorrentPWD'] # mysecretpwr
|
||||
QBITTORRENT_HOST = CFG['Torrent']['qBittorrenHost'] # localhost
|
||||
QBITTORRENT_PORT = int(CFG['Torrent']['qBittorrentPort']) # 8080
|
||||
QBITTORRENT_USER = CFG['Torrent']['qBittorrentUSR'] # mysecretusr
|
||||
QBITTORRENT_PASSWORD = CFG['Torrent']['qBittorrentPWD'] # mysecretpwr
|
||||
|
||||
REMOTEPATHS = CFG['Network']['mount_points'] or []
|
||||
if REMOTEPATHS:
|
||||
|
|
|
@ -41,9 +41,9 @@ def create_torrent_class(client_agent):
|
|||
|
||||
if client_agent == 'qbittorrent':
|
||||
try:
|
||||
logger.debug('Connecting to {0}: http://{1}:{2}'.format(client_agent, core.QBITTORRENTHOST, core.QBITTORRENTPORT))
|
||||
tc = qBittorrentClient('http://{0}:{1}/'.format(core.QBITTORRENTHOST, core.QBITTORRENTPORT))
|
||||
tc.login(core.QBITTORRENTUSR, core.QBITTORRENTPWD)
|
||||
logger.debug('Connecting to {0}: http://{1}:{2}'.format(client_agent, core.QBITTORRENT_HOST, core.QBITTORRENT_PORT))
|
||||
tc = qBittorrentClient('http://{0}:{1}/'.format(core.QBITTORRENT_HOST, core.QBITTORRENT_PORT))
|
||||
tc.login(core.QBITTORRENT_USER, core.QBITTORRENT_PASSWORD)
|
||||
except Exception:
|
||||
logger.error('Failed to connect to qBittorrent')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue