Refactor DELUGEPORT -> DELUGE_PORT

This commit is contained in:
Labrys of Knossos 2019-01-18 22:46:54 -05:00
commit df5291fd4f
2 changed files with 5 additions and 5 deletions

View file

@ -160,7 +160,7 @@ TRANSMISSION_USER = None
TRANSMISSION_PASSWORD = None
DELUGE_HOST = None
DELUGEPORT = None
DELUGE_PORT = None
DELUGEUSR = None
DELUGEPWD = 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, UTORRENT_PASSWORD, UTORRENT_USER, UTORRENT_WEB_UI, DELUGE_HOST, DELUGEPORT, DELUGEUSR, DELUGEPWD, VLEVEL, \
NOFLATTEN, UTORRENT_PASSWORD, UTORRENT_USER, UTORRENT_WEB_UI, DELUGE_HOST, DELUGE_PORT, DELUGEUSR, DELUGEPWD, VLEVEL, \
TRANSMISSION_HOST, TRANSMISSION_PORT, TRANSMISSION_PASSWORD, TRANSMISSION_USER, 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, \
@ -416,7 +416,7 @@ def initialize(section=None):
TRANSMISSION_PASSWORD = CFG['Torrent']['TransmissionPWD'] # mysecretpwr
DELUGE_HOST = CFG['Torrent']['DelugeHost'] # localhost
DELUGEPORT = int(CFG['Torrent']['DelugePort']) # 8084
DELUGE_PORT = int(CFG['Torrent']['DelugePort']) # 8084
DELUGEUSR = CFG['Torrent']['DelugeUSR'] # mysecretusr
DELUGEPWD = CFG['Torrent']['DelugePWD'] # mysecretpwr

View file

@ -32,9 +32,9 @@ def create_torrent_class(client_agent):
if client_agent == 'deluge':
try:
logger.debug('Connecting to {0}: http://{1}:{2}'.format(client_agent, core.DELUGE_HOST, core.DELUGEPORT))
logger.debug('Connecting to {0}: http://{1}:{2}'.format(client_agent, core.DELUGE_HOST, core.DELUGE_PORT))
tc = DelugeClient()
tc.connect(host=core.DELUGE_HOST, port=core.DELUGEPORT, username=core.DELUGEUSR,
tc.connect(host=core.DELUGE_HOST, port=core.DELUGE_PORT, username=core.DELUGEUSR,
password=core.DELUGEPWD)
except Exception:
logger.error('Failed to connect to Deluge')