diff --git a/CHANGES.md b/CHANGES.md index 8a38a49f..8f34e835 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -47,7 +47,9 @@ * Add handler for when Trakt returns no results for Add Show/Add Trending Show page * Fix image links when anchor child images are not found at Trakt on Add Show/Add Trending Show page * Add image to be used when Trakt posters are void on Add Show/Add Trending Show page -* Fix growl registration not sending sickrage update notification registration. +* Fix growl registration not sending sickrage an update notification registration +* Add an anonymous redirect builder for external links +* Update xbmc link to Kodi at Config Notifications * Fix missing url for kickasstorrents in config_providers * Fix post processing when using tvrage indexer and mediabrowser metadata generation diff --git a/gui/slick/interfaces/default/comingEpisodes.tmpl b/gui/slick/interfaces/default/comingEpisodes.tmpl index 956066d7..c3c39466 100644 --- a/gui/slick/interfaces/default/comingEpisodes.tmpl +++ b/gui/slick/interfaces/default/comingEpisodes.tmpl @@ -2,49 +2,50 @@ #import datetime #from sickbeard.common import * #from sickbeard import sbdatetime +#from sickbeard.helpers import anon_url -#set global $title="Coming Episodes" -#set global $header="Coming Episodes" +#set global $title = 'Coming Episodes' +#set global $header = 'Coming Episodes' -#set global $sbPath=".." +#set global $sbPath = '..' -#set global $topmenu="comingEpisodes" +#set global $topmenu = 'comingEpisodes' #import os.path -#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") +#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') #set $sort = $sickbeard.COMING_EPS_SORT -#if $varExists('header') +#if $varExists('header')

$header

-#else +#else

$title

#end if
- Layout: + Layout:   - - Sort By: + + Sort By:   - - View Paused: + + View Paused: - + @@ -172,108 +175,110 @@ - - - #for $cur_result in $sql_results: - #set $cur_indexer = int($cur_result["indexer"]) - #set $runtime = $cur_result["runtime"] + - #if int($cur_result["paused"]) and not $sickbeard.COMING_EPS_DISPLAY_PAUSED: - #continue - #end if +#for $cur_result in $sql_results: + #set $cur_indexer = int($cur_result['indexer']) + #set $runtime = $cur_result['runtime'] - #set $cur_ep_airdate = $cur_result["localtime"].date() + #if int($cur_result['paused']) and not $sickbeard.COMING_EPS_DISPLAY_PAUSED: + #continue + #end if - #if $runtime: - #set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$runtime) - #if $cur_ep_enddate < $today: - #set $show_div = "listing-overdue" - #elif $cur_ep_airdate >= $next_week.date(): - #set $show_div = "listing-toofar" - #elif $cur_ep_airdate >= $today.date() and $cur_ep_airdate < $next_week.date(): - #if $cur_ep_airdate == $today.date(): - #set $show_div = "listing-current" - #else: - #set $show_div = "listing-default" - #end if + #set $cur_ep_airdate = $cur_result['localtime'].date() + + #if $runtime: + #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) + #if $cur_ep_enddate < $today: + #set $show_div = 'listing-overdue' + #elif $cur_ep_airdate >= $next_week.date(): + #set $show_div = 'listing-toofar' + #elif $cur_ep_airdate >= $today.date() and $cur_ep_airdate < $next_week.date(): + #if $cur_ep_airdate == $today.date(): + #set $show_div = 'listing-current' + #else: + #set $show_div = 'listing-default' #end if #end if + #end if - + ## forced to use a div to wrap airdate, the column sort went crazy with a span - - - + - + - + - + - + - + - - #end for - - + +#end for + + - +
Airdate ShowSearch
-
$sbdatetime.sbdatetime.sbfdatetime($cur_result["localtime"]).decode($sickbeard.SYS_ENCODING)
$time.mktime($cur_result["localtime"].timetuple()) +
$sbdatetime.sbdatetime.sbfdatetime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING)
$time.mktime($cur_result['localtime'].timetuple())
$cur_result["show_name"] - #if int($cur_result["paused"]): - [paused] - #end if + + $cur_result['show_name'] +#if int($cur_result['paused']): + [paused] +#end if - <%="S%02i" % int(cur_result["season"])+"E%02i" % int(cur_result["episode"]) %> + <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> - #if $cur_result["description"] != "" and $cur_result["description"] != None: - " /> - #else: - - #end if - $cur_result["name"] +#if $cur_result['description']: + +#else: + +#end if + $cur_result['name'] - $cur_result["network"] + $cur_result['network'] - #if int($cur_result["quality"]) in $qualityPresets: - $qualityPresetStrings[int($cur_result["quality"])] - #else: - Custom - #end if +#if int($cur_result['quality']) in $qualityPresets: + $qualityPresetStrings[int($cur_result['quality'])] +#else: + Custom +#end if - #if $cur_result["imdb_id"]: - [imdb] - #end if - $sickbeard.indexerApi($cur_indexer).name +#if $cur_result['imdb_id']: + [imdb] +#end if + $sickbeard.indexerApi($cur_indexer).name - [search] + [search]
 
