mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-06 05:01:10 -07:00
Refactor TORRENT_CLIENTAGENT -> TORRENT_CLIENT_AGENT
This commit is contained in:
parent
fafcdb4ed5
commit
d973f4955f
4 changed files with 7 additions and 7 deletions
|
@ -291,7 +291,7 @@ def main(args):
|
||||||
core.initialize()
|
core.initialize()
|
||||||
|
|
||||||
# clientAgent for Torrents
|
# clientAgent for Torrents
|
||||||
client_agent = core.TORRENT_CLIENTAGENT
|
client_agent = core.TORRENT_CLIENT_AGENT
|
||||||
|
|
||||||
logger.info('#########################################################')
|
logger.info('#########################################################')
|
||||||
logger.info('## ..::[{0}]::.. ##'.format(os.path.basename(__file__)))
|
logger.info('## ..::[{0}]::.. ##'.format(os.path.basename(__file__)))
|
||||||
|
|
|
@ -137,7 +137,7 @@ SABNZBD_PORT = None
|
||||||
SABNZBD_APIKEY = None
|
SABNZBD_APIKEY = None
|
||||||
NZB_DEFAULT_DIRECTORY = None
|
NZB_DEFAULT_DIRECTORY = None
|
||||||
|
|
||||||
TORRENT_CLIENTAGENT = None
|
TORRENT_CLIENT_AGENT = None
|
||||||
TORRENT_CLASS = None
|
TORRENT_CLASS = None
|
||||||
USE_LINK = None
|
USE_LINK = None
|
||||||
OUTPUT_DIRECTORY = None
|
OUTPUT_DIRECTORY = None
|
||||||
|
@ -255,7 +255,7 @@ def initialize(section=None):
|
||||||
global NZBGET_POSTPROCESS_ERROR, NZBGET_POSTPROCESS_NONE, NZBGET_POSTPROCESS_PAR_CHECK, NZBGET_POSTPROCESS_SUCCESS, \
|
global NZBGET_POSTPROCESS_ERROR, NZBGET_POSTPROCESS_NONE, NZBGET_POSTPROCESS_PAR_CHECK, NZBGET_POSTPROCESS_SUCCESS, \
|
||||||
NZBTOMEDIA_TIMEOUT, FORKS, FORK_DEFAULT, FORK_FAILED_TORRENT, FORK_FAILED, NOEXTRACTFAILED, SHOWEXTRACT, \
|
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, \
|
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, USE_LINK, OUTPUT_DIRECTORY, \
|
SABNZB_NO_OF_ARGUMENTS, SABNZB_0717_NO_OF_ARGUMENTS, CATEGORIES, TORRENT_CLIENT_AGENT, USE_LINK, OUTPUT_DIRECTORY, \
|
||||||
NOFLATTEN, UTORRENT_PASSWORD, UTORRENT_USER, UTORRENT_WEB_UI, DELUGE_HOST, DELUGE_PORT, DELUGE_USER, DELUGE_PASSWORD, VLEVEL, \
|
NOFLATTEN, UTORRENT_PASSWORD, UTORRENT_USER, UTORRENT_WEB_UI, DELUGE_HOST, DELUGE_PORT, DELUGE_USER, DELUGE_PASSWORD, VLEVEL, \
|
||||||
TRANSMISSION_HOST, TRANSMISSION_PORT, TRANSMISSION_PASSWORD, TRANSMISSION_USER, COMPRESSEDCONTAINER, MEDIACONTAINER, \
|
TRANSMISSION_HOST, TRANSMISSION_PORT, TRANSMISSION_PASSWORD, TRANSMISSION_USER, COMPRESSEDCONTAINER, MEDIACONTAINER, \
|
||||||
METACONTAINER, SECTIONS, ALL_FORKS, TEST_FILE, GENERALOPTS, LOG_GIT, GROUPS, SEVENZIP, CONCAT, VCRF, \
|
METACONTAINER, SECTIONS, ALL_FORKS, TEST_FILE, GENERALOPTS, LOG_GIT, GROUPS, SEVENZIP, CONCAT, VCRF, \
|
||||||
|
@ -392,7 +392,7 @@ def initialize(section=None):
|
||||||
if GROUPS == ['']:
|
if GROUPS == ['']:
|
||||||
GROUPS = None
|
GROUPS = None
|
||||||
|
|
||||||
TORRENT_CLIENTAGENT = CFG['Torrent']['clientAgent'] # utorrent | deluge | transmission | rtorrent | vuze | qbittorrent |other
|
TORRENT_CLIENT_AGENT = CFG['Torrent']['clientAgent'] # utorrent | deluge | transmission | rtorrent | vuze | qbittorrent |other
|
||||||
USE_LINK = CFG['Torrent']['useLink'] # no | hard | sym
|
USE_LINK = CFG['Torrent']['useLink'] # no | hard | sym
|
||||||
OUTPUT_DIRECTORY = CFG['Torrent']['outputDirectory'] # /abs/path/to/complete/
|
OUTPUT_DIRECTORY = CFG['Torrent']['outputDirectory'] # /abs/path/to/complete/
|
||||||
TORRENT_DEFAULT_DIRECTORY = CFG['Torrent']['default_downloadDirectory']
|
TORRENT_DEFAULT_DIRECTORY = CFG['Torrent']['default_downloadDirectory']
|
||||||
|
@ -860,7 +860,7 @@ def initialize(section=None):
|
||||||
CATEGORIES = list(set(CATEGORIES))
|
CATEGORIES = list(set(CATEGORIES))
|
||||||
|
|
||||||
# create torrent class
|
# create torrent class
|
||||||
TORRENT_CLASS = create_torrent_class(TORRENT_CLIENTAGENT)
|
TORRENT_CLASS = create_torrent_class(TORRENT_CLIENT_AGENT)
|
||||||
|
|
||||||
# finished initalizing
|
# finished initalizing
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -152,7 +152,7 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
|
||||||
if not release and '.cp(tt' not in video and imdbid:
|
if not release and '.cp(tt' not in video and imdbid:
|
||||||
video_name, video_ext = os.path.splitext(video)
|
video_name, video_ext = os.path.splitext(video)
|
||||||
video2 = '{0}.cp({1}){2}'.format(video_name, imdbid, video_ext)
|
video2 = '{0}.cp({1}){2}'.format(video_name, imdbid, video_ext)
|
||||||
if not (client_agent in [core.TORRENT_CLIENTAGENT, 'manual'] and core.USE_LINK == 'move-sym'):
|
if not (client_agent in [core.TORRENT_CLIENT_AGENT, 'manual'] and core.USE_LINK == 'move-sym'):
|
||||||
logger.debug('Renaming: {0} to: {1}'.format(video, video2))
|
logger.debug('Renaming: {0} to: {1}'.format(video, video2))
|
||||||
os.rename(video, video2)
|
os.rename(video, video2)
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ def process(section, dir_name, input_name=None, failed=False, client_agent='manu
|
||||||
delete_failed = int(cfg.get('delete_failed', 0))
|
delete_failed = int(cfg.get('delete_failed', 0))
|
||||||
nzb_extraction_by = cfg.get('nzbExtractionBy', 'Downloader')
|
nzb_extraction_by = cfg.get('nzbExtractionBy', 'Downloader')
|
||||||
process_method = cfg.get('process_method')
|
process_method = cfg.get('process_method')
|
||||||
if client_agent == core.TORRENT_CLIENTAGENT and core.USE_LINK == 'move-sym':
|
if client_agent == core.TORRENT_CLIENT_AGENT and core.USE_LINK == 'move-sym':
|
||||||
process_method = 'symlink'
|
process_method = 'symlink'
|
||||||
remote_path = int(cfg.get('remote_path', 0))
|
remote_path = int(cfg.get('remote_path', 0))
|
||||||
wait_for = int(cfg.get('wait_for', 2))
|
wait_for = int(cfg.get('wait_for', 2))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue