mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
SABnzbd-Suite: SABnzbd should always start
This commit is contained in:
parent
85273e5be4
commit
59c4341171
@ -5,7 +5,6 @@
|
||||
<setting id="SABNZBD_KEEP_AWAKE" value="false" />
|
||||
<setting id="SABNZBD_PERIODIC_WAKE" value="false" />
|
||||
<setting id="SABNZBD_WAKE_AT" value="1" />
|
||||
<setting id="SABNZBD_LAUNCH" value="true" />
|
||||
<setting id="SICKBEARD_LAUNCH" value="true" />
|
||||
<setting id="COUCHPOTATO_LAUNCH" value="true" />
|
||||
<setting id="COUCHPOTATO_VERSION" value="0" />
|
||||
|
@ -135,7 +135,6 @@ user = getAddonSetting(suiteSettings, 'SABNZBD_USER')
|
||||
pwd = getAddonSetting(suiteSettings, 'SABNZBD_PWD')
|
||||
host = getAddonSetting(suiteSettings, 'SABNZBD_IP')
|
||||
sabNzbdKeepAwake = getAddonSetting(suiteSettings, 'SABNZBD_KEEP_AWAKE')
|
||||
sabnzbd_launch = getAddonSetting(suiteSettings, 'SABNZBD_LAUNCH')
|
||||
sickbeard_launch = getAddonSetting(suiteSettings, 'SICKBEARD_LAUNCH')
|
||||
couchpotato_launch = getAddonSetting(suiteSettings, 'COUCHPOTATO_LAUNCH')
|
||||
couchpotato_version = getAddonSetting(suiteSettings, 'COUCHPOTATO_VERSION')
|
||||
@ -145,8 +144,6 @@ headphones_launch = getAddonSetting(suiteSettings, 'HEADPHONES_LAUNCH')
|
||||
# safe defaults. this is ugly
|
||||
# someone with better knowledge in xbmc addon api
|
||||
# please fix
|
||||
if not sabnzbd_launch:
|
||||
sabnzbd_launch = "true"
|
||||
if not sickbeard_launch:
|
||||
sickbeard_launch = "true"
|
||||
if not couchpotato_launch:
|
||||
@ -244,17 +241,16 @@ autoProcessConfig.write()
|
||||
|
||||
# launch SABnzbd and get the API key
|
||||
# ----------------------------------
|
||||
if "true" in sabnzbd_launch:
|
||||
logging.debug('Launching SABnzbd...')
|
||||
subprocess.call(sabnzbd,close_fds=True)
|
||||
logging.debug('...done')
|
||||
logging.debug('Launching SABnzbd...')
|
||||
subprocess.call(sabnzbd,close_fds=True)
|
||||
logging.debug('...done')
|
||||
|
||||
# SABnzbd will only complete the .ini file when we first access the web interface
|
||||
if firstLaunch:
|
||||
loadWebInterface('http://' + sabNzbdHost,user,pwd)
|
||||
sabNzbdConfig.reload()
|
||||
sabNzbdApiKey = sabNzbdConfig['misc']['api_key']
|
||||
logging.debug('SABnzbd api key: ' + sabNzbdApiKey)
|
||||
if firstLaunch:
|
||||
loadWebInterface('http://' + sabNzbdHost,user,pwd)
|
||||
sabNzbdConfig.reload()
|
||||
sabNzbdApiKey = sabNzbdConfig['misc']['api_key']
|
||||
logging.debug('SABnzbd api key: ' + sabNzbdApiKey)
|
||||
|
||||
# write SickBeard settings
|
||||
# ------------------------
|
||||
@ -269,12 +265,11 @@ defaultConfig['General']['web_port'] = '8082'
|
||||
defaultConfig['General']['web_host'] = host
|
||||
defaultConfig['General']['web_username'] = user
|
||||
defaultConfig['General']['web_password'] = pwd
|
||||
if "true" in sabnzbd_launch:
|
||||
defaultConfig['SABnzbd'] = {}
|
||||
defaultConfig['SABnzbd']['sab_username'] = user
|
||||
defaultConfig['SABnzbd']['sab_password'] = pwd
|
||||
defaultConfig['SABnzbd']['sab_apikey'] = sabNzbdApiKey
|
||||
defaultConfig['SABnzbd']['sab_host'] = 'http://' + sabNzbdHost + '/'
|
||||
defaultConfig['SABnzbd'] = {}
|
||||
defaultConfig['SABnzbd']['sab_username'] = user
|
||||
defaultConfig['SABnzbd']['sab_password'] = pwd
|
||||
defaultConfig['SABnzbd']['sab_apikey'] = sabNzbdApiKey
|
||||
defaultConfig['SABnzbd']['sab_host'] = 'http://' + sabNzbdHost + '/'
|
||||
defaultConfig['XBMC'] = {}
|
||||
defaultConfig['XBMC']['use_xbmc'] = '1'
|
||||
defaultConfig['XBMC']['xbmc_host'] = '127.0.0.1:' + xbmcPort
|
||||
@ -321,12 +316,11 @@ defaultConfig['global']['password'] = pwd
|
||||
defaultConfig['global']['username'] = user
|
||||
defaultConfig['global']['port'] = '8083'
|
||||
defaultConfig['global']['host'] = host
|
||||
if "true" in sabnzbd_launch:
|
||||
defaultConfig['Sabnzbd'] = {}
|
||||
defaultConfig['Sabnzbd']['username'] = user
|
||||
defaultConfig['Sabnzbd']['password'] = pwd
|
||||
defaultConfig['Sabnzbd']['apikey'] = sabNzbdApiKey
|
||||
defaultConfig['Sabnzbd']['host'] = sabNzbdHost
|
||||
defaultConfig['Sabnzbd'] = {}
|
||||
defaultConfig['Sabnzbd']['username'] = user
|
||||
defaultConfig['Sabnzbd']['password'] = pwd
|
||||
defaultConfig['Sabnzbd']['apikey'] = sabNzbdApiKey
|
||||
defaultConfig['Sabnzbd']['host'] = sabNzbdHost
|
||||
defaultConfig['XBMC'] = {}
|
||||
defaultConfig['XBMC']['enabled'] = 'True'
|
||||
defaultConfig['XBMC']['host'] = '127.0.0.1:' + xbmcPort
|
||||
@ -379,12 +373,11 @@ defaultConfig['updater'] = {}
|
||||
defaultConfig['updater']['enabled'] = '0'
|
||||
defaultConfig['updater']['notification'] = '0'
|
||||
defaultConfig['updater']['automatic'] = '0'
|
||||
if "true" in sabnzbd_launch:
|
||||
defaultConfig['Sabnzbd'] = {}
|
||||
defaultConfig['Sabnzbd']['username'] = user
|
||||
defaultConfig['Sabnzbd']['password'] = pwd
|
||||
defaultConfig['Sabnzbd']['api_key'] = sabNzbdApiKey
|
||||
defaultConfig['Sabnzbd']['host'] = sabNzbdHost
|
||||
defaultConfig['Sabnzbd'] = {}
|
||||
defaultConfig['Sabnzbd']['username'] = user
|
||||
defaultConfig['Sabnzbd']['password'] = pwd
|
||||
defaultConfig['Sabnzbd']['api_key'] = sabNzbdApiKey
|
||||
defaultConfig['Sabnzbd']['host'] = sabNzbdHost
|
||||
defaultConfig['xbmc'] = {}
|
||||
defaultConfig['xbmc']['enabled'] = '1'
|
||||
defaultConfig['xbmc']['host'] = '127.0.0.1:' + xbmcPort
|
||||
@ -422,12 +415,11 @@ defaultConfig['General']['http_port'] = '8084'
|
||||
defaultConfig['General']['http_host'] = host
|
||||
defaultConfig['General']['http_username'] = user
|
||||
defaultConfig['General']['http_password'] = pwd
|
||||
if "true" in sabnzbd_launch:
|
||||
defaultConfig['SABnzbd'] = {}
|
||||
defaultConfig['SABnzbd']['sab_apikey'] = sabNzbdApiKey
|
||||
defaultConfig['SABnzbd']['sab_host'] = sabNzbdHost
|
||||
defaultConfig['SABnzbd']['sab_username'] = user
|
||||
defaultConfig['SABnzbd']['sab_password'] = pwd
|
||||
defaultConfig['SABnzbd'] = {}
|
||||
defaultConfig['SABnzbd']['sab_apikey'] = sabNzbdApiKey
|
||||
defaultConfig['SABnzbd']['sab_host'] = sabNzbdHost
|
||||
defaultConfig['SABnzbd']['sab_username'] = user
|
||||
defaultConfig['SABnzbd']['sab_password'] = pwd
|
||||
|
||||
if firstLaunch:
|
||||
defaultConfig['SABnzbd']['sab_category'] = 'music'
|
||||
|
@ -6,7 +6,6 @@
|
||||
<string id="1010">User Settings</string>
|
||||
<string id="1022">Username</string>
|
||||
<string id="1023">Password</string>
|
||||
<string id="1024">Enable SABnzbd</string>>
|
||||
<string id="1025">Enable Sickbeard</string>
|
||||
<string id="1026">Enable Couchpotato</string>
|
||||
<string id="1027">Couchpotato Version</string>
|
||||
|
@ -7,7 +7,6 @@
|
||||
<setting type="sep" />
|
||||
<setting id="SABNZBD_USER" type="text" label="1022" default="openelec"/>
|
||||
<setting id="SABNZBD_PWD" type="text" label="1023" default="openelec"/>
|
||||
<setting id="SABNZBD_LAUNCH" type="bool" label="1024" default="true" />
|
||||
<setting id="SICKBEARD_LAUNCH" type="bool" label="1025" default="true" />
|
||||
<setting id="COUCHPOTATO_LAUNCH" type="bool" label="1026" default="true" />
|
||||
<setting id="COUCHPOTATO_VERSION" type="enum" label="1027" default="0" values="Version 1|Version 2" enable="eq(-1,true)" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user