+ #else if $layout in ['banner', 'poster']: + -#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_bottom.tmpl") +#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl') diff --git a/gui/slick/interfaces/default/config.tmpl b/gui/slick/interfaces/default/config.tmpl index 7d5a6544..fa26af59 100644 --- a/gui/slick/interfaces/default/config.tmpl +++ b/gui/slick/interfaces/default/config.tmpl @@ -1,6 +1,8 @@ #import sickbeard #from sickbeard import db +#from sickbeard.helpers import anon_url #import os.path + #set global $title="Configuration" #set global $header="Configuration" @@ -37,16 +39,16 @@ #end if You are using BETA software - SR Config file: $sickbeard.CONFIG_FILE - SR Database file: $db.dbFilename() - SR Cache Dir: $sickbeard.CACHE_DIR - SR Arguments: $sickbeard.MY_ARGS - SR Web Root: $sickbeard.WEB_ROOT - Python Version: $sys.version[:120] - Homepage http://www.sickrage.tv/ - Forums http://sickrage.tv/forums/ - Source https://github.com/SickragePVR/SickRage/ - Internet Relay Chat #sickrage on irc.freenode.net + SR Config file:$sickbeard.CONFIG_FILE + SR Database file:$db.dbFilename() + SR Cache Dir:$sickbeard.CACHE_DIR + SR Arguments:$sickbeard.MY_ARGS + SR Web Root:$sickbeard.WEB_ROOT + Python Version:$sys.version[:120] + Homepagehttp://www.sickrage.tv/ + Forumshttp://sickrage.tv/forums/ + Sourcehttps://github.com/SickragePVR/SickRage/ + Internet Relay Chat#sickrage on irc.freenode.net
diff --git a/gui/slick/interfaces/default/config_anime.tmpl b/gui/slick/interfaces/default/config_anime.tmpl index 28c2bde0..17f56de5 100644 --- a/gui/slick/interfaces/default/config_anime.tmpl +++ b/gui/slick/interfaces/default/config_anime.tmpl @@ -1,4 +1,6 @@ #import sickbeard +#from sickbeard.helpers import anon_url + #set global $title="Config - Anime" #set global $header="Anime" @@ -30,7 +32,7 @@
AniDB -

AniDB

+

AniDB

AniDB is non-profit database of anime information that is freely open to the public

diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index 23b23f39..7c3cd17e 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -7,6 +7,7 @@ #from sickbeard import config #from sickbeard import metadata #from sickbeard.metadata.generic import GenericMetadata +#from sickbeard.helpers import anon_url #set global $title = 'Config - General' #set global $header = 'General Configuration' @@ -509,7 +510,7 @@

in the config.ini file. - Warning: Passwords must only contain ASCII characters

+ Warning: Passwords must only contain ASCII characters

diff --git a/gui/slick/interfaces/default/config_notifications.tmpl b/gui/slick/interfaces/default/config_notifications.tmpl index ff96f708..acbf68b7 100644 --- a/gui/slick/interfaces/default/config_notifications.tmpl +++ b/gui/slick/interfaces/default/config_notifications.tmpl @@ -1,4 +1,6 @@ #import sickbeard +#from sickbeard.helpers import anon_url + #set global $title="Config - Notifications" #set global $header="Notifications" @@ -31,7 +33,7 @@
-

XBMC

+

XBMC

A free and open source cross-platform media center and home entertainment system software with a 10-foot user interface designed for the living-room TV.

@@ -156,7 +158,7 @@
-

