mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
SABnzbd-Suite: rework: a failed part of suite should NEVER block another part.
This commit is contained in:
parent
8dfbdba67b
commit
ba695d3da3
@ -182,9 +182,10 @@ except:
|
|||||||
signal.signal(signal.SIGCHLD, signal.SIG_DFL)
|
signal.signal(signal.SIGCHLD, signal.SIG_DFL)
|
||||||
os.environ['PYTHONPATH'] = str(os.environ.get('PYTHONPATH')) + ':' + pPylib
|
os.environ['PYTHONPATH'] = str(os.environ.get('PYTHONPATH')) + ':' + pPylib
|
||||||
|
|
||||||
|
# SABnzbd start
|
||||||
|
try:
|
||||||
# write SABnzbd settings
|
# write SABnzbd settings
|
||||||
# ----------------------
|
# ----------------------
|
||||||
|
|
||||||
sabNzbdConfig = ConfigObj(pSabNzbdSettings,create_empty=True)
|
sabNzbdConfig = ConfigObj(pSabNzbdSettings,create_empty=True)
|
||||||
defaultConfig = ConfigObj()
|
defaultConfig = ConfigObj()
|
||||||
defaultConfig['misc'] = {}
|
defaultConfig['misc'] = {}
|
||||||
@ -258,10 +259,14 @@ if "true" in sabnzbd_launch:
|
|||||||
sabNzbdConfig.reload()
|
sabNzbdConfig.reload()
|
||||||
sabNzbdApiKey = sabNzbdConfig['misc']['api_key']
|
sabNzbdApiKey = sabNzbdConfig['misc']['api_key']
|
||||||
logging.debug('SABnzbd api key: ' + sabNzbdApiKey)
|
logging.debug('SABnzbd api key: ' + sabNzbdApiKey)
|
||||||
|
except Exception,e:
|
||||||
|
print 'SABnzbd: exception occurred:', e
|
||||||
|
# SABnzbd end
|
||||||
|
|
||||||
|
# SickBeard start
|
||||||
|
try:
|
||||||
# write SickBeard settings
|
# write SickBeard settings
|
||||||
# ------------------------
|
# ------------------------
|
||||||
|
|
||||||
sickBeardConfig = ConfigObj(pSickBeardSettings,create_empty=True)
|
sickBeardConfig = ConfigObj(pSickBeardSettings,create_empty=True)
|
||||||
defaultConfig = ConfigObj()
|
defaultConfig = ConfigObj()
|
||||||
defaultConfig['General'] = {}
|
defaultConfig['General'] = {}
|
||||||
@ -311,10 +316,14 @@ if "true" in sickbeard_launch:
|
|||||||
logging.debug('Launching SickBeard...')
|
logging.debug('Launching SickBeard...')
|
||||||
subprocess.call(sickBeard,close_fds=True)
|
subprocess.call(sickBeard,close_fds=True)
|
||||||
logging.debug('...done')
|
logging.debug('...done')
|
||||||
|
except Exception,e:
|
||||||
|
print 'SickBeard: exception occurred:', e
|
||||||
|
# SickBeard end
|
||||||
|
|
||||||
|
# CouchPotato start
|
||||||
|
try:
|
||||||
# write CouchPotato settings
|
# write CouchPotato settings
|
||||||
# --------------------------
|
# --------------------------
|
||||||
|
|
||||||
couchPotatoConfig = ConfigObj(pCouchPotatoSettings,create_empty=True)
|
couchPotatoConfig = ConfigObj(pCouchPotatoSettings,create_empty=True)
|
||||||
defaultConfig = ConfigObj()
|
defaultConfig = ConfigObj()
|
||||||
defaultConfig['global'] = {}
|
defaultConfig['global'] = {}
|
||||||
@ -355,13 +364,17 @@ if "true" in couchpotato_launch and "0" in couchpotato_version:
|
|||||||
logging.debug('Launching CouchPotato...')
|
logging.debug('Launching CouchPotato...')
|
||||||
subprocess.call(couchPotato,close_fds=True)
|
subprocess.call(couchPotato,close_fds=True)
|
||||||
logging.debug('...done')
|
logging.debug('...done')
|
||||||
|
except Exception,e:
|
||||||
|
print 'CouchPotato: exception occurred:', e
|
||||||
|
# CouchPotato end
|
||||||
|
|
||||||
|
# CouchPotatoServer start
|
||||||
|
try:
|
||||||
#convert password to md5
|
#convert password to md5
|
||||||
md5pwd = hashlib.md5(pwd).hexdigest()
|
md5pwd = hashlib.md5(pwd).hexdigest()
|
||||||
|
|
||||||
# write CouchPotatoServer settings
|
# write CouchPotatoServer settings
|
||||||
# --------------------------
|
# --------------------------
|
||||||
|
|
||||||
couchPotatoServerConfig = ConfigObj(pCouchPotatoServerSettings,create_empty=True)
|
couchPotatoServerConfig = ConfigObj(pCouchPotatoServerSettings,create_empty=True)
|
||||||
defaultConfig = ConfigObj()
|
defaultConfig = ConfigObj()
|
||||||
defaultConfig['newznab'] = {}
|
defaultConfig['newznab'] = {}
|
||||||
@ -413,10 +426,14 @@ if "true" in couchpotato_launch and "1" in couchpotato_version:
|
|||||||
logging.debug('Launching CouchPotatoServer...')
|
logging.debug('Launching CouchPotatoServer...')
|
||||||
subprocess.call(couchPotatoServer,close_fds=True)
|
subprocess.call(couchPotatoServer,close_fds=True)
|
||||||
logging.debug('...done')
|
logging.debug('...done')
|
||||||
|
except Exception,e:
|
||||||
|
print 'CouchPotatoServer: exception occurred:', e
|
||||||
|
# CouchPotatoServer end
|
||||||
|
|
||||||
|
# Headphones start
|
||||||
|
try:
|
||||||
# write Headphones settings
|
# write Headphones settings
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
headphonesConfig = ConfigObj(pHeadphonesSettings,create_empty=True)
|
headphonesConfig = ConfigObj(pHeadphonesSettings,create_empty=True)
|
||||||
defaultConfig = ConfigObj()
|
defaultConfig = ConfigObj()
|
||||||
defaultConfig['General'] = {}
|
defaultConfig['General'] = {}
|
||||||
@ -449,3 +466,6 @@ if "true" in headphones_launch:
|
|||||||
logging.debug('Launching Headphones...')
|
logging.debug('Launching Headphones...')
|
||||||
subprocess.call(headphones,close_fds=True)
|
subprocess.call(headphones,close_fds=True)
|
||||||
logging.debug('...done')
|
logging.debug('...done')
|
||||||
|
except Exception,e:
|
||||||
|
print 'Headphones: exception occurred:', e
|
||||||
|
# Headphones end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user