diff --git a/gui/slick/css/dark.css b/gui/slick/css/dark.css index bfa3a5a4ebd02cb4be00140bec21c6b496d9a00f..fefc3fe3a74e8c43b7a6c1a35c4b1a388f0318e5 100644 --- a/gui/slick/css/dark.css +++ b/gui/slick/css/dark.css @@ -1865,6 +1865,10 @@ span.HD { background-color: #2672B6; } +span.HDTV { + background-color: #2672B6; +} + span.HD720p { background-color: #5b990d; } @@ -1877,10 +1881,18 @@ span.RawHD { background-color: #cd7300; } +span.RawHDTV { + background-color: #cd7300; +} + span.SD { background-color: #BE2625; } +span.SDTV { + background-color: #BE2625; +} + span.Any { background-color: #666; } diff --git a/gui/slick/css/light.css b/gui/slick/css/light.css index bac5f6b6e8bf94eac0a94c7328385c388c3d4802..9518a99faa6424f707ac0915f3172b983f6b011a 100644 --- a/gui/slick/css/light.css +++ b/gui/slick/css/light.css @@ -1832,6 +1832,10 @@ span.HD { background-color: #2672B6; } +span.HDTV { + background-color: #2672B6; +} + span.HD720p { background-color: #5b990d; } @@ -1844,10 +1848,18 @@ span.RawHD { background-color: #cd7300; } +span.RawHDTV { + background-color: #cd7300; +} + span.SD { background-color: #BE2625; } +span.SDTV { + background-color: #BE2625; +} + span.Any { background-color: #666; } diff --git a/gui/slick/css/style.css b/gui/slick/css/style.css index b577add343a9beedfc35aaf0de067b86b9d6aeb4..0e0cfafcf1c52d83bd8f6a51c229a517df963850 100644 --- a/gui/slick/css/style.css +++ b/gui/slick/css/style.css @@ -1913,6 +1913,10 @@ span.HD { background-color: #2672B6; } +span.HDTV { + background-color: #2672B6; +} + span.HD720p { background-color: #5b990d; } @@ -1925,10 +1929,18 @@ span.RawHD { background-color: #cd7300; } +span.RawHDTV { + background-color: #cd7300; +} + span.SD { background-color: #BE2625; } +span.SDTV { + background-color: #BE2625; +} + span.Any { background-color: #666; } diff --git a/gui/slick/images/network/cbc (ca).png b/gui/slick/images/network/cbc (ca).png new file mode 100644 index 0000000000000000000000000000000000000000..f8b33e70e032048a374cac2540420e1cb5e87465 Binary files /dev/null and b/gui/slick/images/network/cbc (ca).png differ diff --git a/gui/slick/images/network/cottage life.png b/gui/slick/images/network/cottage life.png new file mode 100644 index 0000000000000000000000000000000000000000..ffe793dde59b9a937e3bd89b6a60fd3354c4721d Binary files /dev/null and b/gui/slick/images/network/cottage life.png differ diff --git a/gui/slick/images/network/discovery channel.png b/gui/slick/images/network/discovery channel.png index 3765c50cd5db02e041349fc5b8e0bb3d7064947a..dc9b22d8fb84c08a438b29ed319e4bde16b93a94 100644 Binary files a/gui/slick/images/network/discovery channel.png and b/gui/slick/images/network/discovery channel.png differ diff --git a/gui/slick/images/network/discovery.png b/gui/slick/images/network/discovery.png index 3765c50cd5db02e041349fc5b8e0bb3d7064947a..dc9b22d8fb84c08a438b29ed319e4bde16b93a94 100644 Binary files a/gui/slick/images/network/discovery.png and b/gui/slick/images/network/discovery.png differ diff --git a/gui/slick/images/network/discoverychannel.png b/gui/slick/images/network/discoverychannel.png index 3765c50cd5db02e041349fc5b8e0bb3d7064947a..dc9b22d8fb84c08a438b29ed319e4bde16b93a94 100644 Binary files a/gui/slick/images/network/discoverychannel.png and b/gui/slick/images/network/discoverychannel.png differ diff --git a/gui/slick/images/network/espn 2.png b/gui/slick/images/network/espn 2.png new file mode 100644 index 0000000000000000000000000000000000000000..d91137773ecd4e83ee3f0b80d7206bb5feb5d1dc Binary files /dev/null and b/gui/slick/images/network/espn 2.png differ diff --git a/gui/slick/images/network/funimation channel.png b/gui/slick/images/network/funimation channel.png new file mode 100644 index 0000000000000000000000000000000000000000..c2398c91def791e7fb37328551fe34d2fd818dc6 Binary files /dev/null and b/gui/slick/images/network/funimation channel.png differ diff --git a/gui/slick/images/network/itv.png b/gui/slick/images/network/itv.png index 5fd35aba386613c868e86766ef7e9627007469fc..43707436813c6cea31d4966ff077f57af32a5e69 100644 Binary files a/gui/slick/images/network/itv.png and b/gui/slick/images/network/itv.png differ diff --git a/gui/slick/images/network/itv1.png b/gui/slick/images/network/itv1.png index 5fd35aba386613c868e86766ef7e9627007469fc..43707436813c6cea31d4966ff077f57af32a5e69 100644 Binary files a/gui/slick/images/network/itv1.png and b/gui/slick/images/network/itv1.png differ diff --git a/gui/slick/images/network/itv2.png b/gui/slick/images/network/itv2.png index 5fd35aba386613c868e86766ef7e9627007469fc..7455a4bb725810d322e27ceee442604869317df7 100644 Binary files a/gui/slick/images/network/itv2.png and b/gui/slick/images/network/itv2.png differ diff --git a/gui/slick/images/network/itv3.png b/gui/slick/images/network/itv3.png index 5fd35aba386613c868e86766ef7e9627007469fc..059d4189dff37f4f98a4351c651d5059a4f9731d 100644 Binary files a/gui/slick/images/network/itv3.png and b/gui/slick/images/network/itv3.png differ diff --git a/gui/slick/images/network/itv4.png b/gui/slick/images/network/itv4.png index 5fd35aba386613c868e86766ef7e9627007469fc..72ce0189700e7b6ab147ac37f9b0c3746433fa50 100644 Binary files a/gui/slick/images/network/itv4.png and b/gui/slick/images/network/itv4.png differ diff --git a/gui/slick/images/network/national geographic (us).png b/gui/slick/images/network/national geographic (us).png new file mode 100644 index 0000000000000000000000000000000000000000..b4a5f277b5081829253bf9b6564293f0ebfcc820 Binary files /dev/null and b/gui/slick/images/network/national geographic (us).png differ diff --git a/gui/slick/interfaces/default/displayShow.tmpl b/gui/slick/interfaces/default/displayShow.tmpl index 2111f4253f1991bbd7c204c80089dee5bd2c393c..92005c5fea5ecba4993cb49c2f2da5fa63c2e7c1 100644 --- a/gui/slick/interfaces/default/displayShow.tmpl +++ b/gui/slick/interfaces/default/displayShow.tmpl @@ -590,7 +590,7 @@ </td> #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($epResult["status"])) #if $curQuality != Quality.NONE: - <td class="col-status">$statusStrings[$curStatus] <span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("RawHD TV", "RawHD").replace("HD TV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td> + <td class="col-status">$statusStrings[$curStatus] <span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("HDTV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td> #else: <td class="col-status">$statusStrings[$curStatus]</td> #end if diff --git a/gui/slick/interfaces/default/history.tmpl b/gui/slick/interfaces/default/history.tmpl index a47cf2ac8f174f9140d2bb2244fa38d9da7ec8e2..1d31ec0b5129afed2506d24393458d2fc106e6ed 100644 --- a/gui/slick/interfaces/default/history.tmpl +++ b/gui/slick/interfaces/default/history.tmpl @@ -160,7 +160,7 @@ #end if </td> <span style="display: none;">$curQuality</span> - <td align="center"><span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("RawHD TV", "RawHD").replace("HD TV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td> + <td align="center"><span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("HDTV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td> </tr> #end for </tbody> diff --git a/gui/slick/js/blackwhite.js b/gui/slick/js/blackwhite.js index 69022d02e4c7938bb765d7afeb77b13d7344b694..7509a6f000c08d964fb7038e0fcad14507af8f2f 100644 --- a/gui/slick/js/blackwhite.js +++ b/gui/slick/js/blackwhite.js @@ -13,7 +13,7 @@ function generate_bwlist() { $("#blacklist").val(realvalues.join(",")); }; -function update_bwlist (show_name) { +function update_bwlist(show_name) { $('#pool').children().remove(); $('#blackwhitelist').show(); @@ -52,21 +52,23 @@ $('#removeB').click(function() { }); $('#addToWhite').click(function() { - var group = $('#addToPoolText').attr("value"); - if(group == "") { return; } - $('#addToPoolText').attr("value", ""); - var option = $("<option>"); - option.attr("value",group); - option.html(group); - option.appendTo('#white'); + var group = $('#addToPoolText').val(); + if('' != group) { + var option = $('<option>'); + option.attr('value',group); + option.html(group); + option.appendTo('#white'); + $('#addToPoolText').val(''); + } }); $('#addToBlack').click(function() { - var group = $('#addToPoolText').attr("value"); - if(group == "") { return; } - $('#addToPoolText').attr("value", ""); - var option = $("<option>"); - option.attr("value",group); - option.html(group); - option.appendTo('#black'); + var group = $('#addToPoolText').val(); + if('' != group) { + var option = $('<option>'); + option.attr('value',group); + option.html(group); + option.appendTo('#black'); + $('#addToPoolText').val(''); + } }); \ No newline at end of file diff --git a/runscripts/init.debian b/runscripts/init.debian index 2b0aa7bb2fb201bece060a44dbeac208f988d619..85ca911bd6b6da07ba630addfe94c9fa027f6aba 100755 --- a/runscripts/init.debian +++ b/runscripts/init.debian @@ -1,15 +1,15 @@ #!/bin/sh # ### BEGIN INIT INFO -# Provides: sickbeard +# Provides: sickrage # Required-Start: $local_fs $network $remote_fs # Required-Stop: $local_fs $network $remote_fs # Should-Start: $NetworkManager # Should-Stop: $NetworkManager # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: starts instance of SickBeard -# Description: starts instance of SickBeard using start-stop-daemon +# Short-Description: starts instance of SickRage +# Description: starts instance of SickRage using start-stop-daemon ### END INIT INFO # Load the VERBOSE setting and other rcS variables @@ -19,57 +19,57 @@ # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions -# Source SickBeard configuration -if [ -f /etc/default/sickbeard ]; then - . /etc/default/sickbeard +# Source SickRage configuration +if [ -f /etc/default/sickrage ]; then + . /etc/default/sickrage else - [ "${VERBOSE}" != no ] && echo "/etc/default/sickbeard not found. Using default settings."; + [ "${VERBOSE}" != no ] && echo "/etc/default/sickrage not found. Using default settings."; fi ## Don't set -e ## Don't edit this file! -## Edit user configuation in /etc/default/sickbeard to change +## Edit user configuation in /etc/default/sickrage to change ## -## SB_USER= #$RUN_AS, username to run sickbeard under, the default is sickbeard -## SB_GROUP= #$RUN_GROUP, group to run sickbeard under, the default is sickbeard -## SB_HOME= #$APP_PATH, the location of SickBeard.py, the default is /opt/sickbeard -## SB_DATA= #$DATA_DIR, the location of sickbeard.db, cache, logs, the default is /opt/sickbeard -## SB_PIDFILE= #$PID_FILE, the location of sickbeard.pid, the default is /var/run/sickbeard/sickbeard.pid +## SR_USER= #$RUN_AS, username to run sickrage under, the default is sickrage +## SR_GROUP= #$RUN_GROUP, group to run sickrage under, the default is sickrage +## SR_HOME= #$APP_PATH, the location of SickBeard.py, the default is /opt/sickrage +## SR_DATA= #$DATA_DIR, the location of sickbeard.db, cache, logs, the default is /opt/sickrage +## SR_PIDFILE= #$PID_FILE, the location of sickrage.pid, the default is /var/run/sickrage/sickrage.pid ## PYTHON_BIN= #$DAEMON, the location of the python binary, the default is /usr/bin/python -## SB_OPTS= #$EXTRA_DAEMON_OPTS, extra cli option for sickbeard, i.e. " --config=/home/sickbeard/config.ini" +## SR_OPTS= #$EXTRA_DAEMON_OPTS, extra cli option for sickrage, i.e. " --config=/home/sickrage/config.ini" ## SSD_OPTS= #$EXTRA_SSD_OPTS, extra start-stop-daemon option like " --group=users" ## ## EXAMPLE if want to run as different user -## add SB_USER=username to /etc/default/sickbeard -## otherwise default sickbeard is used +## add SR_USER=username to /etc/default/sickrage +## otherwise default sickrage is used # Script name NAME=$(basename "$0") # App name -DESC=SickBeard +DESC=SickRage ## The defaults # Run as username -RUN_AS=${SB_USER-sickbeard} +RUN_AS=${SR_USER-sickrage} # Run as group -RUN_GROUP=${SB_GROUP-sickbeard} +RUN_GROUP=${SR_GROUP-sickrage} -# Path to app SB_HOME=path_to_app_SickBeard.py -APP_PATH=${SB_HOME-/opt/sickbeard} +# Path to app SR_HOME=path_to_app_SickBeard.py +APP_PATH=${SR_HOME-/opt/sickrage} # Data directory where sickbeard.db, cache and logs are stored -DATA_DIR=${SB_DATA-/opt/sickbeard} +DATA_DIR=${SR_DATA-/opt/sickrage} # Path to store PID file -PID_FILE=${SB_PIDFILE-/var/run/sickbeard/sickbeard.pid} +PID_FILE=${SR_PIDFILE-/var/run/sickrage/sickrage.pid} # path to python bin DAEMON=${PYTHON_BIN-/usr/bin/python} -# Extra daemon option like: SB_OPTS=" --config=/home/sickbeard/config.ini" -EXTRA_DAEMON_OPTS=${SB_OPTS-} +# Extra daemon option like: SR_OPTS=" --config=/home/sickrage/config.ini" +EXTRA_DAEMON_OPTS=${SR_OPTS-} # Extra start-stop-daemon option like START_OPTS=" --group=users" EXTRA_SSD_OPTS=${SSD_OPTS-} @@ -82,7 +82,7 @@ DAEMON_OPTS=" SickBeard.py -q --daemon --nolaunch --pidfile=${PID_FILE} --datadi test -x $DAEMON || exit 0 -# Create PID directory if not exist and ensure the SickBeard user can write to it +# Create PID directory if not exist and ensure the SickRage user can write to it if [ ! -d $PID_PATH ]; then mkdir -p $PID_PATH chown $RUN_AS $PID_PATH @@ -101,7 +101,7 @@ if [ -e $PID_FILE ]; then fi fi -start_sickbeard() { +start_sickrage() { [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" start-stop-daemon -d $APP_PATH -c $RUN_AS --group=${RUN_GROUP} $EXTRA_SSD_OPTS --start --quiet --pidfile $PID_FILE --exec $DAEMON -- $DAEMON_OPTS RETVAL="$?" @@ -115,7 +115,7 @@ start_sickbeard() { return 0 } -stop_sickbeard() { +stop_sickrage() { [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" start-stop-daemon --stop --pidfile $PID_FILE --quiet --retry TERM/30/KILL/5 RETVAL="$?" @@ -132,18 +132,18 @@ stop_sickbeard() { case "$1" in start) - start_sickbeard + start_sickrage exit $? ;; stop) - stop_sickbeard + stop_sickrage exit $? ;; restart|force-reload) - stop_sickbeard + stop_sickrage sleep 2 - start_sickbeard + start_sickrage exit $? ;; status) diff --git a/runscripts/init.fedora b/runscripts/init.fedora index 057a920af003f480b0d57d34b3a131d5d0ace685..4fd9ede44439d5d2e3330b19918fed929d005451 100755 --- a/runscripts/init.fedora +++ b/runscripts/init.fedora @@ -1,7 +1,7 @@ #!/bin/sh # ### BEGIN INIT INFO -# Provides: sickbeard +# Provides: sickrage # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 @@ -13,27 +13,27 @@ # Source function library. . /etc/init.d/functions -# Source SickBeard configuration -if [ -f /etc/sysconfig/sickbeard ]; then - . /etc/sysconfig/sickbeard +# Source SickRage configuration +if [ -f /etc/sysconfig/sickrage ]; then + . /etc/sysconfig/sickrage fi -prog=sickbeard +prog=sickrage lockfile=/var/lock/subsys/$prog -## Edit user configuation in /etc/sysconfig/sickbeard to change +## Edit user configuation in /etc/sysconfig/sickrage to change ## the defaults -username=${SB_USER-sickbeard} -homedir=${SB_HOME-/opt/sickbeard} -datadir=${SB_DATA-/opt/sickbeard} -pidfile=${SB_PIDFILE-/var/run/sickbeard/sickbeard.pid} -nice=${SB_NICE-} +username=${SR_USER-sickrage} +homedir=${SR_HOME-/opt/sickrage} +datadir=${SR_DATA-/opt/sickrage} +pidfile=${SR_PIDFILE-/var/run/sickrage/sickrage.pid} +nice=${SR_NICE-} ## pidpath=`dirname ${pidfile}` options=" --daemon --nolaunch --pidfile=${pidfile} --datadir=${datadir}" -# create PID directory if not exist and ensure the SickBeard user can write to it +# create PID directory if not exist and ensure the SickRage user can write to it if [ ! -d $pidpath ]; then mkdir -p $pidpath chown $username $pidpath diff --git a/runscripts/init.freebsd b/runscripts/init.freebsd index 4f3614673029d667bcce22a0e397c97fb2395f42..a6df540f00f782aa5769279c5c7c57cfe7770479 100755 --- a/runscripts/init.freebsd +++ b/runscripts/init.freebsd @@ -1,55 +1,55 @@ #!/bin/sh # -# PROVIDE: sickbeard +# PROVIDE: sickrage # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # -# sickbeard_enable (bool): Set to NO by default. +# sickrage_enable (bool): Set to NO by default. # Set it to YES to enable it. -# sickbeard_user: The user account SickRage daemon runs as what -# you want it to be. It uses '_sabnzbd' user by +# sickrage_user: The user account SickRage daemon runs as what +# you want it to be. It uses 'sickrage' user by # default. Do not sets it as empty or it will run # as root. -# sickbeard_group: The group account SickRage daemon runs as what -# you want it to be. It uses '_sabnzbd' group by +# sickrage_group: The group account SickRage daemon runs as what +# you want it to be. It uses 'sickrage' group by # default. Do not sets it as empty or it will run # as wheel. -# sickbeard_dir: Directory where SickRage lives. -# Default: /usr/local/sickbeard -# sickbeard_datadir: Data directory for Sick Beard (DB, Logs, config) -# Default is same as sickbeard_dir +# sickrage_dir: Directory where SickRage lives. +# Default: /usr/local/sickrage +# sickrage_datadir: Data directory for SickRage (DB, Logs, config) +# Default is same as sickrage_dir . /etc/rc.subr -name="sickbeard" +name="sickrage" rcvar=${name}_enable load_rc_config ${name} -: ${sickbeard_enable:="NO"} -: ${sickbeard_user:="_sabnzbd"} -: ${sickbeard_group:="_sabnzbd"} -: ${sickbeard_dir:="/usr/local/sickbeard"} -: ${sickbeard_datadir:="${sickbeard_dir}"} +: ${sickrage_enable:="NO"} +: ${sickrage_user:="sickrage"} +: ${sickrage_group:="sickrage"} +: ${sickrage_dir:="/usr/local/sickrage"} +: ${sickrage_datadir:="${sickrage_dir}"} -pidfile="/var/run/sickbeard/sickbeard.pid" +pidfile="/var/run/sickrage/sickrage.pid" command="/usr/local/bin/python2.7" -command_args="${sickbeard_dir}/SickBeard.py --datadir ${sickbeard_datadir} -d --pidfile ${pidfile} --quiet --nolaunch" +command_args="${sickrage_dir}/SickBeard.py --datadir ${sickrage_datadir} -d --pidfile ${pidfile} --quiet --nolaunch" -start_precmd="sickbeard_prestart" -sickbeard_prestart() { +start_precmd="sickrage_prestart" +sickrage_prestart() { if [ -f ${pidfile} ]; then rm -f ${pidfile} echo "Removing stale pidfile." elif [ ! -d ${pidfile%/*} ]; then - install -d -o ${sickbeard_user} -g ${sickbeard_group} ${pidfile%/*} + install -d -o ${sickrage_user} -g ${sickrage_group} ${pidfile%/*} fi - if [ ! -d ${sickbeard_datadir} ]; then - install -d -o ${sickbeard_user} -g ${sickbeard_group} ${sickbeard_datadir} + if [ ! -d ${sickrage_datadir} ]; then + install -d -o ${sickrage_user} -g ${sickrage_group} ${sickrage_datadir} fi } diff --git a/runscripts/init.gentoo b/runscripts/init.gentoo index 9791edd6d6d0d4cc6f81f579d0b75329235db622..43147d9b8a28642d9314abe02980f161b3049aa5 100755 --- a/runscripts/init.gentoo +++ b/runscripts/init.gentoo @@ -7,17 +7,17 @@ # 1/29 Created Richard Powell richard@powell.ws # You will need to create a configuration file in order for this script -# to work properly. Please create /etc/conf.d/sickbeard with the following: +# to work properly. Please create /etc/conf.d/sickrage with the following: # -# SICKBEARD_USER=<user you want sickbeard to run under> -# SICKBEARD_GROUP=<group you want sickbeard to run under> -# SICKBEARD_DIR=<path to Sickbeard.py> +# SICKRAGE_USER=<user you want sickrage to run under> +# SICKRAGE_GROUP=<group you want sickrage to run under> +# SICKRAGE_DIR=<path to Sickbeard.py> # PATH_TO_PYTHON_2=/usr/bin/python2 -# SICKBEARD_DATADIR=<directory that contains sickbeard.db file> -# SICKBEARD_CONFDIR=<directory that contains Sickbeard's config.ini file> +# SICKRAGE_DATADIR=<directory that contains sickbeard.db file> +# SICKRAGE_CONFDIR=<directory that contains Sickrage's config.ini file> # -RUNDIR=/var/run/sickbeard +RUNDIR=/var/run/sickrage depend() { need net @@ -30,32 +30,32 @@ get_pidfile() { -e 's/[[:space:]]*$//' \ -e 's/^[[:space:]]*//' \ -e "s/^\(.*\)=\([^\"']*\)$/\1=\"\2\"/" \ - < ${SICKBEARD_CONFDIR}/config.ini \ + < ${SICKRAGE_CONFDIR}/config.ini \ | sed -n -e "/^\[General\]/,/^\s*\[/{/^[^;].*\=.*/p;}"` - echo "${RUNDIR}/sickbeard-${web_port}.pid" + echo "${RUNDIR}/sickrage-${web_port}.pid" } start() { - ebegin "Starting Sickbeard" + ebegin "Starting Sickrage" - checkpath -q -d -o ${SICKBEARD_USER}:${SICKBEARD_GROUP} -m 0770 "${RUNDIR}" + checkpath -q -d -o ${SICKRAGE_USER}:${SICKRAGE_GROUP} -m 0770 "${RUNDIR}" start-stop-daemon \ --quiet \ --start \ - --user ${SICKBEARD_USER} \ - --group ${SICKBEARD_GROUP} \ - --name sickbeard \ + --user ${SICKRAGE_USER} \ + --group ${SICKRAGE_GROUP} \ + --name sickrage \ --background \ --pidfile $(get_pidfile) \ --exec ${PATH_TO_PYTHON_2} \ -- \ - ${SICKBEARD_DIR}/SickBeard.py \ + ${SICKRAGE_DIR}/SickBeard.py \ -d \ --pidfile $(get_pidfile) \ - --config ${SICKBEARD_CONFDIR}/config.ini \ - --datadir ${SICKBEARD_DATADIR} + --config ${SICKRAGE_CONFDIR}/config.ini \ + --datadir ${SICKRAGE_DATADIR} eend $? } @@ -74,5 +74,5 @@ stop() { local pidfile=$(get_pidfile) local rc - ebegin "Stopping Sickbeard" + ebegin "Stopping Sickrage" } diff --git a/runscripts/init.solaris11 b/runscripts/init.solaris11 index 9c512a3dc1f3926e13be24ed65911a16984bd02e..56ff9e42b96d02d743854f5ad46180fc9e34cf50 100755 --- a/runscripts/init.solaris11 +++ b/runscripts/init.solaris11 @@ -1,29 +1,29 @@ <?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <!-- - Assumes user=sickbeard group=other - Assumes /opt/sickbeard is installation directory + Assumes user=sickrage group=other + Assumes /opt/sickrage is installation directory See http://www.sun.com/bigadmin/content/selfheal/sdev_intro.jsp for more information To install (see http://docs.sun.com/app/docs/doc/819-2379/fgour?l=en&a=view for more information) - svccfg import sickbeard.smf + svccfg import sickrage.smf To enable/disable - svcadm enable sickbeard - svcadm disable sickbeard + svcadm enable sickrage + svcadm disable sickrage To check if failures svcs -xv To check logs - tail /var/svc/log/network-sickbeard\:default.log + tail /var/svc/log/network-sickrage\:default.log --> -<service_bundle type='manifest' name='sickbeard'> +<service_bundle type='manifest' name='sickrage'> <service - name='network/sickbeard' + name='network/sickrage' type='service' version='1'> @@ -60,15 +60,15 @@ <service_fmri value='svc:/system/filesystem/local:default'/> </dependency> - <!-- execute as user sickbeard --> + <!-- execute as user sickrage --> <method_context> - <method_credential user='sickbeard' group='other' /> + <method_credential user='sickrage' group='other' /> </method_context> <exec_method type='method' name='start' - exec='/opt/sickbeard/SickBeard.py --daemon' + exec='/opt/sickrage/SickBeard.py --daemon' timeout_seconds='60'> </exec_method> @@ -81,15 +81,14 @@ <template> <common_name> - <loctext xml:lang='C'>Sickbeard</loctext> + <loctext xml:lang='C'>Sickrage</loctext> </common_name> <documentation> - <doc_link name='sickbeard' - uri='http://www.sickbeard.com/' /> + <doc_link name='sickrage' + uri='https://sickrage.tv/' /> </documentation> </template> </service> </service_bundle> - diff --git a/runscripts/init.systemd b/runscripts/init.systemd index 8ce1696230cce92c7a809c53af38728b6fae95d9..44d4990eaa4aa25892bb6d92f56c83563b9852f0 100755 --- a/runscripts/init.systemd +++ b/runscripts/init.systemd @@ -1,57 +1,57 @@ -# Sickbeard systemd service unit file +# Sickrage systemd service unit file # # Configuration Notes # # - Option names (e.g. ExecStart=, Type=) are case-sensitive) # -# - Adjust User= and Group= to the user/group you want Sickbeard to run as. +# - Adjust User= and Group= to the user/group you want Sickrage to run as. # # - Optional adjust EnvironmentFile= path to configuration file # Can ONLY be used for configuring extra options used in ExecStart. # Putting a minus (-) in front of file means no error warning if the file doesn't exist # -# - Adjust ExecStart= to point to your python and SickBeard executables. +# - Adjust ExecStart= to point to your python and SickRage executables. # The FIRST token of the command line must be an ABSOLUTE FILE NAME, # then followed by arguments for the process. # If no --datadir is given, data is stored in same dir as SickBeard.py # Arguments can also be set in EnvironmentFile (except python) # -# - WantedBy= specifies which target (i.e. runlevel) to start Sickbeard for. +# - WantedBy= specifies which target (i.e. runlevel) to start Sickrage for. # multi-user.target equates to runlevel 3 (multi-user text mode) # graphical.target equates to runlevel 5 (multi-user X11 graphical mode) # -### Example Using SickBeard as daemon with pid file +### Example Using SickRage as daemon with pid file # Type=forking -# PIDFile=/var/run/sickbeard/sickbeard.pid -# ExecStart=/usr/bin/python /opt/sickbeard/SickBeard.py -q --daemon --nolaunch --pidfile=/var/run/sickbeard/sickbeard.pid --datadir=/opt/sickbeard +# PIDFile=/var/run/sickrage/sickrage.pid +# ExecStart=/usr/bin/python /opt/sickrage/SickBeard.py -q --daemon --nolaunch --pidfile=/var/run/sickrage/sickrage.pid --datadir=/opt/sickrage -## Example Using SickBeard as daemon without pid file +## Example Using SickRage as daemon without pid file # Type=forking # GuessMainPID=no -# ExecStart=/usr/bin/python /opt/sickbeard/SickBeard.py -q --daemon --nolaunch --datadir=/opt/sickbeard +# ExecStart=/usr/bin/python /opt/sickrage/SickBeard.py -q --daemon --nolaunch --datadir=/opt/sickrage ### Example Using simple # Type=simple -# ExecStart=/usr/bin/python /opt/sickbeard/SickBeard.py -q --nolaunch +# ExecStart=/usr/bin/python /opt/sickrage/SickBeard.py -q --nolaunch -### Example Using simple with EnvironmentFile where SB_DATA=/home/sickbeard/.sickbeard in /etc/sickbeard.conf +### Example Using simple with EnvironmentFile where SR_DATA=/home/sickrage/.sickrage in /etc/sickrage.conf # Type=simple -# EnvironmentFile=/etc/sickbeard.conf -# ExecStart=/usr/bin/python /opt/sickbeard/SickBeard.py -q --nolaunch --datadir=${SB_DATA} +# EnvironmentFile=/etc/sickrage.conf +# ExecStart=/usr/bin/python /opt/sickrage/SickBeard.py -q --nolaunch --datadir=${SR_DATA} ### Configuration [Unit] -Description=SickBeard Daemon +Description=SickRage Daemon [Service] -User=sickbeard -Group=sickbeard +User=sickrage +Group=sickrage Type=forking GuessMainPID=no -ExecStart=/usr/bin/python /opt/sickbeard/SickBeard.py -q --daemon --nolaunch --datadir=/opt/sickbeard +ExecStart=/usr/bin/python /opt/sickrage/SickBeard.py -q --daemon --nolaunch --datadir=/opt/sickrage [Install] WantedBy=multi-user.target diff --git a/runscripts/init.ubuntu b/runscripts/init.ubuntu index de5f2bdc39ce789ad0defee8c6523a9ed70ed359..fd50edee5e0345ca467ac91406ab46d1d1be03e7 100755 --- a/runscripts/init.ubuntu +++ b/runscripts/init.ubuntu @@ -1,7 +1,7 @@ #!/bin/sh # ### BEGIN INIT INFO -# Provides: sickbeard +# Provides: sickrage # Required-Start: $local_fs $network $remote_fs # Required-Stop: $local_fs $network $remote_fs # Should-Start: $NetworkManager @@ -12,55 +12,55 @@ # Description: starts instance of SickRage using start-stop-daemon ### END INIT INFO -# Source SickBeard configuration -if [ -f /etc/default/sickbeard ]; then - . /etc/default/sickbeard +# Source SickRage configuration +if [ -f /etc/default/sickrage ]; then + . /etc/default/sickrage else - echo "/etc/default/sickbeard not found using default settings."; + echo "/etc/default/sickrage not found using default settings."; fi # Source init functions . /lib/lsb/init-functions # Script name -NAME=sickbeard +NAME=sickrage # App name -DESC=SickBeard +DESC=SickRage ## Don't edit this file -## Edit user configuation in /etc/default/sickbeard to change +## Edit user configuation in /etc/default/sickrage to change ## -## SB_USER= #$RUN_AS, username to run sickbeard under, the default is sickbeard -## SB_HOME= #$APP_PATH, the location of SickBeard.py, the default is /opt/sickbeard -## SB_DATA= #$DATA_DIR, the location of sickbeard.db, cache, logs, the default is /opt/sickbeard -## SB_PIDFILE= #$PID_FILE, the location of sickbeard.pid, the default is /var/run/sickbeard/sickbeard.pid +## SR_USER= #$RUN_AS, username to run sickrage under, the default is sickrage +## SR_HOME= #$APP_PATH, the location of SickBeard.py, the default is /opt/sickrage +## SR_DATA= #$DATA_DIR, the location of sickbeard.db, cache, logs, the default is /opt/sickrage +## SR_PIDFILE= #$PID_FILE, the location of sickrage.pid, the default is /var/run/sickrage/sickrage.pid ## PYTHON_BIN= #$DAEMON, the location of the python binary, the default is /usr/bin/python -## SB_OPTS= #$EXTRA_DAEMON_OPTS, extra cli option for sickbeard, i.e. " --config=/home/sickbeard/config.ini" +## SR_OPTS= #$EXTRA_DAEMON_OPTS, extra cli option for sickrage, i.e. " --config=/home/sickrage/config.ini" ## SSD_OPTS= #$EXTRA_SSD_OPTS, extra start-stop-daemon option like " --group=users" ## ## EXAMPLE if want to run as different user -## add SB_USER=username to /etc/default/sickbeard -## otherwise default sickbeard is used +## add SR_USER=username to /etc/default/sickrage +## otherwise default sickrage is used ## The defaults # Run as username -RUN_AS=${SB_USER-sickbeard} +RUN_AS=${SR_USER-sickrage} -# Path to app SB_HOME=path_to_app_SickBeard.py -APP_PATH=${SB_HOME-/opt/sickbeard} +# Path to app SR_HOME=path_to_app_SickBeard.py +APP_PATH=${SR_HOME-/opt/sickrage} # Data directory where sickbeard.db, cache and logs are stored -DATA_DIR=${SB_DATA-/opt/sickbeard} +DATA_DIR=${SR_DATA-/opt/sickrage} # Path to store PID file -PID_FILE=${SB_PIDFILE-/var/run/sickbeard/sickbeard.pid} +PID_FILE=${SR_PIDFILE-/var/run/sickrage/sickrage.pid} # path to python bin DAEMON=${PYTHON_BIN-/usr/bin/python} -# Extra daemon option like: SB_OPTS=" --config=/home/sickbeard/config.ini" -EXTRA_DAEMON_OPTS=${SB_OPTS-} +# Extra daemon option like: SR_OPTS=" --config=/home/sickrage/config.ini" +EXTRA_DAEMON_OPTS=${SR_OPTS-} # Extra start-stop-daemon option like START_OPTS=" --group=users" EXTRA_SSD_OPTS=${SSD_OPTS-} @@ -75,7 +75,7 @@ test -x $DAEMON || exit 0 set -e -# Create PID directory if not exist and ensure the SickBeard user can write to it +# Create PID directory if not exist and ensure the SickRage user can write to it if [ ! -d $PID_PATH ]; then mkdir -p $PID_PATH chown $RUN_AS $PID_PATH @@ -94,28 +94,28 @@ if [ -e $PID_FILE ]; then fi fi -start_sickbeard() { +start_sickrage() { echo "Starting $DESC" start-stop-daemon -d $APP_PATH -c $RUN_AS $EXTRA_SSD_OPTS --start --pidfile $PID_FILE --exec $DAEMON -- $DAEMON_OPTS } -stop_sickbeard() { +stop_sickrage() { echo "Stopping $DESC" start-stop-daemon --stop --pidfile $PID_FILE --retry 15 } case "$1" in start) - start_sickbeard + start_sickrage ;; stop) - stop_sickbeard + stop_sickrage ;; restart|force-reload) - stop_sickbeard + stop_sickrage sleep 2 - start_sickbeard + start_sickrage ;; status) status_of_proc -p "$PID_FILE" "$DAEMON" "$DESC" diff --git a/sickbeard/image_cache.py b/sickbeard/image_cache.py index d78543742eed7b0fa735797ce7df6b5172e595cf..54494d3b2fa8afbb1195865d014ed751759193a9 100644 --- a/sickbeard/image_cache.py +++ b/sickbeard/image_cache.py @@ -70,11 +70,22 @@ class ImageCache: banner_file_name = str(indexer_id) + '.banner.jpg' return ek.ek(os.path.join, self._cache_dir(), banner_file_name) + def fanart_path(self, indexer_id): + """ + Builds up the path to a fanart cache for a given Indexer ID + + returns: a full path to the cached fanart file for the given Indexer ID + + indexer_id: ID of the show to use in the file name + """ + fanart_file_name = str(indexer_id) + '.fanart.jpg' + return ek.ek(os.path.join, self._cache_dir(), fanart_file_name) + def poster_thumb_path(self, indexer_id): """ - Builds up the path to a poster cache for a given Indexer ID + Builds up the path to a poster thumb cache for a given Indexer ID - returns: a full path to the cached poster file for the given Indexer ID + returns: a full path to the cached poster thumb file for the given Indexer ID indexer_id: ID of the show to use in the file name """ @@ -83,15 +94,15 @@ class ImageCache: def banner_thumb_path(self, indexer_id): """ - Builds up the path to a poster cache for a given Indexer ID + Builds up the path to a banner thumb cache for a given Indexer ID - returns: a full path to the cached poster file for the given Indexer ID + returns: a full path to the cached banner thumb file for the given Indexer ID indexer_id: ID of the show to use in the file name """ bannerthumb_file_name = str(indexer_id) + '.banner.jpg' - return ek.ek(os.path.join, self._thumbnails_dir(), bannerthumb_file_name) - + return ek.ek(os.path.join, self._thumbnails_dir(), bannerthumb_file_name) + def has_poster(self, indexer_id): """ Returns true if a cached poster exists for the given Indexer ID @@ -108,6 +119,14 @@ class ImageCache: logger.log(u"Checking if file " + str(banner_path) + " exists", logger.DEBUG) return ek.ek(os.path.isfile, banner_path) + def has_fanart(self, indexer_id): + """ + Returns true if a cached fanart exists for the given Indexer ID + """ + fanart_path = self.fanart_path(indexer_id) + logger.log(u"Checking if file " + str(fanart_path) + " exists", logger.DEBUG) + return ek.ek(os.path.isfile, fanart_path) + def has_poster_thumbnail(self, indexer_id): """ Returns true if a cached poster thumbnail exists for the given Indexer ID @@ -124,11 +143,11 @@ class ImageCache: logger.log(u"Checking if file " + str(banner_thumb_path) + " exists", logger.DEBUG) return ek.ek(os.path.isfile, banner_thumb_path) - BANNER = 1 POSTER = 2 BANNER_THUMB = 3 POSTER_THUMB = 4 + FANART = 5 def which_type(self, path): """ @@ -162,6 +181,10 @@ class ImageCache: # most banners are around 5.4 width/height ratio (eg. 758/140) elif 5 < img_ratio < 6: return self.BANNER + + # most fanart are around 1.77777 width/height ratio (eg. 1280/720 and 1920/1080) + elif 1.7 < img_ratio < 1.8: + return self.FANART else: logger.log(u"Image has size ratio of " + str(img_ratio) + ", unknown type", logger.WARNING) return None @@ -173,7 +196,7 @@ class ImageCache: returns: bool representing success image_path: path to the image we're caching - img_type: BANNER or POSTER + img_type: BANNER or POSTER or FANART indexer_id: id of the show this image belongs to """ @@ -182,6 +205,8 @@ class ImageCache: dest_path = self.poster_path(indexer_id) elif img_type == self.BANNER: dest_path = self.banner_path(indexer_id) + elif img_type == self.FANART: + dest_path = self.fanart_path(indexer_id) else: logger.log(u"Invalid cache image type: " + str(img_type), logger.ERROR) return False @@ -207,7 +232,7 @@ class ImageCache: returns: bool representing success show_obj: TVShow object that we want to cache an image for - img_type: BANNER or POSTER + img_type: BANNER or POSTER or FANART """ # generate the path based on the type & indexer_id @@ -223,6 +248,9 @@ class ImageCache: elif img_type == self.BANNER_THUMB: img_type_name = 'banner_thumb' dest_path = self.banner_thumb_path(show_obj.indexerid) + elif img_type == self.FANART: + img_type_name = 'fanart' + dest_path = self.fanart_path(show_obj.indexerid) else: logger.log(u"Invalid cache image type: " + str(img_type), logger.ERROR) return False @@ -249,15 +277,16 @@ class ImageCache: need_images = {self.POSTER: not self.has_poster(show_obj.indexerid), self.BANNER: not self.has_banner(show_obj.indexerid), self.POSTER_THUMB: not self.has_poster_thumbnail(show_obj.indexerid), - self.BANNER_THUMB: not self.has_banner_thumbnail(show_obj.indexerid)} + self.BANNER_THUMB: not self.has_banner_thumbnail(show_obj.indexerid), + self.FANART: not self.has_fanart(show_obj.indexerid)} if not need_images[self.POSTER] and not need_images[self.BANNER] and not need_images[self.POSTER_THUMB] and not \ - need_images[self.BANNER_THUMB]: + need_images[self.BANNER_THUMB] and not need_images[self.FANART]: logger.log(u"No new cache images needed, not retrieving new ones") return # check the show dir for poster or banner images and use them - if need_images[self.POSTER] or need_images[self.BANNER]: + if need_images[self.POSTER] or need_images[self.BANNER] or need_images[self.FANART]: try: for cur_provider in sickbeard.metadata_provider_dict.values(): logger.log(u"Checking if we can use the show image from the " + cur_provider.name + " metadata", @@ -284,7 +313,7 @@ class ImageCache: logger.log(u"Unable to search for images in show dir because it doesn't exist", logger.WARNING) # download from indexer for missing ones - for cur_image_type in [self.POSTER, self.BANNER, self.POSTER_THUMB, self.BANNER_THUMB]: + for cur_image_type in [self.POSTER, self.BANNER, self.POSTER_THUMB, self.BANNER_THUMB,self.FANART]: logger.log(u"Seeing if we still need an image of type " + str(cur_image_type) + ": " + str( need_images[cur_image_type]), logger.DEBUG) if cur_image_type in need_images and need_images[cur_image_type]: diff --git a/sickbeard/providers/eztv.py b/sickbeard/providers/eztv.py index c21512174593926fb6ac5a32c13ecbd1289ce2d8..e648b590f63df9629568d4ad4965bb1658b02ebb 100644 --- a/sickbeard/providers/eztv.py +++ b/sickbeard/providers/eztv.py @@ -109,18 +109,20 @@ class EZTVProvider(generic.TorrentProvider): for entries in resultsTable: title = entries.find('a', attrs={'class': 'epinfo'}).contents[0] - link = entries.find('a', attrs={'class': 'magnet'}) or entries.find('a', attrs={'class': 'download_1'}) - if link: - link = link.get('href') - else: - continue + for link_type in ('magnet', 'download_1', 'download_3'): + link = entries.find('a', attrs={'class': link_type}) + if link: + link = link.get('href') + else: + continue - item = { - 'title': title, - 'link': link, - } + item = { + 'title': title, + 'link': link, + } - items[mode].append(item) + items[mode].append(item) + continue except Exception, e: logger.log(u"Failed parsing " + self.name + " Traceback: " + traceback.format_exc(), diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 1e7786cc2db1cc33c6d7b7c138641737882ad91d..9d26a00268341e90702b1ff92cacda9f94e4e300 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -369,6 +369,8 @@ class WebRoot(WebHandler): # Redirect initial poster/banner thumb to default images if which[0:6] == 'poster': default_image_name = 'poster.png' + elif which[0:6] == 'fanart': + default_image_name = 'fanart.png' else: default_image_name = 'banner.png' @@ -386,7 +388,11 @@ class WebRoot(WebHandler): image_file_name = cache_obj.banner_path(show) if which == 'banner_thumb': image_file_name = cache_obj.banner_thumb_path(show) - + if which == 'fanart': + if not cache_obj.has_fanart(show): + cache_obj.fill_cache(sickbeard.helpers.findCertainShow(sickbeard.showList, int(show))) + image_file_name = cache_obj.fanart_path(show) + if ek.ek(os.path.isfile, image_file_name): static_image_path = os.path.normpath(image_file_name.replace(sickbeard.CACHE_DIR, '/cache'))