mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Updates to SABnzbd-suite
This commit is contained in:
parent
57ff06b161
commit
e4f664e3d6
2
packages/3rdparty/download/CouchPotato/meta
vendored
2
packages/3rdparty/download/CouchPotato/meta
vendored
@ -20,7 +20,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="CouchPotato"
|
||||
PKG_VERSION="46dbb59"
|
||||
PKG_VERSION="33a99b4"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
38
packages/3rdparty/download/CouchPotatoServer/meta
vendored
Normal file
38
packages/3rdparty/download/CouchPotatoServer/meta
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2011 Anthony Nash (nash.ant@gmail.com)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="CouchPotatoServer"
|
||||
PKG_VERSION="7367f7d"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="https://github.com/RuudBurger/CouchPotatoServer"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="Python SABnzbd"
|
||||
PKG_BUILD_DEPENDS="toolchain Python"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="service/downloadmanager"
|
||||
PKG_SHORTDESC="CouchPotatoServer: automated movie downloading."
|
||||
PKG_LONGDESC="CouchPotatoServer: automated movie downloading."
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="no"
|
2
packages/3rdparty/download/Headphones/meta
vendored
2
packages/3rdparty/download/Headphones/meta
vendored
@ -20,7 +20,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Headphones"
|
||||
PKG_VERSION="298463a"
|
||||
PKG_VERSION="f9f129b"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
@ -44,5 +44,8 @@ mkdir -p $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
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/Headphones
|
||||
cp -PR $BUILD/Headphones-*/* $ADDON_BUILD/$PKG_ADDON_ID/Headphones
|
||||
|
@ -5,4 +5,9 @@
|
||||
<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" />
|
||||
<setting id="HEADPHONES_LAUNCH" value="true" />
|
||||
</settings>
|
||||
|
@ -26,6 +26,7 @@ import xbmc
|
||||
import signal
|
||||
import subprocess
|
||||
import urllib2
|
||||
import hashlib
|
||||
from configobj import ConfigObj
|
||||
from xml.dom.minidom import parseString
|
||||
import logging
|
||||
@ -68,8 +69,9 @@ pDefaultSuiteSettings = os.path.join(pAddon, 'settings-default.xml')
|
||||
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, 'config.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')
|
||||
|
||||
# directories
|
||||
@ -87,9 +89,11 @@ pPylib = os.path.join(pAddon, 'pylib')
|
||||
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]
|
||||
'--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'),
|
||||
'-d', '--datadir', pAddonHome, '--config', pHeadphonesSettings]
|
||||
|
||||
@ -127,10 +131,15 @@ fSuiteSettings = open(pSuiteSettings, 'r')
|
||||
data = fSuiteSettings.read()
|
||||
fSuiteSettings.close
|
||||
suiteSettings = parseString(data)
|
||||
user = getAddonSetting(suiteSettings, 'SABNZBD_USER')
|
||||
pwd = getAddonSetting(suiteSettings, 'SABNZBD_PWD')
|
||||
host = getAddonSetting(suiteSettings, 'SABNZBD_IP')
|
||||
sabNzbdKeepAwake = getAddonSetting(suiteSettings, 'SABNZBD_KEEP_AWAKE')
|
||||
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')
|
||||
headphones_launch = getAddonSetting(suiteSettings, 'HEADPHONES_LAUNCH')
|
||||
|
||||
# XBMC
|
||||
fXbmcSettings = open(pXbmcSettings, 'r')
|
||||
@ -219,17 +228,17 @@ autoProcessConfig.write()
|
||||
|
||||
# launch SABnzbd and get the API key
|
||||
# ----------------------------------
|
||||
|
||||
logging.debug('Launching SABnzbd...')
|
||||
subprocess.call(sabnzbd,close_fds=True)
|
||||
logging.debug('...done')
|
||||
if "true" in sabnzbd_launch:
|
||||
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
|
||||
# ------------------------
|
||||
@ -244,11 +253,12 @@ defaultConfig['General']['web_port'] = '8082'
|
||||
defaultConfig['General']['web_host'] = host
|
||||
defaultConfig['General']['web_username'] = user
|
||||
defaultConfig['General']['web_password'] = pwd
|
||||
defaultConfig['SABnzbd'] = {}
|
||||
defaultConfig['SABnzbd']['sab_username'] = user
|
||||
defaultConfig['SABnzbd']['sab_password'] = pwd
|
||||
defaultConfig['SABnzbd']['sab_apikey'] = sabNzbdApiKey
|
||||
defaultConfig['SABnzbd']['sab_host'] = 'http://' + sabNzbdHost + '/'
|
||||
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['XBMC'] = {}
|
||||
defaultConfig['XBMC']['use_xbmc'] = '1'
|
||||
defaultConfig['XBMC']['xbmc_host'] = '127.0.0.1:' + xbmcPort
|
||||
@ -278,9 +288,10 @@ sickBeardConfig.write()
|
||||
|
||||
# launch SickBeard
|
||||
# ----------------
|
||||
logging.debug('Launching SickBeard...')
|
||||
subprocess.call(sickBeard,close_fds=True)
|
||||
logging.debug('...done')
|
||||
if "true" in sickbeard_launch:
|
||||
logging.debug('Launching SickBeard...')
|
||||
subprocess.call(sickBeard,close_fds=True)
|
||||
logging.debug('...done')
|
||||
|
||||
# write CouchPotato settings
|
||||
# --------------------------
|
||||
@ -294,11 +305,12 @@ defaultConfig['global']['password'] = pwd
|
||||
defaultConfig['global']['username'] = user
|
||||
defaultConfig['global']['port'] = '8083'
|
||||
defaultConfig['global']['host'] = host
|
||||
defaultConfig['Sabnzbd'] = {}
|
||||
defaultConfig['Sabnzbd']['username'] = user
|
||||
defaultConfig['Sabnzbd']['password'] = pwd
|
||||
defaultConfig['Sabnzbd']['apikey'] = sabNzbdApiKey
|
||||
defaultConfig['Sabnzbd']['host'] = sabNzbdHost
|
||||
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
|
||||
@ -320,10 +332,66 @@ 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')
|
||||
|
||||
logging.debug('Launching CouchPotato...')
|
||||
subprocess.call(couchPotato,close_fds=True)
|
||||
logging.debug('...done')
|
||||
#convert password to md5
|
||||
md5pwd = hashlib.md5(pwd).hexdigest()
|
||||
|
||||
# write CouchPotatoServer settings
|
||||
# --------------------------
|
||||
|
||||
couchPotatoServerConfig = ConfigObj(pCouchPotatoServerSettings,create_empty=True)
|
||||
defaultConfig = ConfigObj()
|
||||
defaultConfig['core'] = {}
|
||||
defaultConfig['core']['username'] = user
|
||||
defaultConfig['core']['password'] = md5pwd
|
||||
defaultConfig['core']['port'] = '8083'
|
||||
defaultConfig['core']['launchbrowser'] = '0'
|
||||
defaultConfig['core']['host'] = host
|
||||
defaultConfig['core']['data_dir'] = pAddonHome
|
||||
defaultConfig['core']['permission_folder'] = '0644'
|
||||
defaultConfig['core']['permission_file'] = '0644'
|
||||
defaultConfig['core']['show_wizard'] = '0'
|
||||
defaultConfig['core']['debug'] = '0'
|
||||
defaultConfig['core']['development'] = '0'
|
||||
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['xbmc'] = {}
|
||||
defaultConfig['xbmc']['enabled'] = '1'
|
||||
defaultConfig['xbmc']['host'] = '127.0.0.1:' + xbmcPort
|
||||
defaultConfig['xbmc']['username'] = xbmcUser
|
||||
defaultConfig['xbmc']['password'] = xbmcPwd
|
||||
|
||||
if firstLaunch:
|
||||
defaultConfig['Sabnzbd']['category'] = 'movies'
|
||||
defaultConfig['Sabnzbd']['pp_directory'] = pSabNzbdCompleteMov
|
||||
defaultConfig['Renamer'] = {}
|
||||
defaultConfig['Renamer']['enabled'] = 'True'
|
||||
defaultConfig['Renamer']['download'] = pSabNzbdCompleteMov
|
||||
defaultConfig['Renamer']['destination'] = '/storage/videos'
|
||||
defaultConfig['Renamer']['separator'] = '.'
|
||||
defaultConfig['Renamer']['cleanup'] = 'False'
|
||||
|
||||
couchPotatoServerConfig.merge(defaultConfig)
|
||||
couchPotatoServerConfig.write()
|
||||
|
||||
# launch CouchPotatoServer
|
||||
# ------------------
|
||||
if "true" in couchpotato_launch and "1" in couchpotato_version:
|
||||
logging.debug('Launching CouchPotatoServer...')
|
||||
subprocess.call(couchPotatoServer,close_fds=True)
|
||||
logging.debug('...done')
|
||||
|
||||
# write Headphones settings
|
||||
# -------------------------
|
||||
@ -336,11 +404,12 @@ defaultConfig['General']['http_port'] = '8084'
|
||||
defaultConfig['General']['http_host'] = host
|
||||
defaultConfig['General']['http_username'] = user
|
||||
defaultConfig['General']['http_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 "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
|
||||
|
||||
if firstLaunch:
|
||||
defaultConfig['SABnzbd']['sab_category'] = 'music'
|
||||
@ -355,7 +424,7 @@ headphonesConfig.write()
|
||||
|
||||
# launch Headphones
|
||||
# -----------------
|
||||
|
||||
logging.debug('Launching Headphones...')
|
||||
subprocess.call(headphones,close_fds=True)
|
||||
logging.debug('...done')
|
||||
if "true" in headphones_launch:
|
||||
logging.debug('Launching Headphones...')
|
||||
subprocess.call(headphones,close_fds=True)
|
||||
logging.debug('...done')
|
||||
|
@ -6,6 +6,11 @@
|
||||
<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 Coutchpotato</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>
|
||||
<string id="3010">Sleep</string>
|
||||
|
5
packages/addons/service/downloadmanager/SABnzbd-Suite/source/resources/settings.xml
Executable file → Normal file
5
packages/addons/service/downloadmanager/SABnzbd-Suite/source/resources/settings.xml
Executable file → Normal file
@ -7,6 +7,11 @@
|
||||
<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)" />
|
||||
<setting id="HEADPHONES_LAUNCH" type="bool" label="1028" default="true" />
|
||||
|
||||
<setting label="2010" type="lsep"/>
|
||||
<setting type="sep" />
|
||||
|
44
tools/mkpkg/mkpkg_couchpotatoserver
Executable file
44
tools/mkpkg/mkpkg_couchpotatoserver
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
echo "getting sources..."
|
||||
if [ ! -d CouchPotatoServer.git ]; then
|
||||
git clone git://github.com/RuudBurger/CouchPotatoServer.git CouchPotatoServer.git
|
||||
fi
|
||||
|
||||
cd CouchPotatoServer.git
|
||||
git pull
|
||||
GIT_REV=`git log -n1 --format=%h`
|
||||
rm -rf .git
|
||||
cd ..
|
||||
|
||||
echo "copying sources..."
|
||||
rm -rf CouchPotatoServer-$GIT_REV
|
||||
cp -R CouchPotatoServer.git CouchPotatoServer-$GIT_REV
|
||||
|
||||
echo "cleaning sources..."
|
||||
rm -rf CouchPotatoServer-$GIT_REV/.git
|
||||
|
||||
echo "packing sources..."
|
||||
tar cvJf CouchPotatoServer-$GIT_REV.tar.xz CouchPotatoServer-$GIT_REV
|
||||
|
||||
echo "remove temporary sourcedir..."
|
||||
rm -rf CouchPotatoServer-$GIT_REV
|
Loading…
x
Reference in New Issue
Block a user