SABnzbd-Suite: remove CP v1

This commit is contained in:
Stefan Saraev 2013-05-14 18:22:09 +03:00
parent 1ef22aa109
commit 62da07ac21
6 changed files with 1 additions and 63 deletions

View File

@ -42,9 +42,6 @@ mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/SABnzbd
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/SickBeard
cp -PR $BUILD/SickBeard-*/* $ADDON_BUILD/$PKG_ADDON_ID/SickBeard
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/CouchPotato
cp -PR $BUILD/CouchPotato-*/* $ADDON_BUILD/$PKG_ADDON_ID/CouchPotato
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/CouchPotatoServer
cp -PR $BUILD/CouchPotatoServer-*/* $ADDON_BUILD/$PKG_ADDON_ID/CouchPotatoServer

View File

@ -8,7 +8,6 @@
<setting id="SABNZBD_LAUNCH" value="true" />
<setting id="SICKBEARD_LAUNCH" value="true" />
<setting id="COUCHPOTATO_LAUNCH" value="true" />
<setting id="COUCHPOTATO_VERSION" value="1" />
<setting id="HEADPHONES_LAUNCH" value="true" />
<setting id="RESTART_ON_RESUME" value="false" />
</settings>

View File

@ -71,7 +71,6 @@ pSuiteSettings = os.path.join(pAddonHome, 'settings.xml')
pXbmcSettings = '/storage/.xbmc/userdata/guisettings.xml'
pSabNzbdSettings = os.path.join(pAddonHome, 'sabnzbd.ini')
pSickBeardSettings = os.path.join(pAddonHome, 'sickbeard.ini')
pCouchPotatoSettings = os.path.join(pAddonHome, 'couchpotato.ini')
pCouchPotatoServerSettings = os.path.join(pAddonHome, 'couchpotatoserver.ini')
pHeadphonesSettings = os.path.join(pAddonHome, 'headphones.ini')
pTransmission_Addon_Settings ='/storage/.xbmc/userdata/addon_data/service.downloadmanager.transmission/settings.xml'
@ -92,8 +91,6 @@ sabnzbd = ['python', os.path.join(pAddon, 'SABnzbd/SABnzbd.py'),
'-d', '-f', pSabNzbdSettings, '-l 0']
sickBeard = ['python', os.path.join(pAddon, 'SickBeard/SickBeard.py'),
'--daemon', '--datadir', pAddonHome, '--config', pSickBeardSettings]
couchPotato = ['python', os.path.join(pAddon, 'CouchPotato/CouchPotato.py'),
'-d', '--datadir', pAddonHome, '--config', pCouchPotatoSettings]
couchPotatoServer = ['python', os.path.join(pAddon, 'CouchPotatoServer/CouchPotato.py'),
'--daemon', '--pid_file', os.path.join(pAddonHome, 'couchpotato.pid'), '--config_file', pCouchPotatoServerSettings]
headphones = ['python', os.path.join(pAddon, 'Headphones/Headphones.py'),
@ -155,7 +152,6 @@ 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')
headphones_launch = getAddonSetting(suiteSettings, 'HEADPHONES_LAUNCH')
# merge defaults
@ -169,8 +165,6 @@ if not sickbeard_launch:
sickbeard_launch = getAddonSetting(DefaultSuiteSettings, 'SICKBEARD_LAUNCH')
if not couchpotato_launch:
couchpotato_launch = getAddonSetting(DefaultSuiteSettings, 'COUCHPOTATO_LAUNCH')
if not couchpotato_version:
couchpotato_version = getAddonSetting(DefaultSuiteSettings, 'COUCHPOTATO_VERSION')
if not headphones_launch:
headphones_launch = getAddonSetting(DefaultSuiteSettings, 'HEADPHONES_LAUNCH')
@ -342,55 +336,6 @@ except Exception,e:
print traceback.format_exc()
# SickBeard end
# CouchPotato start
try:
# write CouchPotato settings
# --------------------------
couchPotatoConfig = ConfigObj(pCouchPotatoSettings,create_empty=True)
defaultConfig = ConfigObj()
defaultConfig['global'] = {}
defaultConfig['global']['launchbrowser'] = 'False'
defaultConfig['global']['updater'] = 'False'
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['XBMC'] = {}
defaultConfig['XBMC']['enabled'] = 'True'
defaultConfig['XBMC']['host'] = '127.0.0.1:' + xbmcPort
defaultConfig['XBMC']['username'] = xbmcUser
defaultConfig['XBMC']['password'] = xbmcPwd
if firstLaunch:
defaultConfig['Sabnzbd']['category'] = 'movies'
defaultConfig['Sabnzbd']['ppdir'] = pSabNzbdCompleteMov
defaultConfig['Renamer'] = {}
defaultConfig['Renamer']['enabled'] = 'True'
defaultConfig['Renamer']['download'] = pSabNzbdCompleteMov
defaultConfig['Renamer']['destination'] = '/storage/videos'
defaultConfig['Renamer']['separator'] = '.'
defaultConfig['Renamer']['cleanup'] = 'True'
couchPotatoConfig.merge(defaultConfig)
couchPotatoConfig.write()
# launch CouchPotato
# ------------------
if "true" in couchpotato_launch and "0" in couchpotato_version:
logging.debug('Launching CouchPotato...')
subprocess.call(couchPotato,close_fds=True)
logging.debug('...done')
except Exception,e:
print 'CouchPotato: exception occurred:', e
print traceback.format_exc()
# CouchPotato end
# CouchPotatoServer start
try:
# empty password hack
@ -458,7 +403,7 @@ try:
# launch CouchPotatoServer
# ------------------
if "true" in couchpotato_launch and "1" in couchpotato_version:
if "true" in couchpotato_launch:
logging.debug('Launching CouchPotatoServer...')
subprocess.call(couchPotatoServer,close_fds=True)
logging.debug('...done')

View File

@ -9,7 +9,6 @@
<string id="1024">Enable SABnzbd</string>
<string id="1025">Enable Sickbeard</string>
<string id="1026">Enable Couchpotato</string>
<string id="1027">Couchpotato Version</string>
<string id="1028">Enable Headphones</string>
<string id="2010">Network Settings</string>
<string id="2021">Allowed IP addresses</string>

View File

@ -9,7 +9,6 @@
<string id="1024">SABnzbd'yi Etkinleştir</string>
<string id="1025">Sickbeard'ı Etkinleştir</string>
<string id="1026">Couchpotato'yu Etkinleştir</string>
<string id="1027">Couchpotato Sürümü</string>
<string id="1028">Headphones'u Etkinleştir</string>
<string id="2010">Ağ Ayarları</string>
<string id="2021">İzin verilen IP adresleri</string>

View File

@ -10,7 +10,6 @@
<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="1" values="Version 1|Version 2" enable="eq(-1,true)" />
<setting id="HEADPHONES_LAUNCH" type="bool" label="1028" default="true" />
<setting label="2010" type="lsep"/>