Plex Media Server

+

Plex Media Server

Experience your media on a visually stunning, easy to use interface on your Mac connected to your TV. Your media library has never looked this good!

For sending notifications to Plex Home Theater (PHT) clients, use the XBMC notifier with port 3005.

@@ -264,7 +266,7 @@
-

NMJ

+

NMJ

The Networked Media Jukebox, or NMJ, is the official media jukebox interface made available for the Popcorn Hour 200-series.

@@ -330,7 +332,7 @@
-

NMJv2

+

NMJv2

The Networked Media Jukebox, or NMJv2, is the official media jukebox interface made available for the Popcorn Hour 300 & 400-series.

@@ -418,7 +420,7 @@
-

Synology

+

Synology

The Synology DiskStation NAS.

Synology Indexer is the daemon running on the Synology NAS to build its media database.

@@ -449,7 +451,7 @@
-

Synology Notifier

+

Synology Notifier

Synology Notifier is the notification system of Synology DSM

@@ -504,7 +506,7 @@
-

pyTivo

+

pyTivo

pyTivo is both an HMO and GoBack server. This notifier will load the completed downloads to your Tivo.

@@ -566,7 +568,7 @@
-

Growl

+

Growl

A cross-platform unobtrusive global notification system.

@@ -644,7 +646,7 @@
Prowl -

Prowl

+

Prowl

A Growl client for iOS.

@@ -693,7 +695,7 @@
@@ -724,7 +726,7 @@
-

Libnotify

+

Libnotify

