From 22d2c1b108002a56c3eb7c0eef8b6adc2b47e6d7 Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Fri, 18 Jan 2019 22:20:30 -0500 Subject: [PATCH] Refactor UTORRENTUSR -> UTORRENT_USER --- core/__init__.py | 6 +++--- core/utils/torrents.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/__init__.py b/core/__init__.py index 435da837..321c744b 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -151,7 +151,7 @@ TORRENT_RESUME_ON_FAILURE = None REMOTEPATHS = [] UTORRENT_WEB_UI = None -UTORRENTUSR = None +UTORRENT_USER = None UTORRENTPWD = None TRANSMISSIONHOST = None @@ -256,7 +256,7 @@ def initialize(section=None): NZBTOMEDIA_TIMEOUT, FORKS, FORK_DEFAULT, FORK_FAILED_TORRENT, FORK_FAILED, NOEXTRACTFAILED, SHOWEXTRACT, \ NZBTOMEDIA_BRANCH, NZBTOMEDIA_VERSION, NEWEST_VERSION, NEWEST_VERSION_STRING, VERSION_NOTIFY, SYS_ARGV, CFG, \ SABNZB_NO_OF_ARGUMENTS, SABNZB_0717_NO_OF_ARGUMENTS, CATEGORIES, TORRENT_CLIENTAGENT, USELINK, OUTPUTDIRECTORY, \ - NOFLATTEN, UTORRENTPWD, UTORRENTUSR, UTORRENT_WEB_UI, DELUGEHOST, DELUGEPORT, DELUGEUSR, DELUGEPWD, VLEVEL, \ + NOFLATTEN, UTORRENTPWD, UTORRENT_USER, UTORRENT_WEB_UI, DELUGEHOST, DELUGEPORT, DELUGEUSR, DELUGEPWD, VLEVEL, \ TRANSMISSIONHOST, TRANSMISSIONPORT, TRANSMISSIONPWD, TRANSMISSIONUSR, COMPRESSEDCONTAINER, MEDIACONTAINER, \ METACONTAINER, SECTIONS, ALL_FORKS, TEST_FILE, GENERALOPTS, LOG_GIT, GROUPS, SEVENZIP, CONCAT, VCRF, \ __INITIALIZED__, AUTO_UPDATE, APP_FILENAME, USER_DELAY, APP_NAME, TRANSCODE, DEFAULTS, GIT_PATH, GIT_USER, \ @@ -407,7 +407,7 @@ def initialize(section=None): TORRENT_RESUME_ON_FAILURE = int(CFG['Torrent']['resumeOnFailure']) TORRENT_RESUME = int(CFG['Torrent']['resume']) UTORRENT_WEB_UI = CFG['Torrent']['uTorrentWEBui'] # http://localhost:8090/gui/ - UTORRENTUSR = CFG['Torrent']['uTorrentUSR'] # mysecretusr + UTORRENT_USER = CFG['Torrent']['uTorrentUSR'] # mysecretusr UTORRENTPWD = CFG['Torrent']['uTorrentPWD'] # mysecretpwr TRANSMISSIONHOST = CFG['Torrent']['TransmissionHost'] # localhost diff --git a/core/utils/torrents.py b/core/utils/torrents.py index 1ecbca95..37943258 100644 --- a/core/utils/torrents.py +++ b/core/utils/torrents.py @@ -16,7 +16,7 @@ def create_torrent_class(client_agent): if client_agent == 'utorrent': try: logger.debug('Connecting to {0}: {1}'.format(client_agent, core.UTORRENT_WEB_UI)) - tc = UTorrentClient(core.UTORRENT_WEB_UI, core.UTORRENTUSR, core.UTORRENTPWD) + tc = UTorrentClient(core.UTORRENT_WEB_UI, core.UTORRENT_USER, core.UTORRENTPWD) except Exception: logger.error('Failed to connect to uTorrent')