mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-02 17:33:37 +00:00
Add 'Map an NZBGet "DestDir"' setting to config/Search/NZB Results tab (select NZBGet).
This commit is contained in:
parent
1458314c17
commit
15d2907c04
6 changed files with 58 additions and 34 deletions
|
@ -1,5 +1,6 @@
|
|||
### 0.17.0 (2018-xx-xx xx:xx:xx UTC)
|
||||
|
||||
* Add 'Map an NZBGet "DestDir"' setting to config/Search/NZB Results tab (select NZBGet)
|
||||
* Add TVDB, TheXem, and GitHub buttons to page History/Layout "Provider fails" that fetches a site Up/Down report
|
||||
* Add bubble links to History/Provider fails when more than one provider has failures
|
||||
* Add "Keep up to x most recent downloads" to Edit Show/Other
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
GOTO :main
|
||||
*******************************************************************************
|
||||
|
||||
onTxComplete.bat v1.0 for Sickgear
|
||||
onTxComplete.bat v1.0 for SickGear
|
||||
|
||||
Script to copy select files to a location for SickGear to post process.
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@
|
|||
<span class="component-title">Send .nzb files to:</span>
|
||||
<span class="component-desc">
|
||||
<select name="nzb_method" id="nzb_method" class="form-control input-sm">
|
||||
#set $nzb_method_text = {'blackhole': "Black hole", 'sabnzbd': "SABnzbd", 'nzbget': "NZBget"}
|
||||
#set $nzb_method_text = {'blackhole': "Black hole", 'sabnzbd': "SABnzbd", 'nzbget': "NZBGet"}
|
||||
#for $curAction in ('sabnzbd', 'blackhole', 'nzbget'):
|
||||
#set $selected = $html_selected if $sickbeard.NZB_METHOD == $curAction else ''
|
||||
<option value="$curAction"$selected>$nzb_method_text[$curAction]</option>
|
||||
|
@ -328,18 +328,18 @@
|
|||
|
||||
<div class="field-pair">
|
||||
<label>
|
||||
<span class="component-title">NZBget host:port</span>
|
||||
<span class="component-title">NZBGet host:port</span>
|
||||
<span class="component-desc">
|
||||
<input type="text" name="nzbget_host" id="nzbget_host" value="$sickbeard.NZBGET_HOST" class="form-control input-sm input350">
|
||||
<p>(e.g. localhost:6789)</p>
|
||||
<p class="clear-left note">NZBget RPC host name and port number (not NZBgetweb!)</p>
|
||||
<p class="clear-left note">NZBGet RPC host name and port number (not NZBGetweb!)</p>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="field-pair">
|
||||
<label>
|
||||
<span class="component-title">NZBget username</span>
|
||||
<span class="component-title">NZBGet username</span>
|
||||
<span class="component-desc">
|
||||
<input type="text" name="nzbget_username" id="nzbget_username" value="$sickbeard.NZBGET_USERNAME" class="form-control input-sm input200">
|
||||
<p>locate in nzbget.conf (default:nzbget)</p>
|
||||
|
@ -349,7 +349,7 @@
|
|||
|
||||
<div class="field-pair">
|
||||
<label>
|
||||
<span class="component-title">NZBget password</span>
|
||||
<span class="component-title">NZBGet password</span>
|
||||
<span class="component-desc">
|
||||
<input type="password" autocomplete="nope" name="nzbget_password" id="nzbget_password" value="#echo '*' * len($sickbeard.NZBGET_PASSWORD)#" class="form-control input-sm input200">
|
||||
<p>locate in nzbget.conf (default:tegbzn6789)</p>
|
||||
|
@ -359,7 +359,7 @@
|
|||
|
||||
<div class="field-pair">
|
||||
<label>
|
||||
<span class="component-title">Use NZBget category</span>
|
||||
<span class="component-title">Use NZBGet category</span>
|
||||
<span class="component-desc">
|
||||
<input type="text" name="nzbget_category" id="nzbget_category" value="$sickbeard.NZBGET_CATEGORY" class="form-control input-sm input200">
|
||||
<p>send downloads marked this category (e.g. TV)</p>
|
||||
|
@ -390,7 +390,7 @@
|
|||
#end if
|
||||
<div class="field-pair">
|
||||
<label>
|
||||
<span class="component-title">NZBget priority</span>
|
||||
<span class="component-title">NZBGet priority</span>
|
||||
<span class="component-desc">
|
||||
<select name="nzbget_priority" id="nzbget_priority" class="form-control input-sm">
|
||||
<option value="-100"${prio_verylow}>Very low</option>
|
||||
|
@ -404,11 +404,24 @@
|
|||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="field-pair">
|
||||
<label>
|
||||
<span class="component-title">Map an NZBGet "DestDir"</span>
|
||||
<span class="component-desc">
|
||||
<input type="text" name="nzbget_parent_map" value="$sickbeard.NZBGET_MAP" placeholder="DestDir=path known locally as" class="form-control input-sm input250">
|
||||
<p>link a remote path to a local path</p>
|
||||
<div class="clear-left" style="line-height:initial"><p>optional: where SG is not installed on the NZBGet system (used by process media)<br>
|
||||
(e.g. d:\tvstuff = c:\tv, /mnt/tv = /tv, /remote/nzbget/DestDir = /locally/known/as/dir)</p></div>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="test-notification" id="test-nzb-result">Click below to test</div>
|
||||
<input type="button" value="Test SABnzbd" id="test_sabnzbd" class="btn test-button sabnzbd">
|
||||
<input type="button" value="Test NZBget" id="test_nzbget" class="btn test-button nzbget">
|
||||
<input type="button" value="Test NZBGet" id="test_nzbget" class="btn test-button nzbget">
|
||||
<input type="submit" class="btn config_submitter" value="Save Changes"><br />
|
||||
|
||||
</div><!-- /content_use_nzbs //-->
|
||||
|
|
|
@ -691,7 +691,7 @@ def initialize(console_logging=True):
|
|||
if __INITIALIZED__:
|
||||
return False
|
||||
|
||||
for stanza in ('General', 'Blackhole', 'SABnzbd', 'NZBget', 'Emby', 'Kodi', 'XBMC', 'PLEX',
|
||||
for stanza in ('General', 'Blackhole', 'SABnzbd', 'NZBGet', 'Emby', 'Kodi', 'XBMC', 'PLEX',
|
||||
'Growl', 'Prowl', 'Twitter', 'Slack', 'Discordapp', 'Boxcar2', 'NMJ', 'NMJv2',
|
||||
'Synology', 'SynologyNotifier',
|
||||
'pyTivo', 'Pushalot', 'Pushbullet', 'Subtitles'):
|
||||
|
@ -919,13 +919,21 @@ def initialize(console_logging=True):
|
|||
SAB_CATEGORY = check_setting_str(CFG, 'SABnzbd', 'sab_category', 'tv')
|
||||
SAB_HOST = check_setting_str(CFG, 'SABnzbd', 'sab_host', '')
|
||||
|
||||
NZBGET_USERNAME = check_setting_str(CFG, 'NZBget', 'nzbget_username', 'nzbget')
|
||||
NZBGET_PASSWORD = check_setting_str(CFG, 'NZBget', 'nzbget_password', 'tegbzn6789')
|
||||
NZBGET_CATEGORY = check_setting_str(CFG, 'NZBget', 'nzbget_category', 'tv')
|
||||
NZBGET_HOST = check_setting_str(CFG, 'NZBget', 'nzbget_host', '')
|
||||
NZBGET_USE_HTTPS = bool(check_setting_int(CFG, 'NZBget', 'nzbget_use_https', 0))
|
||||
NZBGET_PRIORITY = check_setting_int(CFG, 'NZBget', 'nzbget_priority', 100)
|
||||
NZBGET_MAP = check_setting_str(CFG, 'NZBget', 'nzbget_map', '')
|
||||
# first check using official name case, then with case of legacy
|
||||
# todo: migrate config, (just not atm due to testing map feature)
|
||||
NZBGET_USERNAME = (check_setting_str(CFG, 'NZBGet', 'nzbget_username', None)
|
||||
or check_setting_str(CFG, 'NZBget', 'nzbget_username', 'nzbget'))
|
||||
NZBGET_PASSWORD = (check_setting_str(CFG, 'NZBGet', 'nzbget_password', None)
|
||||
or check_setting_str(CFG, 'NZBget', 'nzbget_password', 'tegbzn6789'))
|
||||
NZBGET_CATEGORY = (check_setting_str(CFG, 'NZBGet', 'nzbget_category', None)
|
||||
or check_setting_str(CFG, 'NZBget', 'nzbget_category', 'tv'))
|
||||
NZBGET_HOST = (check_setting_str(CFG, 'NZBGet', 'nzbget_host', None)
|
||||
or check_setting_str(CFG, 'NZBget', 'nzbget_host', ''))
|
||||
NZBGET_USE_HTTPS = (bool(check_setting_int(CFG, 'NZBGet', 'nzbget_use_https', None))
|
||||
or bool(check_setting_int(CFG, 'NZBget', 'nzbget_use_https', 0)))
|
||||
NZBGET_PRIORITY = (check_setting_int(CFG, 'NZBGet', 'nzbget_priority', None)
|
||||
or check_setting_int(CFG, 'NZBget', 'nzbget_priority', 100))
|
||||
NZBGET_MAP = check_setting_str(CFG, 'NZBGet', 'nzbget_map', '')
|
||||
|
||||
try:
|
||||
ng_script_file = ek.ek(os.path.join, ek.ek(os.path.dirname, ek.ek(os.path.dirname, __file__)),
|
||||
|
@ -1760,15 +1768,15 @@ def save_config():
|
|||
new_config['SABnzbd']['sab_category'] = SAB_CATEGORY
|
||||
new_config['SABnzbd']['sab_host'] = SAB_HOST
|
||||
|
||||
new_config['NZBget'] = {}
|
||||
new_config['NZBGet'] = {}
|
||||
|
||||
new_config['NZBget']['nzbget_username'] = NZBGET_USERNAME
|
||||
new_config['NZBget']['nzbget_password'] = helpers.encrypt(NZBGET_PASSWORD, ENCRYPTION_VERSION)
|
||||
new_config['NZBget']['nzbget_category'] = NZBGET_CATEGORY
|
||||
new_config['NZBget']['nzbget_host'] = NZBGET_HOST
|
||||
new_config['NZBget']['nzbget_use_https'] = int(NZBGET_USE_HTTPS)
|
||||
new_config['NZBget']['nzbget_priority'] = NZBGET_PRIORITY
|
||||
new_config['NZBget']['nzbget_map'] = NZBGET_MAP
|
||||
new_config['NZBGet']['nzbget_username'] = NZBGET_USERNAME
|
||||
new_config['NZBGet']['nzbget_password'] = helpers.encrypt(NZBGET_PASSWORD, ENCRYPTION_VERSION)
|
||||
new_config['NZBGet']['nzbget_category'] = NZBGET_CATEGORY
|
||||
new_config['NZBGet']['nzbget_host'] = NZBGET_HOST
|
||||
new_config['NZBGet']['nzbget_use_https'] = int(NZBGET_USE_HTTPS)
|
||||
new_config['NZBGet']['nzbget_priority'] = NZBGET_PRIORITY
|
||||
new_config['NZBGet']['nzbget_map'] = NZBGET_MAP
|
||||
|
||||
new_config['TORRENT'] = {}
|
||||
new_config['TORRENT']['torrent_username'] = TORRENT_USERNAME
|
||||
|
|
|
@ -30,7 +30,7 @@ def test_nzbget(host, use_https, username, password):
|
|||
|
||||
result = False
|
||||
if not host:
|
||||
msg = 'No NZBget host found. Please configure it'
|
||||
msg = 'No NZBGet host found. Please configure it'
|
||||
logger.log(msg, logger.ERROR)
|
||||
return result, msg, None
|
||||
|
||||
|
@ -49,12 +49,12 @@ def test_nzbget(host, use_https, username, password):
|
|||
logger.log(u'NZBGet URL: %s' % url, logger.DEBUG)
|
||||
|
||||
except moves.http_client.socket.error:
|
||||
msg = 'Please check NZBget host and port (if it is running). NZBget is not responding to these values'
|
||||
msg = 'Please check NZBGet host and port (if it is running). NZBGet is not responding to these values'
|
||||
logger.log(msg, logger.ERROR)
|
||||
|
||||
except moves.xmlrpc_client.ProtocolError as e:
|
||||
if 'Unauthorized' == e.errmsg:
|
||||
msg = 'NZBget username or password is incorrect'
|
||||
msg = 'NZBGet username or password is incorrect'
|
||||
logger.log(msg, logger.ERROR)
|
||||
else:
|
||||
msg = 'Protocol Error: %s' % e.errmsg
|
||||
|
@ -150,11 +150,11 @@ def send_nzb(nzb):
|
|||
nzbget_prio, False, nzb.url)
|
||||
|
||||
if nzbget_result:
|
||||
logger.log(u'NZB sent to NZBget successfully', logger.DEBUG)
|
||||
logger.log(u'NZB sent to NZBGet successfully', logger.DEBUG)
|
||||
result = True
|
||||
else:
|
||||
logger.log(u'NZBget could not add %s to the queue' % ('%s.nzb' % nzb.name), logger.ERROR)
|
||||
logger.log(u'NZBGet could not add %s to the queue' % ('%s.nzb' % nzb.name), logger.ERROR)
|
||||
except(StandardError, Exception):
|
||||
logger.log(u'Connect Error to NZBget: could not add %s to the queue' % ('%s.nzb' % nzb.name), logger.ERROR)
|
||||
logger.log(u'Connect Error to NZBGet: could not add %s to the queue' % ('%s.nzb' % nzb.name), logger.ERROR)
|
||||
|
||||
return result
|
||||
|
|
|
@ -5916,9 +5916,10 @@ class ConfigSearch(Config):
|
|||
pass
|
||||
return t.respond()
|
||||
|
||||
def saveSearch(self, use_nzbs=None, use_torrents=None, nzb_dir=None, sab_username=None, sab_password=None,
|
||||
sab_apikey=None, sab_category=None, sab_host=None, nzbget_username=None, nzbget_password=None,
|
||||
nzbget_category=None, nzbget_priority=None, nzbget_host=None, nzbget_use_https=None,
|
||||
def saveSearch(self, use_nzbs=None, use_torrents=None, nzb_dir=None,
|
||||
sab_host=None, sab_username=None, sab_password=None, sab_apikey=None, sab_category=None,
|
||||
nzbget_use_https=None, nzbget_host=None, nzbget_username=None, nzbget_password=None,
|
||||
nzbget_category=None, nzbget_priority=None, nzbget_parent_map=None,
|
||||
backlog_days=None, backlog_frequency=None, search_unaired=None, unaired_recent_search_only=None,
|
||||
recentsearch_frequency=None, nzb_method=None, torrent_method=None, usenet_retention=None,
|
||||
download_propers=None, propers_webdl_onegrp=None,
|
||||
|
@ -5982,6 +5983,7 @@ class ConfigSearch(Config):
|
|||
sickbeard.NZBGET_HOST = config.clean_host(nzbget_host)
|
||||
sickbeard.NZBGET_USE_HTTPS = config.checkbox_to_value(nzbget_use_https)
|
||||
sickbeard.NZBGET_PRIORITY = config.to_int(nzbget_priority, default=100)
|
||||
sickbeard.NZBGET_MAP = config.kv_csv(nzbget_parent_map)
|
||||
|
||||
sickbeard.TORRENT_USERNAME = torrent_username
|
||||
if set('*') != set(torrent_password):
|
||||
|
|
Loading…
Reference in a new issue