diff --git a/config/addon/addon.xml b/config/addon/addon.xml index 92881eb1fb..7b53c47393 100644 --- a/config/addon/addon.xml +++ b/config/addon/addon.xml @@ -1,14 +1,15 @@ +@REQUIRES@ + library="default.py"> executable diff --git a/packages/python/web/Sick-Beard/install b/packages/addons/downloadmanager/CouchPotato/addon similarity index 92% rename from packages/python/web/Sick-Beard/install rename to packages/addons/downloadmanager/CouchPotato/addon index 4449de8177..a6d6b3cab7 100755 --- a/packages/python/web/Sick-Beard/install +++ b/packages/addons/downloadmanager/CouchPotato/addon @@ -23,6 +23,6 @@ . config/options $1 -mkdir -p $INSTALL/usr/lib/SickBeard - cp -PR $PKG_BUILD/* $INSTALL/usr/lib/SickBeard +mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/$1 + cp -PR $PKG_BUILD/* $ADDON_BUILD/$PKG_ADDON_ID/$1 diff --git a/packages/addons/downloadmanager/CouchPotato/changelog.txt b/packages/addons/downloadmanager/CouchPotato/changelog.txt new file mode 100644 index 0000000000..feb3355a71 --- /dev/null +++ b/packages/addons/downloadmanager/CouchPotato/changelog.txt @@ -0,0 +1,2 @@ +0.99.1 +- initial version CouchPotato diff --git a/packages/addons/downloadmanager/CouchPotato/icon/icon.png b/packages/addons/downloadmanager/CouchPotato/icon/icon.png new file mode 100644 index 0000000000..d189fe8ba2 Binary files /dev/null and b/packages/addons/downloadmanager/CouchPotato/icon/icon.png differ diff --git a/packages/addons/downloadmanager/CouchPotato/meta b/packages/addons/downloadmanager/CouchPotato/meta new file mode 100644 index 0000000000..e4f92d7d35 --- /dev/null +++ b/packages/addons/downloadmanager/CouchPotato/meta @@ -0,0 +1,40 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="CouchPotato" +PKG_VERSION="ded60e1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="https://github.com/RuudBurger/CouchPotato" +PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="Python SABnzbd" +PKG_BUILD_DEPENDS="toolchain Python" +PKG_PRIORITY="optional" +PKG_SECTION="downloadmanager" +PKG_SHORTDESC="CouchPotato: automated movie downloading." +PKG_LONGDESC="CouchPotato: automated movie downloading." + +PKG_IS_ADDON="yes" +PKG_ADDON_TYPE="xbmc.service" +PKG_ADDON_REQUIRES="addon.downloadmanager.SABnzbd:0.99.1" + +PKG_AUTORECONF="no" diff --git a/packages/addons/downloadmanager/CouchPotato/patches/CouchPotato-ded60e1-000-add_datadir_and_config_support-0.1.patch b/packages/addons/downloadmanager/CouchPotato/patches/CouchPotato-ded60e1-000-add_datadir_and_config_support-0.1.patch new file mode 100644 index 0000000000..afa884f705 --- /dev/null +++ b/packages/addons/downloadmanager/CouchPotato/patches/CouchPotato-ded60e1-000-add_datadir_and_config_support-0.1.patch @@ -0,0 +1,186 @@ +diff -Naur CouchPotato-ded60e1/app/config/db.py CouchPotato-ded60e1.patch/app/config/db.py +--- CouchPotato-ded60e1/app/config/db.py 2011-04-23 19:55:33.000000000 +0200 ++++ CouchPotato-ded60e1.patch/app/config/db.py 2011-04-23 20:26:44.495557932 +0200 +@@ -10,6 +10,7 @@ + import datetime + import os + import sys ++import app.config + + log = CPLog(__name__) + +@@ -24,7 +25,7 @@ + else: + path = os.path.join(os.path.abspath(os.path.curdir), 'data.db') + else: +- path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'data.db') ++ path = os.path.join(app.config.DATADIR, 'data.db') + + engine = create_engine('sqlite:///%s' % path) + metadata = MetaData(engine) +diff -Naur CouchPotato-ded60e1/app/config/__init__.py CouchPotato-ded60e1.patch/app/config/__init__.py +--- CouchPotato-ded60e1/app/config/__init__.py 2011-04-23 19:55:33.000000000 +0200 ++++ CouchPotato-ded60e1.patch/app/config/__init__.py 2011-04-23 20:26:44.480558230 +0200 +@@ -0,0 +1 @@ ++DATADIR=None +diff -Naur CouchPotato-ded60e1/app/controllers/log.py CouchPotato-ded60e1.patch/app/controllers/log.py +--- CouchPotato-ded60e1/app/controllers/log.py 2011-04-23 19:55:33.000000000 +0200 ++++ CouchPotato-ded60e1.patch/app/controllers/log.py 2011-04-23 20:26:44.505557734 +0200 +@@ -4,6 +4,7 @@ + from markupsafe import escape + import cherrypy + import os ++import app.config + + log = CPLog(__name__) + file = 'CouchPotato.log' +@@ -56,7 +57,7 @@ + return redirect(url(controller = 'log', action = 'index')) + + def logDir(self): +- return os.path.join(cherrypy.config.get('runPath'), 'logs') ++ return os.path.join(app.config.DATADIR, 'logs') + + def logFile(self): + return os.path.join(self.logDir(), file) +diff -Naur CouchPotato-ded60e1/CouchPotato.py CouchPotato-ded60e1.patch/CouchPotato.py +--- CouchPotato-ded60e1/CouchPotato.py 2011-04-23 19:55:33.000000000 +0200 ++++ CouchPotato-ded60e1.patch/CouchPotato.py 2011-04-23 20:26:50.127445945 +0200 +@@ -3,6 +3,7 @@ + import os + + rundir = os.path.dirname(os.path.abspath(__file__)) ++ + try: + frozen = sys.frozen + except AttributeError: +@@ -20,28 +21,9 @@ + sys.path.insert(0, path_base) + sys.path.insert(0, os.path.join(path_base, 'library')) + +-# Configure logging +-from app.config.cplog import CPLog +-debug = os.path.isfile(os.path.join(path_base, 'debug.conf')) +-log = CPLog() +-log.config(os.path.join(rundir, 'logs'), debug) +- +-# Create cache dir +-cachedir = os.path.join(rundir, 'cache') +-if not os.path.isdir(cachedir): +- os.mkdir(cachedir) +- +-import cherrypy +-import app.config.render +-from app.config.db import initDb +-from optparse import OptionParser +-from app.config.configApp import configApp +-from app.config.routes import setup as Routes +-from app.lib.cron import CronJobs +-from app.config.updater import Updater +-from cherrypy.process import plugins +- + def server_start(): ++ from optparse import OptionParser ++ + p = OptionParser() + p.add_option('-d', action = "store_true", + dest = 'daemonize', help = "Run the server as a daemon") +@@ -50,19 +32,80 @@ + p.add_option('-p', '--pidfile', + dest = 'pidfile', default = None, + help = "Store the process id in the given file") ++ p.add_option('--config', ++ dest = 'config', default = None, ++ help = "Path to config.ini file") ++ p.add_option('--datadir', ++ dest = 'datadir', default = None, ++ help = "Path to the data directory") ++ + + options, args = p.parse_args() ++ ++ if options.datadir: ++ datadir = options.datadir ++ ++ if not os.path.isdir(datadir): ++ os.makedirs(datadir) ++ ++ else: ++ datadir = rundir ++ ++ datadir = os.path.abspath(datadir) ++ ++ if not os.access(datadir, os.W_OK): ++ raise SystemExit("Data dir must be writeable '" + datadir + "'") ++ ++ import app.config ++ app.config.DATADIR = datadir ++ ++ if options.config: ++ config = options.config ++ else: ++ config = os.path.join(datadir, 'config.ini') ++ ++ config = os.path.abspath(config) + +- config = os.path.join(rundir, 'config.ini') ++ if not os.access(os.path.dirname(config), os.W_OK) and not os.access(config, os.W_OK): ++ if not os.path.exists(os.path.dirname(config)): ++ os.makedirs(os.path.dirname(config)) ++ else: ++ raise SystemExit("Directory for config file must be writeable") ++ ++ import cherrypy ++ import app.config.render ++ ++ # Configure logging ++ from app.config.cplog import CPLog ++ ++ # Setup logging ++ debug = os.path.isfile(os.path.join(datadir, 'debug.conf')) ++ log = CPLog() ++ log.config(os.path.join(datadir, 'logs'), debug) ++ ++ # Create cache dir ++ cachedir = os.path.join(datadir, 'cache') ++ if not os.path.isdir(cachedir): ++ os.mkdir(cachedir) + + # Stop logging + if options.quiet or options.daemonize: + cherrypy.config.update({'log.screen': False}) ++ + + # Config app ++ from app.config.configApp import configApp + ca = configApp(config) ++ ++ # Setup db ++ from app.config.db import initDb + initDb() + ++ from app.config.routes import setup as Routes ++ from app.lib.cron import CronJobs ++ from app.config.updater import Updater ++ from cherrypy.process import plugins ++ + # Check an see if CP is already running + import socket + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +@@ -129,7 +172,7 @@ + }, + '/cache':{ + 'tools.staticdir.on': True, +- 'tools.staticdir.root': rundir, ++ 'tools.staticdir.root': datadir, + 'tools.staticdir.dir': "cache", + 'tools.expires.on': True, + 'tools.expires.secs': 3600 * 24 * 7 +@@ -173,7 +216,6 @@ + if hasattr(cherrypy.engine, "console_control_handler"): + cherrypy.engine.console_control_handler.subscribe() + +- + ## start the app + try: + cherrypy.engine.start() diff --git a/packages/addons/downloadmanager/CouchPotato/source/bin/ini_tool b/packages/addons/downloadmanager/CouchPotato/source/bin/ini_tool new file mode 100755 index 0000000000..97f7b4c433 --- /dev/null +++ b/packages/addons/downloadmanager/CouchPotato/source/bin/ini_tool @@ -0,0 +1,117 @@ +#!/usr/bin/env python + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2011 Travis Glenn Hansen (travisghansen@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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +from configobj import ConfigObj +import sys +import os +import string + +python_major = sys.version_info[0] +python_minor = sys.version_info[1] + +prog="ini_tool" +description="""Read/Write config files. + +Examples: + %(prog)s --file config.ini --action read --option [section:]username + %(prog)s --file config.ini --action write --option [section:]username --value foo""" % {'prog':prog} + +def option_required_error(option): + parser.print_usage() + print prog + ": error: " + option + " is required" + exit(2) + +if python_major > 2 or (python_major == 2 and python_minor >= 7): + import argparse + + parser = argparse.ArgumentParser( + prog=prog, + description=description, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + + parser.add_argument('--file', help='file to read/write to/from', required=True) + parser.add_argument('--action', help='read|write', required=True) + parser.add_argument('--option', help='the option key', required=True) + parser.add_argument('--value', help='value to store in the given option (only for write action)') + + options = parser.parse_args() + +else: + import optparse + + parser = optparse.OptionParser( + prog=prog, + description=description, + ) + + parser.add_option('--file', help='file to read/write to/from') + parser.add_option('--action', help='read|write') + parser.add_option('--option', help='the option key') + parser.add_option('--value', help='value to store in the given option (only for write action)') + + (options, args) = parser.parse_args() + + if not options.file: + option_required_error("--file") + if not options.action: + option_required_error("--action") + if not options.option: + option_required_error("--option") + + +if options.action != "read" and options.action != "write": + print "'" + options.action + "' is not a valid action" + parser.print_help() + exit(2) + +if options.action == "read" and not os.path.isfile(options.file): + print "'" + options.file + "' is not a file" + exit(2) + +config = ConfigObj(options.file) +keys = string.split(options.option, ":") +key_len = len(keys) +current_section = config + +if options.action == 'read': + i = 1 + for key in keys: + if i == key_len: + print current_section[key] + exit(0) + else: + current_section = current_section[key] + i += 1 +elif options.action == 'write': + i = 1 + for key in keys: + if i == key_len: + current_section[key] = options.value + elif key not in current_section: + current_section[key] = {} + current_section = current_section[key] + i += 1 + + config.write() +else: + exit(1) \ No newline at end of file diff --git a/packages/addons/downloadmanager/CouchPotato/source/default.py b/packages/addons/downloadmanager/CouchPotato/source/default.py new file mode 100644 index 0000000000..08ea1c0de4 --- /dev/null +++ b/packages/addons/downloadmanager/CouchPotato/source/default.py @@ -0,0 +1,26 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +import sys +import xbmcaddon +import os + +if ( __name__ == "__main__" ): + os.system("start.sh") diff --git a/packages/addons/downloadmanager/CouchPotato/source/start.sh b/packages/addons/downloadmanager/CouchPotato/source/start.sh new file mode 100755 index 0000000000..7f956d88a2 --- /dev/null +++ b/packages/addons/downloadmanager/CouchPotato/source/start.sh @@ -0,0 +1,102 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + + export PATH="$PATH:./bin" + export PYTHONPATH="$PYTHONPATH:./pylib" + + COUCHPOTATO_HOME="$HOME/.xbmc/userdata/addon_data/addon.downloadmanager.CouchPotato" + SABNZBD_SETTINGS="$HOME/.xbmc/userdata/addon_data/addon.downloadmanager.SABnzbd/sabnzbd.ini" + XBMC_SETTINGS="$HOME/.xbmc/userdata/guisettings.xml" + + write_ini() { + python bin/ini_tool --action=write \ + --file=$COUCHPOTATO_HOME/config.ini \ + --option="$1:$2" \ + --value="$3" + } + + read_sabconfig() { + python bin/ini_tool --action=read \ + --file=$SABNZBD_SETTINGS \ + --option="$1:$2" + } + + read_xbmcconfig() { + grep "<$1>" $XBMC_SETTINGS | sed -e "s,[[:space:]]*<$1>,," -e "s,,," + } + + mkdir -p $COUCHPOTATO_HOME + chmod +x ./bin/* + + sleep 5 + + if [ ! -f "$COUCHPOTATO_HOME/config.ini" ]; then + COUCHPOTATO_FIRSTRUN="yes" + fi + + # default values + COUCHPOTATO_LAUNCHBROWSER="False" + COUCHPOTATO_VERSIONCHECK="False" + COUCHPOTATO_PORT="8083" + COUCHPOTATO_USEXBMC="True" + COUCHPOTATO_UPDATEXBMC="True" + + # read xbmc settings + XBMC_HOST="127.0.0.1" + XBMC_PORT=`read_xbmcconfig webserverport` + XBMC_USER=`read_xbmcconfig webserverusername` + XBMC_PWD=`read_xbmcconfig webserverpassword` + + # read sabnzbd settings + SABNZBD_HOST="127.0.0.1" + SABNZBD_PORT="8081" + SABNZBD_APIKEY=`read_sabconfig misc api_key` + SABNZBD_WEBUSERNAME=`read_sabconfig misc username` + SABNZBD_WEBPASSWORD=`read_sabconfig misc password` + + if [ -z "$COUCHPOTATO_HOST" ]; then + COUCHPOTATO_HOST="0.0.0.0" + fi + + write_ini global host $COUCHPOTATO_HOST + write_ini global port $COUCHPOTATO_PORT + write_ini global username $SABNZBD_WEBUSERNAME + write_ini global password $SABNZBD_WEBPASSWORD + write_ini global launchbrowser $COUCHPOTATO_LAUNCHBROWSER + write_ini global updater $COUCHPOTATO_VERSIONCHECK + + write_ini Sabnzbd username $SABNZBD_WEBUSERNAME + write_ini Sabnzbd password $SABNZBD_WEBPASSWORD + write_ini Sabnzbd apikey $SABNZBD_APIKEY + write_ini Sabnzbd host "$SABNZBD_HOST:$SABNZBD_PORT" + + write_ini XBMC enabled $COUCHPOTATO_USEXBMC + write_ini XBMC host "$XBMC_HOST:$XBMC_PORT" + write_ini XBMC username $XBMC_USER + write_ini XBMC password $XBMC_PWD + + if [ "$COUCHPOTATO_FIRSTRUN" = "yes" ]; then + write_ini XBMC updateoneonly $COUCHPOTATO_UPDATEXBMC + fi + + python ./CouchPotato/CouchPotato.py -d --datadir $COUCHPOTATO_HOME --config $COUCHPOTATO_HOME/config.ini diff --git a/packages/addons/downloadmanager/SABnzbd/patches/SABnzbd-0.6.0RC2-001_defaults-0.1.patch b/packages/addons/downloadmanager/SABnzbd/patches/SABnzbd-0.6.0RC2-001_defaults-0.1.patch deleted file mode 100644 index 4cceea678d..0000000000 --- a/packages/addons/downloadmanager/SABnzbd/patches/SABnzbd-0.6.0RC2-001_defaults-0.1.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -Naur SABnzbd-0.6.0RC2/sabnzbd/constants.py SABnzbd-0.6.0RC2.patch/sabnzbd/constants.py ---- SABnzbd-0.6.0RC2/sabnzbd/constants.py 2011-04-10 16:06:27.000000000 +0200 -+++ SABnzbd-0.6.0RC2.patch/sabnzbd/constants.py 2011-04-16 21:49:52.858788377 +0200 -@@ -70,8 +70,8 @@ - DB_HISTORY_NAME = 'history%s.db' % DB_HISTORY_VERSION - DB_QUEUE_NAME = 'queue%s.db' % DB_QUEUE_VERSION - --DEF_DOWNLOAD_DIR = 'Downloads/incomplete' --DEF_COMPLETE_DIR = 'Downloads/complete' -+DEF_DOWNLOAD_DIR = '/storage/downloads/incoming/' -+DEF_COMPLETE_DIR = '/storage/downloads/' - DEF_CACHE_DIR = 'cache' - DEF_ADMIN_DIR = 'admin' - DEF_LOG_DIR = 'logs' -@@ -83,12 +83,12 @@ - DEF_STDINTF = 'smpl' - DEF_SKIN_COLORS = {'smpl':'white', 'classic':'darkblue', 'mobile':'light', 'plush' : 'gold'} - DEF_MAIN_TMPL = 'templates/main.tmpl' --DEF_INI_FILE = 'sabnzbd.ini' --DEF_HOST = 'localhost' --DEF_PORT_WIN = 8080 --DEF_PORT_UNIX = 8080 --DEF_PORT_WIN_SSL = 9090 --DEF_PORT_UNIX_SSL= 9090 -+DEF_INI_FILE = 'sabnzbd.conf' -+DEF_HOST = '0.0.0.0' -+DEF_PORT_WIN = 8081 -+DEF_PORT_UNIX = 8081 -+DEF_PORT_WIN_SSL = 9081 -+DEF_PORT_UNIX_SSL= 9081 - DEF_WORKDIR = 'sabnzbd' - DEF_LOG_FILE = 'sabnzbd.log' - DEF_LOG_ERRFILE = 'sabnzbd.error.log' diff --git a/packages/addons/downloadmanager/SABnzbd/patches/SABnzbd-0.6.0RC2-001_remove_default_settings-0.2.patch b/packages/addons/downloadmanager/SABnzbd/patches/SABnzbd-0.6.0RC2-001_remove_default_settings-0.2.patch new file mode 100644 index 0000000000..6929607456 --- /dev/null +++ b/packages/addons/downloadmanager/SABnzbd/patches/SABnzbd-0.6.0RC2-001_remove_default_settings-0.2.patch @@ -0,0 +1,214 @@ +diff -Naur SABnzbd-0.6.0RC2/interfaces/Plush/templates/config_directories.tmpl SABnzbd-0.6.0RC2.patch/interfaces/Plush/templates/config_directories.tmpl +--- SABnzbd-0.6.0RC2/interfaces/Plush/templates/config_directories.tmpl 2011-04-10 16:06:26.000000000 +0200 ++++ SABnzbd-0.6.0RC2.patch/interfaces/Plush/templates/config_directories.tmpl 2011-04-22 15:08:09.323174151 +0200 +@@ -109,49 +109,6 @@ + + + +-
+-
+-

$T('systemFolders')

+-

$T('base-folder'):
$my_lcldata

+-
+-
+-
+- +- +- +-
+-
+- +- +-
+-
+- +- +-
+-
+-
+- +
+
+

 

+diff -Naur SABnzbd-0.6.0RC2/interfaces/Plush/templates/config_general.tmpl SABnzbd-0.6.0RC2.patch/interfaces/Plush/templates/config_general.tmpl +--- SABnzbd-0.6.0RC2/interfaces/Plush/templates/config_general.tmpl 2011-04-10 16:06:26.000000000 +0200 ++++ SABnzbd-0.6.0RC2.patch/interfaces/Plush/templates/config_general.tmpl 2011-04-22 14:59:06.304131312 +0200 +@@ -14,82 +14,6 @@ +
+
+
+- +- +-
+-
+- +- +-
+-
+- +- +-
+-
+- +- +-
+-
+- +- +-
+-
+- +- +-
+-
+ +-
+
+
+ +@@ -152,36 +69,6 @@ + $T('explain-enable_https') + + +-
+- +- +-
+-
+- +- +-
+-
+- +- +-
+ + + +diff -Naur SABnzbd-0.6.0RC2/interfaces/Plush/templates/config_switches.tmpl SABnzbd-0.6.0RC2.patch/interfaces/Plush/templates/config_switches.tmpl +--- SABnzbd-0.6.0RC2/interfaces/Plush/templates/config_switches.tmpl 2011-04-10 16:06:26.000000000 +0200 ++++ SABnzbd-0.6.0RC2.patch/interfaces/Plush/templates/config_switches.tmpl 2011-04-22 15:21:32.791455752 +0200 +@@ -12,20 +12,6 @@ +

$T('swtag-general')

+ +
+-
+- 0 then "checked=1" else ""#--> /> +- +-
+-
+- 0 then "checked=1" else ""#--> /> +- +-
+ +
+ 0 then "checked=1" else ""#--> /> diff --git a/packages/addons/downloadmanager/SABnzbd/patches/SABnzbd-0.6.0RC2-002-remove_host_settings-0.1.patch b/packages/addons/downloadmanager/SABnzbd/patches/SABnzbd-0.6.0RC2-002-remove_host_settings-0.1.patch deleted file mode 100644 index d33207187b..0000000000 --- a/packages/addons/downloadmanager/SABnzbd/patches/SABnzbd-0.6.0RC2-002-remove_host_settings-0.1.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff -Naur SABnzbd-0.6.0RC2/interfaces/Classic/templates/config_general.tmpl SABnzbd-0.6.0RC2.patch/interfaces/Classic/templates/config_general.tmpl ---- SABnzbd-0.6.0RC2/interfaces/Classic/templates/config_general.tmpl 2011-04-16 23:15:34.940298239 +0200 -+++ SABnzbd-0.6.0RC2.patch/interfaces/Classic/templates/config_general.tmpl 2011-04-16 23:21:11.140812740 +0200 -@@ -13,16 +13,6 @@ - - $T('webServer') - $T('restartRequired')

--$T('opt-host'):
--$T('explain-host')
-- --
--
--$T('opt-port'):
--$T('explain-port')
-- --
--
- $T('opt-web_dir'):
- $T('explain-web_dir')
- -- -- --
--
-- -- --
--
-
+- +-
+-
+- +- +-
+- +-
+- +- +-
+- +-
Click below to test.
+- +- +- +-
+- +-
+- +- +
+ +
+diff -Naur SickBeard-48caf04/data/interfaces/default/inc_top.tmpl SickBeard-48caf04.patch/data/interfaces/default/inc_top.tmpl +--- SickBeard-48caf04/data/interfaces/default/inc_top.tmpl 2011-04-23 03:59:09.000000000 +0200 ++++ SickBeard-48caf04.patch/data/interfaces/default/inc_top.tmpl 2011-04-23 14:24:01.035048035 +0200 +@@ -172,7 +172,6 @@ + +
- -
-- -- -- --
-- --
-
- -- -- -- --
[donate]Sickbeard is free, but you can contribute by giving a donation.
-- - #include $os.path.join($sickbeard.PROG_DIR, "data/interfaces/default/inc_bottom.tmpl") -diff -Naur Sick-Beard-0f076f4/data/interfaces/default/inc_top.tmpl Sick-Beard-0f076f4.patch/data/interfaces/default/inc_top.tmpl ---- Sick-Beard-0f076f4/data/interfaces/default/inc_top.tmpl 2011-04-16 17:14:02.055365889 +0200 -+++ Sick-Beard-0f076f4.patch/data/interfaces/default/inc_top.tmpl 2011-04-16 17:51:40.232667081 +0200 -@@ -147,19 +147,6 @@ - - - --#if $sickbeard.NEWEST_VERSION_STRING: --
--
-- $sickbeard.NEWEST_VERSION_STRING --
--
--
--#end if -- - - #if $varExists('submenu'): - - -diff -Naur Sick-Beard-0f076f4/sickbeard/__init__.py Sick-Beard-0f076f4.patch/sickbeard/__init__.py ---- Sick-Beard-0f076f4/sickbeard/__init__.py 2011-04-16 15:57:38.000000000 +0200 -+++ Sick-Beard-0f076f4.patch/sickbeard/__init__.py 2011-04-16 16:51:40.750117126 +0200 -@@ -393,12 +393,12 @@ - logger.log(u"!!! No log folder, logging to screen only!", logger.ERROR) - - try: -- WEB_PORT = check_setting_int(CFG, 'General', 'web_port', 8081) -+ WEB_PORT = check_setting_int(CFG, 'General', 'web_port', 8082) - except: -- WEB_PORT = 8081 -+ WEB_PORT = 8082 - - if WEB_PORT < 21 or WEB_PORT > 65535: -- WEB_PORT = 8081 -+ WEB_PORT = 8082 - - WEB_HOST = check_setting_str(CFG, 'General', 'web_host', '0.0.0.0') - WEB_IPV6 = bool(check_setting_int(CFG, 'General', 'web_ipv6', 0)) -diff -Naur Sick-Beard-0f076f4/sickbeard/webserveInit.py Sick-Beard-0f076f4.patch/sickbeard/webserveInit.py ---- Sick-Beard-0f076f4/sickbeard/webserveInit.py 2011-04-16 15:57:38.000000000 +0200 -+++ Sick-Beard-0f076f4.patch/sickbeard/webserveInit.py 2011-04-16 16:52:50.786662601 +0200 -@@ -24,7 +24,7 @@ - from sickbeard.webserve import WebInterface - - def initWebServer(options = {}): -- options.setdefault('port', 8081) -+ options.setdefault('port', 8082) - options.setdefault('host', '0.0.0.0') - options.setdefault('log_dir', None) - options.setdefault('username', '') diff --git a/packages/python/web/Sick-Beard/patches/Sick-Beard-0f076f4-002_enable_xbmc_support-0.1.patch b/packages/python/web/Sick-Beard/patches/Sick-Beard-0f076f4-002_enable_xbmc_support-0.1.patch deleted file mode 100644 index c62fd85f9a..0000000000 --- a/packages/python/web/Sick-Beard/patches/Sick-Beard-0f076f4-002_enable_xbmc_support-0.1.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -Naur Sick-Beard-0f076f4/sickbeard/__init__.py Sick-Beard-0f076f4.patch/sickbeard/__init__.py ---- Sick-Beard-0f076f4/sickbeard/__init__.py 2011-04-16 16:57:52.784398169 +0200 -+++ Sick-Beard-0f076f4.patch/sickbeard/__init__.py 2011-04-16 17:04:12.103546012 +0200 -@@ -190,12 +190,12 @@ - NZBGET_CATEGORY = None - NZBGET_HOST = None - --USE_XBMC = False -+USE_XBMC = True - XBMC_NOTIFY_ONSNATCH = False - XBMC_NOTIFY_ONDOWNLOAD = False - XBMC_UPDATE_LIBRARY = False - XBMC_UPDATE_FULL = False --XBMC_HOST = '' -+XBMC_HOST = '127.0.0.1:8080' - XBMC_USERNAME = None - XBMC_PASSWORD = None - -@@ -528,12 +528,12 @@ - NZBGET_CATEGORY = check_setting_str(CFG, 'NZBget', 'nzbget_category', 'tv') - NZBGET_HOST = check_setting_str(CFG, 'NZBget', 'nzbget_host', '') - -- USE_XBMC = bool(check_setting_int(CFG, 'XBMC', 'use_xbmc', 0)) -+ USE_XBMC = bool(check_setting_int(CFG, 'XBMC', 'use_xbmc', 1)) - XBMC_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'XBMC', 'xbmc_notify_onsnatch', 0)) - XBMC_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'XBMC', 'xbmc_notify_ondownload', 0)) - XBMC_UPDATE_LIBRARY = bool(check_setting_int(CFG, 'XBMC', 'xbmc_update_library', 0)) - XBMC_UPDATE_FULL = bool(check_setting_int(CFG, 'XBMC', 'xbmc_update_full', 0)) -- XBMC_HOST = check_setting_str(CFG, 'XBMC', 'xbmc_host', '') -+ XBMC_HOST = check_setting_str(CFG, 'XBMC', 'xbmc_host', '127.0.0.1:8080') - XBMC_USERNAME = check_setting_str(CFG, 'XBMC', 'xbmc_username', '') - XBMC_PASSWORD = check_setting_str(CFG, 'XBMC', 'xbmc_password', '') - diff --git a/packages/python/web/Sick-Beard/patches/Sick-Beard-0f076f4-005_setup_SABnzbd_host-0.1.patch b/packages/python/web/Sick-Beard/patches/Sick-Beard-0f076f4-005_setup_SABnzbd_host-0.1.patch deleted file mode 100644 index 45066a7cb7..0000000000 --- a/packages/python/web/Sick-Beard/patches/Sick-Beard-0f076f4-005_setup_SABnzbd_host-0.1.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur Sick-Beard-0f076f4/sickbeard/__init__.py Sick-Beard-0f076f4.patch/sickbeard/__init__.py ---- Sick-Beard-0f076f4/sickbeard/__init__.py 2011-04-16 22:38:48.449071968 +0200 -+++ Sick-Beard-0f076f4.patch/sickbeard/__init__.py 2011-04-16 22:52:23.704291427 +0200 -@@ -184,7 +184,7 @@ - SAB_PASSWORD = None - SAB_APIKEY = None - SAB_CATEGORY = None --SAB_HOST = '' -+SAB_HOST = '127.0.0.1:8081' - - NZBGET_PASSWORD = None - NZBGET_CATEGORY = None -@@ -522,7 +522,7 @@ - SAB_PASSWORD = check_setting_str(CFG, 'SABnzbd', 'sab_password', '') - SAB_APIKEY = check_setting_str(CFG, 'SABnzbd', 'sab_apikey', '') - SAB_CATEGORY = check_setting_str(CFG, 'SABnzbd', 'sab_category', 'tv') -- SAB_HOST = check_setting_str(CFG, 'SABnzbd', 'sab_host', '') -+ SAB_HOST = check_setting_str(CFG, 'SABnzbd', 'sab_host', '127.0.0.1:8081') - - NZBGET_PASSWORD = check_setting_str(CFG, 'NZBget', 'nzbget_password', 'tegbzn6789') - NZBGET_CATEGORY = check_setting_str(CFG, 'NZBget', 'nzbget_category', 'tv') diff --git a/scripts/create_addon b/scripts/create_addon index 617569e8bd..407cc7e1ff 100755 --- a/scripts/create_addon +++ b/scripts/create_addon @@ -22,6 +22,15 @@ . config/options $1 +IFS=" " +for i in $PKG_ADDON_REQUIRES; do + REQUIRES_ADDONNAME=`echo $i | cut -f1 -d ":"` + REQUIRES_ADDONVERSION=`echo $i | cut -f2 -d ":"` + REQUIRES="$REQUIRES\n " +done + +unset IFS + if [ -z "$1" ]; then echo "usage: $0 package_name" exit 1 @@ -46,8 +55,10 @@ if [ -f $PKG_DIR/addon ]; then mkdir -p $ADDON_BUILD/$PKG_ADDON_ID cp config/addon/addon.xml $ADDON_BUILD/$PKG_ADDON_ID $SED -e "s|@PKG_ADDON_ID@|$PKG_ADDON_ID|g" \ + -e "s|@PKG_NAME@|$PKG_NAME|g" \ -e "s|@ADDON_VERSION@|$OS_VERSION.$PKG_REV|g" \ -e "s|@PKG_ADDON_TYPE@|$PKG_ADDON_TYPE|g" \ + -e "s|@REQUIRES@|$REQUIRES|g" \ -e "s|@PKG_SHORTDESC@|$PKG_SHORTDESC|g" \ -e "s|@OS_VERSION@|$OS_VERSION|g" \ -e "s|@PKG_LONGDESC@|$PKG_LONGDESC|g" \ diff --git a/tools/mkpkg/mkpkg_couchpotato b/tools/mkpkg/mkpkg_couchpotato new file mode 100755 index 0000000000..affee0f4c5 --- /dev/null +++ b/tools/mkpkg/mkpkg_couchpotato @@ -0,0 +1,43 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +echo "getting sources..." + if [ ! -d CouchPotato.git ]; then + git clone git://github.com/RuudBurger/CouchPotato.git CouchPotato.git + fi + + cd CouchPotato.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + +echo "copying sources..." + rm -rf CouchPotato-$GIT_REV + cp -R CouchPotato.git CouchPotato-$GIT_REV + +echo "cleaning sources..." + rm -rf CouchPotato-$GIT_REV/.git + +echo "packing sources..." + tar cvjf CouchPotato-$GIT_REV.tar.bz2 CouchPotato-$GIT_REV + +echo "remove temporary sourcedir..." + rm -rf CouchPotato-$GIT_REV diff --git a/tools/mkpkg/mkpkg_sickbeard b/tools/mkpkg/mkpkg_sickbeard index 7c9fcb7b78..e960023a74 100755 --- a/tools/mkpkg/mkpkg_sickbeard +++ b/tools/mkpkg/mkpkg_sickbeard @@ -20,25 +20,24 @@ ################################################################################ echo "getting sources..." - if [ ! -d sickbeard.git ]; then - git clone git://github.com/midgetspy/Sick-Beard.git sickbeard.git - GIT_REV=`git log -n1 --format=%h` - else - cd sickbeard.git - git pull - GIT_REV=`git log -n1 --format=%h` - cd .. + if [ ! -d SickBeard.git ]; then + git clone git://github.com/midgetspy/Sick-Beard.git SickBeard.git fi + cd SickBeard.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + echo "copying sources..." - rm -rf sickbeard-$GIT_REV - cp -R sickbeard.git sickbeard-$GIT_REV + rm -rf SickBeard-$GIT_REV + cp -R SickBeard.git SickBeard-$GIT_REV echo "cleaning sources..." - rm -rf sickbeard-$GIT_REV/.git + rm -rf SickBeard-$GIT_REV/.git echo "packing sources..." - tar cvjf sickbeard-$GIT_REV.tar.bz2 sickbeard-$GIT_REV + tar cvjf SickBeard-$GIT_REV.tar.bz2 SickBeard-$GIT_REV echo "remove temporary sourcedir..." - rm -rf sickbeard-$GIT_REV + rm -rf SickBeard-$GIT_REV diff --git a/tools/mkpkg/mkpkg_tvheadend b/tools/mkpkg/mkpkg_tvheadend new file mode 100755 index 0000000000..f81c7dd0ca --- /dev/null +++ b/tools/mkpkg/mkpkg_tvheadend @@ -0,0 +1,43 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +echo "getting sources..." + if [ ! -d hts-tvheadend.git ]; then + git clone https://github.com/andoma/tvheadend.git hts-tvheadend.git + fi + + cd hts-tvheadend.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + +echo "copying sources..." + rm -rf hts-tvheadend-$GIT_REV + cp -R hts-tvheadend.git hts-tvheadend-$GIT_REV + +echo "cleaning sources..." + rm -rf hts-tvheadend-$GIT_REV/.git + +echo "packing sources..." + tar cvjf hts-tvheadend-$GIT_REV.tar.bz2 hts-tvheadend-$GIT_REV + +echo "remove temporary sourcedir..." + rm -rf hts-tvheadend-$GIT_REV