The standard desktop notification API for Linux/*nix systems. This notifier will only function if the pynotify module is installed (Ubuntu/Debian package python-notify).

@@ -778,7 +780,7 @@
-

Pushover

+

Pushover

Pushover makes it easy to send real-time notifications to your Android and iOS devices.

@@ -837,7 +839,7 @@
Click below to test.
@@ -851,7 +853,7 @@
-

Boxcar

+

Boxcar

Universal push notification for iOS. Read your messages where and when you want them! A subscription will be sent if needed.

@@ -914,7 +916,7 @@
-

Boxcar2

+

Boxcar2

Read your messages where and when you want them!

@@ -977,7 +979,7 @@
-

Notify My Android

+

Notify My Android

Notify My Android is a Prowl-like Android App and API that offers an easy way to send notifications from your application directly to your Android device.

@@ -1056,7 +1058,7 @@
-

Pushalot

+

Pushalot

Pushalot is a platform for receiving custom push notifications to connected devices running Windows Phone or Windows 8.

@@ -1119,7 +1121,7 @@
-

Pushbullet

+

Pushbullet

Pushbullet is a platform for receiving custom push notifications to connected devices running Android and desktop Chrome browsers.

@@ -1197,7 +1199,7 @@
-

Twitter

+

Twitter

A social networking and microblogging service, enabling its users to send and read other users' messages called tweets.

@@ -1281,7 +1283,7 @@
-

Trakt

+

Trakt

trakt helps keep a record of what TV shows and movies you are watching. Based on your favorites, trakt recommends additional shows and movies you'll enjoy!

@@ -1323,7 +1325,7 @@
@@ -1409,7 +1411,7 @@
-

Email

+

Email

Allows configuration of email notifications on a per show basis.

diff --git a/gui/slick/interfaces/default/config_providers.tmpl b/gui/slick/interfaces/default/config_providers.tmpl index 1dd95505..bf1074c1 100644 --- a/gui/slick/interfaces/default/config_providers.tmpl +++ b/gui/slick/interfaces/default/config_providers.tmpl @@ -1,6 +1,8 @@ #import sickbeard #from sickbeard.providers.generic import GenericProvider #from sickbeard.providers import thepiratebay +#from sickbeard.helpers import anon_url + #set global $title="Config - Providers" #set global $header="Search Providers" @@ -90,7 +92,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; #set $curName = $curProvider.getID()
  • - $curProvider.name + $curProvider.name $curProvider.name #if not $curProvider.supportsBacklog then "*" else ""# #if $curProvider.name == "EZRSS" then "**" else ""# diff --git a/gui/slick/interfaces/default/config_subtitles.tmpl b/gui/slick/interfaces/default/config_subtitles.tmpl index 45c6a0b1..420d3e54 100644 --- a/gui/slick/interfaces/default/config_subtitles.tmpl +++ b/gui/slick/interfaces/default/config_subtitles.tmpl @@ -1,5 +1,6 @@ #from sickbeard import subtitles #import sickbeard +#from sickbeard.helpers import anon_url #set global $title="Config - Subtitles" #set global $header="Subtitles" @@ -125,7 +126,8 @@ #set $curName = $curService.id
  • - + #set $provider_url = $curService.url + $curService.name $curService.name.capitalize() diff --git a/gui/slick/interfaces/default/displayShow.tmpl b/gui/slick/interfaces/default/displayShow.tmpl index c15cac49..88ab150f 100644 --- a/gui/slick/interfaces/default/displayShow.tmpl +++ b/gui/slick/interfaces/default/displayShow.tmpl @@ -2,9 +2,11 @@ #from sickbeard import subtitles, sbdatetime, network_timezones #import sickbeard.helpers #from sickbeard.common import * +#from sickbeard.helpers import anon_url #from lib import subliminal #import os.path, os #import datetime + #set global $title=$show.name ##set global $header = '' % #set global $topmenu="manageShows"# @@ -152,28 +154,29 @@
    - #if 'rating' in $show.imdb_info: - #set $rating_tip = str($show.imdb_info['rating']) + " / 10" + " Stars" + "
    " + str($show.imdb_info['votes']) + " Votes" - $show.imdb_info['rating'] - #end if +#if 'rating' in $show.imdb_info: + #set $rating_tip = str($show.imdb_info['rating']) + " / 10" + " Stars" + "
    " + str($show.imdb_info['votes']) + " Votes" + $show.imdb_info['rating'] +#end if - #if not $show.imdbid - ($show.startyear) - $show.runtime minutes - - #else - #if 'country_codes' in $show.imdb_info: - #for $country in $show.imdb_info['country_codes'].split('|') - - #end for - #end if - #if 'year' in $show.imdb_info: - ($show.imdb_info['year']) - $show.imdb_info['runtimes'] minutes - - #end if - [imdb] - #end if - $sickbeard.indexerApi($show.indexer).name - #if $xem_numbering or $xem_absolute_numbering: - [xem] - #end if +#set $_show = $show +#if not $show.imdbid + ($show.startyear) - $show.runtime minutes - +#else + #if 'country_codes' in $show.imdb_info: + #for $country in $show.imdb_info['country_codes'].split('|') + + #end for + #end if + #if 'year' in $show.imdb_info: + ($show.imdb_info['year']) - $show.imdb_info['runtimes'] minutes - + #end if + [imdb] +#end if + $sickbeard.indexerApi($show.indexer).name +#if $xem_numbering or $xem_absolute_numbering: + [xem] +#end if
    @@ -181,13 +184,13 @@ #if not $show.imdbid #if $show.genre: #for $genre in $show.genre[1:-1].split('|') -
  • $genre
  • +
  • $genre
  • #end for #end if #end if #if 'year' in $show.imdb_info: #for $imdbgenre in $show.imdb_info['genres'].replace('Sci-Fi','Science-Fiction').split('|') -
  • $imdbgenre
  • +
  • $imdbgenre
  • #end for #end if diff --git a/gui/slick/interfaces/default/home_massAddTable.tmpl b/gui/slick/interfaces/default/home_massAddTable.tmpl index b906dbfc..920e5695 100644 --- a/gui/slick/interfaces/default/home_massAddTable.tmpl +++ b/gui/slick/interfaces/default/home_massAddTable.tmpl @@ -1,4 +1,5 @@ #import sickbeard +#from sickbeard.helpers import anon_url @@ -30,7 +31,7 @@ #if $curDir['existing_info'][1] and $indexer > 0: - + #else: #end if diff --git a/gui/slick/interfaces/default/home_newShow.tmpl b/gui/slick/interfaces/default/home_newShow.tmpl index 6759140a..3dea99e0 100644 --- a/gui/slick/interfaces/default/home_newShow.tmpl +++ b/gui/slick/interfaces/default/home_newShow.tmpl @@ -1,5 +1,7 @@ #import os.path #import sickbeard +#from sickbeard.helpers import anon_url + #set global $header="New Show" #set global $title="New Show" @@ -36,7 +38,7 @@ #if $use_provided_info: - Show retrieved from existing metadata: $provided_indexer_name + Show retrieved from existing metadata: $provided_indexer_name diff --git a/gui/slick/interfaces/default/home_trendingShows.tmpl b/gui/slick/interfaces/default/home_trendingShows.tmpl index 13f37bee..011f170f 100644 --- a/gui/slick/interfaces/default/home_trendingShows.tmpl +++ b/gui/slick/interfaces/default/home_trendingShows.tmpl @@ -3,6 +3,7 @@ #import re #from sickbeard.common import * #from sickbeard import sbdatetime +#from sickbeard.helpers import anon_url #set global $title='Trending Shows' #set global $header='Trending Shows' @@ -117,7 +118,7 @@
    - +
    diff --git a/gui/slick/interfaces/default/inc_top.tmpl b/gui/slick/interfaces/default/inc_top.tmpl index ec1c7a8f..1e30f446 100644 --- a/gui/slick/interfaces/default/inc_top.tmpl +++ b/gui/slick/interfaces/default/inc_top.tmpl @@ -78,10 +78,11 @@ #end if diff --git a/gui/slick/js/configProviders.js b/gui/slick/js/configProviders.js index b7eb56af..279ab952 100644 --- a/gui/slick/js/configProviders.js +++ b/gui/slick/js/configProviders.js @@ -65,7 +65,8 @@ $(document).ready(function(){ } if ($('#provider_order_list > #'+id).length == 0 && showProvider != false) { - var toAdd = '
  • '+name+' '+name+'
  • ' + var toAdd = '
  • ' + name + ' ' + name + '
  • ' $('#provider_order_list').append(toAdd); $('#provider_order_list').sortable("refresh"); @@ -84,7 +85,8 @@ $(document).ready(function(){ $(this).populateTorrentRssSection(); if ($('#provider_order_list > #'+id).length == 0) { - var toAdd = '
  • '+name+' '+name+'
  • ' + var toAdd = '
  • ' + name + ' ' + name + '
  • ' $('#provider_order_list').append(toAdd); $('#provider_order_list').sortable("refresh"); diff --git a/gui/slick/js/configSubtitles.js b/gui/slick/js/configSubtitles.js index 57100e34..034f204a 100644 --- a/gui/slick/js/configSubtitles.js +++ b/gui/slick/js/configSubtitles.js @@ -21,7 +21,7 @@ $(document).ready(function(){ var newData = [isDefault, [name, url, key]]; if ($('#service_order_list > #'+id).length == 0 && showService != false) { - var toAdd = '
  • '+name+' '+name+'
  • ' + var toAdd = '
  • ' + name + ' ' + name + '
  • ' $('#service_order_list').append(toAdd); $('#service_order_list').sortable("refresh"); diff --git a/gui/slick/js/newShow.js b/gui/slick/js/newShow.js index 4e0df7af..6018f360 100644 --- a/gui/slick/js/newShow.js +++ b/gui/slick/js/newShow.js @@ -70,9 +70,9 @@ $(document).ready(function () { resultStr += ' '; if (data.langid && data.langid != "") { - resultStr += '' + obj[4] + ''; + resultStr += '' + obj[4] + ''; } else { - resultStr += '' + obj[4] + ''; + resultStr += '' + obj[4] + ''; } if (obj[5] !== null) { diff --git a/gui/slick/js/recommendedShows.js b/gui/slick/js/recommendedShows.js index d97fa773..f2b9bd1f 100644 --- a/gui/slick/js/recommendedShows.js +++ b/gui/slick/js/recommendedShows.js @@ -19,7 +19,7 @@ $(document).ready(function () { var whichSeries = obj.join('|'); resultStr += ' '; - resultStr += '' + obj[2] + ''; + resultStr += '' + obj[2] + ''; if (obj[4] !== null) { var startDate = new Date(obj[4]); diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index 21dd0c4a..bc3cb997 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -954,6 +954,13 @@ def check_url(url): return None +def anon_url(*url): + """ + Return a URL string consisting of the Anonymous redirect URL and an arbitrary number of values appended. + """ + return '' if None in url else '%s%s' % (sickbeard.ANON_REDIRECT, ''.join(str(s) for s in url)) + + """ Encryption ==========
    DirectoryShow Name (tvshow.nfo)Indexer
    $curDir['existing_info'][1]$curDir['existing_info'][1]?