SickBeard: move to '3rdparty'

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-06-14 00:43:37 +02:00
parent e7febc163e
commit c2a6f00ea6
9 changed files with 2 additions and 311 deletions

View File

@ -21,7 +21,7 @@
PKG_NAME="SickBeard"
PKG_VERSION="cb76543"
PKG_REV="4"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="OSS"
PKG_SITE="https://github.com/midgetspy/Sick-Beard"
@ -33,8 +33,6 @@ PKG_SECTION="service/downloadmanager"
PKG_SHORTDESC="SickBeard: automated TV show downloading."
PKG_LONGDESC="SickBeard: automated TV show downloading."
PKG_IS_ADDON="yes"
PKG_ADDON_TYPE="xbmc.service"
PKG_ADDON_REQUIRES="addon.downloadmanager.SABnzbd:0.99.1"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -1,30 +0,0 @@
#!/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
################################################################################
. config/options $1
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/$1
cp -PR $PKG_BUILD/* $ADDON_BUILD/$PKG_ADDON_ID/$1
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/pylib
cp -R $BUILD/Cheetah*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib

View File

@ -1,11 +0,0 @@
0.99.4
- copy postprocess scripts to SABnzbd
0.99.3
- update to SickBeard-cb76543
0.99.2
- fix start script
0.99.1
- initial version SickBeard-48caf04

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

View File

@ -1,126 +0,0 @@
#!/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
################################################################################
ADDON_DIR="$HOME/.xbmc/addons/service.downloadmanager.SickBeard"
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.downloadmanager.SickBeard"
LOG_FILE="$ADDON_HOME/service.log"
SABNZBD_HOME="$HOME/.xbmc/userdata/addon_data/service.downloadmanager.SABnzbd"
SABNZBD_SETTINGS="$SABNZBD_HOME/sabnzbd.ini"
XBMC_SETTINGS="$HOME/.xbmc/userdata/guisettings.xml"
export PYTHONPATH="$PYTHONPATH:$ADDON_DIR/pylib"
write_ini() {
python $ADDON_DIR/bin/ini_tool --action=write \
--file=$ADDON_HOME/config.ini \
--option="$1:$2" \
--value="$3"
}
read_sabconfig() {
python $ADDON_DIR/bin/ini_tool --action=read \
--file=$SABNZBD_SETTINGS \
--option="$1:$2"
}
read_xbmcconfig() {
grep "<$1>" $XBMC_SETTINGS | sed -e "s,[[:space:]]*<$1>,," -e "s,</$1>,,"
}
write_ini_postprocess() {
python $ADDON_DIR/bin/ini_tool --action=write \
--file=$SABNZBD_HOME/$SABNZBD_SCRIPTDIR/autoProcessTV.cfg \
--option="$1:$2" \
--value="$3"
}
mkdir -p $ADDON_HOME
if [ ! -f "$ADDON_HOME/config.ini" ]; then
SICKBEARD_FIRSTRUN="yes"
fi
# default values
SICKBEARD_LOGDIR="log"
SICKBEARD_CACHEDIR="cache"
SICKBEARD_PORT="8082"
SICKBEARD_LAUNCHBROWSER="0"
SICKBEARD_VERSIONCHECK="0"
SICKBEARD_USEIPV6="0"
SICKBEARD_WEBLOG="0"
SICKBEARD_USEXBMC="1"
SICKBEARD_METADATAXBMC="1|1|1|1|1|1"
# 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`
SABNZBD_SCRIPTDIR=`read_sabconfig misc script_dir`
if [ -z "$SICKBEARD_HOST" ]; then
SICKBEARD_HOST="0.0.0.0"
fi
write_ini General launch_browser $SICKBEARD_LAUNCHBROWSER
write_ini General version_notify $SICKBEARD_VERSIONCHECK
write_ini General log_dir $SICKBEARD_LOGDIR
write_ini General cache_dir $SICKBEARD_CACHEDIR
write_ini General web_port $SICKBEARD_PORT
write_ini General web_host $SICKBEARD_HOST
write_ini General web_ipv6 $SICKBEARD_USEIPV6
write_ini General web_log $SICKBEARD_WEBLOG
write_ini General web_username $SABNZBD_WEBUSERNAME
write_ini General web_password $SABNZBD_WEBPASSWORD
write_ini SABnzbd sab_username $SABNZBD_WEBUSERNAME
write_ini SABnzbd sab_password $SABNZBD_WEBPASSWORD
write_ini SABnzbd sab_apikey $SABNZBD_APIKEY
write_ini SABnzbd sab_host "http://$SABNZBD_HOST:$SABNZBD_PORT/"
write_ini XBMC use_xbmc $SICKBEARD_USEXBMC
write_ini XBMC xbmc_host "$XBMC_HOST:$XBMC_PORT"
write_ini XBMC xbmc_username $XBMC_USER
write_ini XBMC xbmc_password $XBMC_PWD
if [ "$SICKBEARD_FIRSTRUN" = "yes" ]; then
write_ini General metadata_xbmc $SICKBEARD_METADATAXBMC
fi
mkdir -p $SABNZBD_HOME/$SABNZBD_SCRIPTDIR
cp -P $ADDON_DIR/SickBeard/autoProcessTV/*.py $SABNZBD_HOME/$SABNZBD_SCRIPTDIR
chmod +x $SABNZBD_HOME/$SABNZBD_SCRIPTDIR/*.py
write_ini_postprocess SickBeard host localhost
write_ini_postprocess SickBeard port $SICKBEARD_PORT
write_ini_postprocess SickBeard username $SABNZBD_WEBUSERNAME
write_ini_postprocess SickBeard password $SABNZBD_WEBPASSWORD
python $ADDON_DIR/SickBeard/SickBeard.py --daemon --datadir $ADDON_HOME

View File

@ -1,117 +0,0 @@
#!/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)

View File

@ -1,23 +0,0 @@
################################################################################
# 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 xbmc, time, os, subprocess
os.system("SickBeard.service")