From e98503d01c8edcf8e2853562f21c6c6649dcf679 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sun, 18 Oct 2020 21:03:50 +0100 Subject: [PATCH] Change season specific alt names now available not just for anime. Add config/General/Updates/Alias Process button, minimum interval for a fetch of custom names/numbering is 30 mins. Add Export alternatives button to edit show. Change improve tooltip over show title in display show for multiple alternatives. Add display season alternatives on hover over season titles in display show. Change single digit season display to zero-padded double digits in edit show. Change add note on edit show for season specific search rule. Add mark next to season titles that have exceptions. Add support for centralised sg alternative names and numbers. Change sg alts can overwrite scene number field only if field value is blank. Change add note on edit show for season specific search rule. Change add has_season_exceptions to control newznab id search. Change add season exceptions to torrent providers. Add env var NO_ALT_GET (1 = only use cache json). Change give remove_file functions time to process. Change selection of allPossibleShowNames to be all seasons not season 1. Change add allPossibleShowNames unit test. Change improve order of exceptions on ui. --- CHANGES.md | 14 ++ gui/slick/css/style.css | 10 ++ gui/slick/interfaces/default/config_general.tmpl | 21 ++- gui/slick/interfaces/default/displayShow.tmpl | 7 +- gui/slick/interfaces/default/editShow.tmpl | 21 +-- gui/slick/js/config.js | 28 ++++ gui/slick/js/editShow.js | 31 +++- gui/slick/js/sceneExceptionsTooltip.js | 10 +- lib/_23.py | 8 +- lib/sg_helpers.py | 68 +++++---- sickbeard/providers/generic.py | 16 +- sickbeard/providers/newznab.py | 23 +-- sickbeard/scene_exceptions.py | 185 ++++++++++++++++++++--- sickbeard/scene_numbering.py | 6 +- sickbeard/show_name_helpers.py | 2 +- sickbeard/webserve.py | 94 +++++++++++- tests/scene_helpers_tests.py | 14 +- 17 files changed, 457 insertions(+), 101 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 93df9e7..cb22e1c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,19 @@ ### 0.23.0 (2019-xx-xx xx:xx:xx UTC) +* Add config/General/Updates/Alias Process button, minimum interval for a fetch of custom names/numbering is 30 mins +* Add Export alternatives button to edit show +* Change season specific alt names now available not just for anime +* Change improve tooltip over show title in display show for multiple alternatives +* Add display season alternatives on hover over season titles in display show +* Change single digit season display to zero-padded double digits in edit show +* Change add note on edit show for season specific search rule +* Add mark next to season titles that have exceptions +* Add support for centralised sg alternative names and numbers +* Change sg alts can overwrite scene number field only if field value is blank +* Change add note on edit show for season specific search rule +* Change add has_season_exceptions to control newznab id search +* Change add season exceptions to torrent providers +* Change give remove_file functions time to process * Add ignore folders that contain ".sickgearignore" flag file * Change add 3 days cache for tmdb base info only * Change `Discordapp` to `Discord` in line with company change diff --git a/gui/slick/css/style.css b/gui/slick/css/style.css index e90e977..f867e55 100644 --- a/gui/slick/css/style.css +++ b/gui/slick/css/style.css @@ -1029,6 +1029,16 @@ home.tmpl background-image:linear-gradient(to left, rgba(223, 218, 207, 1), rgba(223, 218, 207, 0)) } +.exception-divider{ + margin:3px 0 +} + +.season-mark-exception{ + font-size:12px; + vertical-align:super; + margin-right:-6px +} + .show-toggle-hide{ position:absolute; top:272px; diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index 196936f..87f2ebf 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -212,12 +212,27 @@ +#else +
+ Built-in updates disabled +

using #echo $sg_var('EXT_UPDATES') or 'other'# update method instead

+
+
+#end if +
+ Alias show names/numbers + + +

updates for alternative show names and numbers

+ +
+
+ +#if not $sg_var('EXT_UPDATES') - -#else -

Repo updates disabled. Using $sg_var('EXT_UPDATES') update method

#end if + diff --git a/gui/slick/interfaces/default/displayShow.tmpl b/gui/slick/interfaces/default/displayShow.tmpl index 7de97b4..acc7a30 100644 --- a/gui/slick/interfaces/default/displayShow.tmpl +++ b/gui/slick/interfaces/default/displayShow.tmpl @@ -449,7 +449,7 @@ #set $scene_anime = True #end if - #for $season, $episodes in $seasons + #for $season, $episodes, $has_season_exceptions in $seasons #for $ep in $episodes #if None is not $ep #set $ep_str = '%sx%s' % ($season, $ep['episode']) @@ -466,6 +466,9 @@ #set $working_season = $season #set $human_season = ('Season %s' % $season, 'Specials')[0 == $season] + #if $has_season_exceptions + #set $human_season += '*' + #end if ## one off variable migration, on next version apply... (s/$getVar('display_seasons', [])/[]/), @@ -484,7 +487,7 @@ #set $qual = $season_stats.get($Overview.QUAL, None) #set $good = $season_stats.get($Overview.GOOD, '0') #set $archived = False if $season not in $ep_counts['archived'] else $ep_counts['archived'][$season] -

$human_season +

$human_season #if None is not $has_art  D: $good #if snatched# S: $snatched #end if##if $wanted# W: $wanted #end if##if $qual# LQ: $qual #end if# of $ep_counts['totals'][$season]#if 0 < $archived# with $archived archived#end if##if int($videos)# #echo ('with', 'and')[0 < $archived]# $videos file$maybe_plural($videos)#end if# #end if diff --git a/gui/slick/interfaces/default/editShow.tmpl b/gui/slick/interfaces/default/editShow.tmpl index 290d0e0..4c004ee 100644 --- a/gui/slick/interfaces/default/editShow.tmpl +++ b/gui/slick/interfaces/default/editShow.tmpl @@ -98,32 +98,33 @@ Alternative release name(s) - -#if $show_obj.anime: - #for $season in $seasonResults: +#for $season in $seasonResults: - #end for -#end if +#end for

Enter one.. e.g. Show, Show (2016), or The Show (US)

searching and post-processing require the alternatives if "Show not found" errors are in the logs