From c1fe671a82ac17f9baf6f162f7643478faf7a132 Mon Sep 17 00:00:00 2001 From: Supremicus Date: Mon, 23 Mar 2015 11:05:13 +1000 Subject: [PATCH 1/2] Overhaul displayShow for new features * Change overhaul displayShow to ready for new features * Add section for show plot to displayShow * Add option to view show background on displayShow (transparent and opaque) for when background downloading is added (disabled) * Add option to collapse seasons and leave current season open on displayShow (disabled) * Add filesize to episode location qtip on displayShow * Change selected options from editShow will only show when enabled now on displayShow --- CHANGES.md | 6 + gui/slick/css/dark.css | 55 +-- gui/slick/css/light.css | 56 ++- gui/slick/css/style.css | 312 +++++++------ .../interfaces/default/config_general.tmpl | 38 +- gui/slick/interfaces/default/displayShow.tmpl | 424 +++++++++++------- gui/slick/js/lib/jquery.collapser.min.js | 11 + sickbeard/__init__.py | 11 +- sickbeard/webserve.py | 6 +- 9 files changed, 551 insertions(+), 368 deletions(-) create mode 100644 gui/slick/js/lib/jquery.collapser.min.js diff --git a/CHANGES.md b/CHANGES.md index cb01c587..59d46ad1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -68,6 +68,12 @@ * Fix release group not recognised from manually downloaded filename * Change to gracefully handle some "key not found" failures when TVDB or TVRage return "Not Found" during show updates * Change no longer stamp files where airdates are never +* Change overhaul displayShow to ready for new features +* Add section for show plot to displayShow +* Add option to view show background on displayShow (transparent and opaque) for when background downloading is added (disabled) +* Add option to collapse seasons and leave current season open on displayShow (disabled) +* Add filesize to episode location qtip on displayShow +* Change selected options from editShow will only show when enabled now on displayShow [develop changelog] * Fix traceback error when using the menu item Manage/Update Kodi diff --git a/gui/slick/css/dark.css b/gui/slick/css/dark.css index 71caaf03..0c26d7c4 100644 --- a/gui/slick/css/dark.css +++ b/gui/slick/css/dark.css @@ -195,10 +195,6 @@ inc_top.tmpl inc_bottom.tmpl ========================================================================== */ -.footer{ - color:#fff -} - .footerhighlight{ color:#09A2FF } @@ -358,43 +354,16 @@ displayShow.tmpl filter:none } -h1.title{ - border-bottom:1px solid #555 -} - -ul.tags li{ - background:url(../images/tag.png) no-repeat scroll 5px 4px #15528F; - border:1px solid #111; - color:#FFF; - text-shadow:0 1px rgba(0, 0, 0, 0.8) -} - -ul.tags li a{ - color:#FFF -} - .tvshowImg{ border:1px solid #111 } -#summary{ - background-color:#3d3d3d; - border:1px solid #111 -} - .sickbeardTable tr.header td, .sickbeardTable th{ color:#fff; background-color:#15528F } -.sickbeardTable tr.header td, -.sickbeardTable th, -.sickbeardTable td{ - border-top:1px solid #222; - border-left:1px solid #222 -} - th.row-seasonheader{ border:none; background-color:transparent; @@ -406,6 +375,30 @@ tr.seasonheader{ border:none } +.display-details{ + background-color:#3d3d3d; + border:1px solid #111 +} + +.display-details-transparent{ + background:rgba(0,0,0,0.5); + border:1px solid rgba(0,0,0,0.5) +} + +.info-tag-bg, +.genre-tag-bg{ + background-color:#15528F +} + +.info-tag-nobg, +.genre-tag-nobg{ + background-color:#15528F +} + +.paused-highlight{ + color:#09A2FF +} + /* ======================================================================= episodeView.tmpl ========================================================================== */ diff --git a/gui/slick/css/light.css b/gui/slick/css/light.css index 4ae7cefd..4d027e82 100644 --- a/gui/slick/css/light.css +++ b/gui/slick/css/light.css @@ -183,12 +183,8 @@ inc_top.tmpl inc_bottom.tmpl ========================================================================== */ -.footer{ - color:#4e4e4e -} - .footerhighlight{ - color:#111 + color:#428BCA } /* ======================================================================= @@ -348,41 +344,15 @@ displayShow.tmpl filter:url("data:image/svg+xml;utf8,#greyscale") } -h1.title{ - border-bottom:1px solid #888 -} - -ul.tags li{ - background:url(../images/tag.png) no-repeat scroll 5px 4px #555; - border:1px solid #111; - color:#FFF; - text-shadow:0 1px rgba(0, 0, 0, 0.8) -} - -ul.tags li a{ - color:#FFF -} - .tvshowImg{ border:1px solid #ccc } -#summary{ - background-color:#efefef; - border:1px solid #dfdede -} - .sickbeardTable th{ color:#fff; background-color:#333 } -.sickbeardTable th, -.sickbeardTable td{ - border-top:1px solid #fff; - border-left:1px solid #fff -} - th.row-seasonheader{ border:none; background-color:transparent; @@ -394,6 +364,30 @@ tr.seasonheader{ color:#000 } +.display-details{ + background-color:#efefef; + border:1px solid #dfdede +} + +.display-details-transparent{ + background:rgba(0,0,0,0.5); + border:1px solid rgba(0,0,0,0.5) +} + +.info-tag-bg, +.genre-tag-bg{ + background-color:#215f2f +} + +.info-tag-nobg, +.genre-tag-nobg{ + background-color:#555 +} + +.paused-highlight{ + color:#C7DB40 +} + /* ======================================================================= episodeView.tmpl ========================================================================== */ diff --git a/gui/slick/css/style.css b/gui/slick/css/style.css index 49dad9e1..47eeaa85 100644 --- a/gui/slick/css/style.css +++ b/gui/slick/css/style.css @@ -5,7 +5,6 @@ fonts /* Regular */ @font-face{ font-family:'Open Sans'; - src:url('fonts/OpenSans-Regular-webfont.eot'); src:url('fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/OpenSans-Regular-webfont.woff') format('woff'), @@ -498,13 +497,11 @@ inc_bottom.tmpl .footer{ width:100%; padding:20px 0; - color:#4e4e4e; text-align:center; font-size:12px } .footerhighlight{ - color:#111; display:inline } @@ -1073,9 +1070,38 @@ home_postprocess.tmpl displayShow.tmpl ========================================================================== */ +.background-container{ + position:fixed; + top:0; + right:0; + bottom:0; + left:0; + z-index:-1 +} + +.background{ + position:absolute; + top:0; + right:0; + bottom:0; + left:0; + background-position:center center; + background-size:cover +} + +.background-transparent:after{ + position:absolute; + content:""; + top:0; + left:0; + width:100%; + height:100%; + background:rgba(0,0,0,.5) +} + #posterCol{ float:left; - margin:3px 10px 20px 0 + margin:0 10px 20px 0 } #showCol{ @@ -1083,6 +1109,144 @@ displayShow.tmpl margin-bottom:20px } +.display-show-container{ + margin-top:10px +} + +.display-show{ + margin:30px 0 +} + +.display-season{ + background:rgba(0,0,0,0.5); + border-radius:3px; + padding:10px +} + +.display-details, +.display-details-transparent{ + border-radius:3px; + padding:8px 10px; + margin-bottom:20px +} + +#details-wrapper{ + float:left; + width:100%; + position:relative; + cursor:default +} + +#details-top{ + height:70px +} + +#details-bottom{ + display:inline-block; + width:100% +} + +#details-bottom .label{ + line-height:24px; + cursor:default +} + +#details-right{ + width:250px; + float:right; + margin-left:15px +} + +#details-right .flag{ + margin-right:4px; + vertical-align:baseline +} + +.details-plot{ + min-height:217px; + overflow:hidden +} + +.show-class{ + padding-bottom:5px +} + +.title{ + margin:0; + text-align:left; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + height:42px +} + +.genre-tag-bg, +.genre-tag-nobg{ + padding:3px 4px 3px 22px; + background:url(../images/tag.png) no-repeat scroll 4px 3px; + cursor:default +} + +.genre-tag-bg a, +.genre-tag-bg a:hover, +.genre-tag-nobg a, +.genre-tag-nobg a:hover{ + color:#fff; + text-decoration:none +} + +span.imdbstars{ + display:inline-block; + margin:0 3px 0 0; + vertical-align:baseline; + cursor:help +} + +span.imdbstars > *{ + background-position:0 0 !important; + max-width:120px +} + +span.imdbstars, span.imdbstars > *{ + height:12px; + width:120px; + display:inline-block; + font-size:10px; + background:url(../images/rating.png) 0 -12px repeat-x +} + +.moreless{ + margin-top:-3px +} + +.no-plot{ + font-style: italic +} + +.paused{ + font-size:200px; + text-align:center; + position:absolute; + margin:0 auto; + left:0; + right:0; + padding-top:25px; + opacity:.3 +} + +.paused-outline{ + text-shadow:5px 5px 10px #000 +} + +.qtip-maxwidth { + max-width:1000px +} + +.season-status { + font-size:12px; + vertical-align:middle +} + .navShow{ display:inline; cursor:pointer @@ -1097,114 +1261,19 @@ displayShow.tmpl filter:url("data:image/svg+xml;utf8,#greyscale") } -h1.title{ - padding-bottom:12px; - margin-bottom:15px; - line-height:30px; - text-align:left; - text-rendering:optimizelegibility; - border-bottom:1px solid #888 -} - -.displayspecials{ - position:relative; - top:-24px -} - -#showinfo{ - cursor:default -} - -#showinfo{ - display:inline-block; - position:relative; - top:-3px -} - -span.imdbstars{ - display:inline-block; - margin:0 3px 0 0; - vertical-align:baseline; - cursor:help -} -span.imdbstars > *{ - background-position:0 0 !important; - max-width:120px -} -span.imdbstars, span.imdbstars > *{ - height:12px; - width:120px; - display:inline-block; - font-size:10px; - background:url(../images/rating.png) 0 -12px repeat-x; - margin-bottom:-1px -} - -#showinfo .flag{ - margin:0 3px 1px 0; - vertical-align:middle -} - -#showinfo .imdb-info{ - margin:0 3px 0 0 -} - -#showinfo a.service{ - margin:0 3px 0 0; - font-size:16px -} - -#showinfo a.service img{ - margin-bottom:1px -} - -ul.tags{ - list-style-type:none; - position:relative; - top:-5px; - margin-left:-40px -} - -ul.tags li{ - margin-right:4px; - margin-bottom:5px; - padding:3px 7px 3px 23px; - background:url(../images/tag.png) no-repeat scroll 5px 4px #555; - border-radius:3px; - border:1px solid #111; - color:#FFF; - font:14px/18px "Open Sans", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; - text-shadow:0 1px rgba(0, 0, 0, 0.8); - float:left -} - -ul.tags li a{ - color:#FFF +a.service img{ + margin-bottom:-2px; + vertical-align:baseline } .tvshowImg{ border:1px solid #ccc; - border-radius:5px; - height:311px; + border-radius:3px; + height:329px; width:auto; float:left } -#summary{ - padding:10px; - background-color:#efefef; - border:1px solid #dfdede; - width:100%; - height:250px; - overflow:auto; - cursor:default -} - -.summaryTable{ - max-width:70%; - overflow:hidden -} - #checkboxControls{ padding-top:5px } @@ -1312,8 +1381,8 @@ span.snatched b{ .sickbeardTable{ table-layout:auto; width:100%; - border-collapse:collapse; - border-spacing:0; + border-collapse:separate !important; + border-spacing:1px; text-align:center; border:none; empty-cells:show; @@ -1335,8 +1404,6 @@ span.snatched b{ .sickbeardTable tr.header td, .sickbeardTable th, .sickbeardTable td{ - border-top:1px solid #fff; - border-left:1px solid #fff; padding:4px } @@ -1346,12 +1413,14 @@ span.snatched b{ th.row-seasonheader{ border:none; - background-color:#fff; - color:#000; - padding-top:15px; + background-color:transparent !important; text-align:left } +th.row-seasonheader h3{ + margin:0 +} + tr.seasonheader{ padding-bottom:5px; padding-top:10px; @@ -1420,25 +1489,6 @@ td.col-search{ width:46px } -.showLegend{ - padding-right:6px; - padding-bottom:1px; - width:150px; - vertical-align:top -} - -.options-on-right{ - width:180px; - float:right; - vertical-align:middle; - height:100% -} - -.options-on-right .showLegendRight{ - padding-right:6px; - padding-bottom:1px -} - .input-scene{ height:20px; line-height:1.5; @@ -1446,8 +1496,6 @@ td.col-search{ } #editShow{ - /*width:700px; - padding-top:10px;*/ margin-right:auto; margin-left:auto; padding:15px 0 0 diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index 070c940b..e438dc70 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -247,7 +247,41 @@ +

-
All non-absolute folder locations are relative to $sickbeard.DATA_DIR
+
All non-absolute folder locations are relative to $sickbeard.DATA_DIR
diff --git a/gui/slick/interfaces/default/displayShow.tmpl b/gui/slick/interfaces/default/displayShow.tmpl index b255b54c..46f0f823 100644 --- a/gui/slick/interfaces/default/displayShow.tmpl +++ b/gui/slick/interfaces/default/displayShow.tmpl @@ -24,6 +24,7 @@ #end if + +#if $sickbeard.DISPLAY_BACKGROUND: + + + +
+
+
+#end if +
Change Show: @@ -80,12 +98,34 @@
-
+
-
-

$show.name

+#if $show_message: +
+ $show_message
+#end if + +#if $sickbeard.DISPLAY_BACKGROUND: + #set $infotag = 'info-tag-bg' + #set $genretag = 'genre-tag-bg' +#else + #set $infotag = 'info-tag-nobg' + #set $genretag = 'genre-tag-nobg' +#end if +
+ +
+#if int($show.paused) == 1: +
+ +
+#end if +
+
#if $seasonResults: ##There is a special/season_0?## #set $season_special = (0, 1)[0 == int($seasonResults[-1]['season'])] @@ -93,191 +133,196 @@ #if not $sickbeard.DISPLAY_SHOW_SPECIALS and $season_special: $seasonResults.pop(-1) #end if - - +
#if $season_special: - Display Specials: + Display Specials: #if sickbeard.DISPLAY_SHOW_SPECIALS: - Hide + Hide #else: - Show + Show #end if #end if - - -
- - #if (len($seasonResults) > 14): - + #for $seasonNum in $seasonResults: - + #end for - + #else: - Season: #for $seasonNum in $seasonResults: #if 0 == int($seasonNum['season']): - Specials + Specials #else: - ${str($seasonNum['season'])} - #end if - #if $seasonNum != $seasonResults[-1]: - | + ${str($seasonNum['season'])} #end if #end for #end if - - +
+#end if +
+ +
+
+

$show.name

+#if not $show.imdbid + #if $show.genre: + #for $genre in $show.genre[1:-1].replace('Science-Fiction','Sci-Fi').split('|') + $genre + #end for + #end if #end if -
- -
- -#if $show_message: -
- $show_message -
+#if $sickbeard.USE_IMDB_INFO and 'genres' in $show.imdb_info and '' != $show.imdb_info['genres']: + #for $imdbgenre in $show.imdb_info['genres'].split('|') + $imdbgenre + #end for #end if +
+
+
-
-
- - -
- -
- -
-#if $sickbeard.USE_IMDB_INFO and 'rating' in $show.imdb_info - #if '' != $show.imdb_info['votes'] - #set $rating_tip = '%s of 10 stars
%s votes' % (str($show.imdb_info['rating']), str($show.imdb_info['votes'])) - $show.imdb_info['rating'] - #else - [ No votes available ] +
+
+
    +#if not $show.imdbid + #set $runtime = $show.runtime + #set $startyear = $show.startyear +#else + #if $sickbeard.USE_IMDB_INFO and 'countries' in $show.imdb_info: + #set $country = $show.imdb_info['countries'] + #end if + #if $sickbeard.USE_IMDB_INFO and 'year' in $show.imdb_info: + #set $runtime = $show.imdb_info['runtimes'] + #set $startyear = $show.imdb_info['year'] #end if #end if #set $_show = $show -#if not $sickbeard.USE_IMDB_INFO or not $show.imdbid - #echo ('(%s) - ' % $show.startyear, '')['' == $show.startyear]##echo ('%s minutes - ' % $show.runtime, '')['' == $show.runtime]# -#else - #if 'country_codes' in $show.imdb_info and '' != $show.imdb_info['country_codes']: - #for $country in $show.imdb_info['country_codes'].split('|') - - #end for - #end if - #if 'year' in $show.imdb_info: - #echo ('(%s) - ' % $show.imdb_info['year'], '')['' == $show.imdb_info['year']]##echo ('%s minutes' % $show.imdb_info['runtimes'], '')['' == $show.imdb_info['runtimes']]# - #end if - [imdb] +
  • Indexers: +#if $sickbeard.USE_IMDB_INFO and $show.imdbid + [imdb] #end if - $sickbeard.indexerApi($show.indexer).name + $sickbeard.indexerApi($show.indexer).name #if $xem_numbering or $xem_absolute_numbering: - [xem] + [xem] #end if -
-#if not $sickbeard.USE_IMDB_INFO or not $show.imdbid -## Disabling these trackt tags as they 404 on trakt2.0, remove False to re-enable - #if False and $show.genre: -
-
    - #for $genre in $show.genre[1:-1].split('|') -
  • $genre
  • - #end for -
-
- #end if -#end if -#if $sickbeard.USE_IMDB_INFO and 'genres' in $show.imdb_info and '' != $show.imdb_info['genres']: -
-
    - #for $imdbgenre in $show.imdb_info['genres'].split('|') -
  • $imdbgenre.replace('Sci-Fi', 'Science-Fiction')
  • + +
  • Premiered: $startyear +#if $sickbeard.USE_IMDB_INFO and 'country_codes' in $show.imdb_info and '' != $show.imdb_info['country_codes']: + #for $country in $show.imdb_info['country_codes'].split('|') + #end for -
-
#end if - -
- + #if $show.network and $show.airs: - +
  • Airs: $show.airs.replace('y','y,') #if not $network_timezones.test_timeformat($show.airs) then " (invalid Timeformat) " else ""#
  • +
  • Network: $show.network
  • #else if $show.network: - +
  • Network: $show.network
  • #else if $show.airs: - +
  • Airs: $show.airs.replace('y','y,') #if not $network_timezones.test_timeformat($show.airs) then " (invalid Timeformat) " else ""#
  • #end if +
  • Runtime: $runtime minutes
  • #if '' != $show.status: - +
  • Status: $show.status
  • #end if -#if $showLoc[1]: - -#else: - +#if $sickbeard.USE_IMDB_INFO and 'rating' in $show.imdb_info + #if '' != $show.imdb_info['votes'] + #set $rating_tip = '%s of 10 stars
    %s votes' % (str($show.imdb_info['rating']), str($show.imdb_info['votes'])) +
  • IMDB Rating: $show.imdb_info['rating']
  • + #else +
  • IMDB Rating: No votes available
  • + #end if #end if #set $anyQualities, $bestQualities = $Quality.splitQuality(int($show.quality)) - - - -#if $show.rls_ignore_words: - #end if #if $show.rls_require_words: - + Required Words +#end if +#if $show.rls_ignore_words: + Ignored Words #end if - #if $bwl and $bwl.whitelist: - - - + Wanted Group#if len($bwl.whitelist)>1 then "s" else ""# #end if #if $bwl and $bwl.blacklist: - - - + Unwanted Group#if len($bwl.blacklist)>1 then "s" else ""# #end if - - -
    Originally airs$show.airs #if not $network_timezones.test_timeformat($show.airs) then ' (invalid Timeformat) ' else ''# on $show.network
    Originally airs$show.network
    Originally airs$show.airs #if not $network_timezones.test_timeformat($show.airs) then ' (invalid Timeformat) ' else ''#
    Status$show.status
    Location$showLoc[0]
    Location$showLoc[0] (dir is missing)
    Quality #if $show.quality in $qualityPresets: - $qualityPresetStrings[$show.quality] +
  • Quality: $qualityPresetStrings[$show.quality]
  • #else: - #if $anyQualities: - Initial ... <%= ', '.join([Quality.qualityStrings[x] for x in sorted(anyQualities)])%> #if $bestQualities then '
    ' else ''# - #end if - #if $bestQualities: - Replace with ... <%= ', '.join([Quality.qualityStrings[x] for x in sorted(bestQualities)])%> + #if $anyQualities: +
  • Initial: <%=", ".join([Quality.qualityStrings[x] for x in sorted(anyQualities)])%>
  • + #end if + #if $bestQualities: +
  • Replace with: <%=", ".join([Quality.qualityStrings[x] for x in sorted(bestQualities)])%>
  • + #end if +#end if + + + +
    +
    +#if $show.overview != '': + $show.overview +#else + No plot overview available. +#end if +
    + +
    + $show.lang +#if $showLoc[1]: + $showLoc[0] +#else: + $showLoc[0] +#end if + $sickbeard.helpers.human(sickbeard.helpers.get_size($showLoc[0])) +#set $filecount = $epCounts[$Overview.QUAL] + $epCounts[$Overview.GOOD] + $filecount Files +#if $show.exceptions: + Scene Names +#end if +#if $sickbeard.USE_SUBTITLES + #if int($show.subtitles) == 1: + Subtitles + #end if +#end if +#if $show.flatten_folders == 1 or $sickbeard.NAMING_FORCE_FOLDERS: + Flat Folders +#end if +#if int($show.air_by_date) == 1: + Air-by-Date +#end if +#if int($show.is_sports) == 1: + Sports +#end if +#if int($show.is_anime) == 1: + Anime +#end if +#if int($show.dvdorder) == 1: + DVD Order +#end if +#if int($show.scene) == 1: + Scene Numbering +#end if +#if $anyQualities + $bestQualities + #if int($show.archive_firstmatch) == 1 + Archive First Match #end if -#end if
    Scene name#if $show.exceptions then $exceptions_string else $show.name#
    Ignore with any of#echo $show.rls_ignore_words#
    Require one of#echo $show.rls_require_words#
    Whitelist group#if len($bwl.whitelist)>1 then 's' else ''##echo ', '.join($bwl.whitelist)#
    Blacklist group#if len($bwl.blacklist)>1 then 's' else ''##echo ', '.join($bwl.blacklist)#
    Size$sickbeard.helpers.human(sickbeard.helpers.get_size($showLoc[0]))
    - - -#set $no = 'no16.png" title="No" alt="No' -#set $yes = 'yes16.png" title="Yes" alt="Yes' - -#if $anyQualities + $bestQualities - -#end if - - - - -#if $sickbeard.USE_SUBTITLES - -#end if - - - -
    Paused
    Archive on first match
    Flat folder structure
    Air by date naming
    Use DVD order
    Scene numbering
    Subtitles
    Show is sports
    Show is anime
    Info language$show.lang
    +
    +
    -
    - Change selected episodes to +
    +

    Change selected episodes to

    NFO @@ -389,33 +458,33 @@ #set $epLoc = $epResult['location'] #set never_aired = 0 < $curSeason and 1 == int($epResult['airdate']) - + - - + + #if $UNAIRED != int($epResult['status']) and not $never_aired - + #end if - + - Y' else 'nfo-no.gif - - Y' else 'tbn-no.gif - + Y' else 'nfo-no.gif + + Y' else 'tbn-no.gif + #if $epLoc and $show._location and $epLoc.lower().startswith($show._location.lower()): #set $epLoc = $epLoc[len($show._location)+1:] #elif $epLoc and (not $epLoc.lower().startswith($show._location.lower()) or not $show._location): #set $epLoc = $epLoc #end if - + #if '' != $epLoc and None != $epLoc: - $epResult["episode"] + $epResult["episode"] #else $epResult['episode'] #end if - + #if $show.is_anime: $epResult['absolute_number'] #end if @@ -432,10 +501,10 @@ value="<%=str(scSeas) + 'x' + str(scEpis)%>" #end if style="padding: 0; text-align: center; max-width: 60px;" /> - + #elif $scene_anime: - - + #if 1 == int($epResult['airdate']) then 'never' else $sbdatetime.sbdatetime.sbfdate($sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($epResult['airdate'], $show.airs, $show.network)))# - + #if $sickbeard.USE_SUBTITLES and $show.subtitles: - #if $epResult['subtitles']: - #for $sub_lang in subliminal.language.language_list($epResult['subtitles'].split(',')): + #if $epResult['subtitles']: + #for $sub_lang in subliminal.language.language_list($epResult['subtitles'].split(',')): #if '' != sub_lang.alpha2 ${sub_lang} - #end if - #end for - #end if + #end if + #end for + #end if #end if - + #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($epResult['status'])) #if Quality.NONE != $curQuality: $statusStrings[$curStatus] $Quality.qualityStrings[$curQuality] - #else: + #else: $statusStrings[$curStatus] #end if @@ -488,13 +557,28 @@ search #end if #end if - + #if $sickbeard.USE_SUBTITLES and $show.subtitles and len(set(str($epResult['subtitles']).split(',')).intersection(set($subtitles.wantedLanguages()))) < len($subtitles.wantedLanguages()) and $epResult['location'] search subtitles #end if #end for +#if $sickbeard.DISPLAY_ALL_SEASONS == False and $seasonCount > 1: + +#end if + + #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl') diff --git a/gui/slick/js/lib/jquery.collapser.min.js b/gui/slick/js/lib/jquery.collapser.min.js new file mode 100644 index 00000000..ce066313 --- /dev/null +++ b/gui/slick/js/lib/jquery.collapser.min.js @@ -0,0 +1,11 @@ +/* jQuery - Collapser - Plugin v2.0 www.aakashweb.com (c) 2014 Aakash Chakravarthy MIT License. */ +(function(e,m,p,q){function l(b,f){this.o=e.extend({},n,f);this.e=e(b);this.init()}var n={target:"next",mode:"words",speed:"slow",truncate:10,ellipsis:"...",effect:"fade",controlBtn:"",showText:"Show more",hideText:"Hide text",showClass:"show-class",hideClass:"hide-class",atStart:"hide",lockHide:!1,dynamic:!1,changeText:!1,beforeShow:null,afterShow:null,beforeHide:null,afterHide:null};l.prototype={init:function(){var b=this;b.mode=b.o.mode;b.remaining={};b.ctrlHtml=' ';e(b.e).each(function(){e(this).data("oCnt",b.e.html());var a=e.isFunction(b.o.atStart)?b.o.atStart.call(b.e):b.o.atStart,a="undefined"!==typeof b.e.attr("data-start")?b.e.attr("data-start"):a;"hide"==a?b.hide(b.e,0):b.show(b.e,0)});var f;e(m).on("resize",function(){b.o.dynamic&&"lines"==b.mode&&(clearTimeout(f),f=setTimeout(function(){b.reInit(b.e)},100))})},show:function(b,f){var a=this,c=e(b);"undefined"===typeof f&&(f=a.o.speed);var g=function(){e.isFunction(a.o.afterShow)&& +a.o.afterShow.call(a.e,a)};e.isFunction(a.o.beforeShow)&&a.o.beforeShow.call(a.e,a);switch(a.mode){case "chars":case "words":var d=c.height();c.html(c.data("tHTML"));var h=c.height();c.height(d);c.animate({height:h},f,function(){c.height("auto");g()}).removeClass(a.o.hideClass).addClass(a.o.showClass);c.data("tHTML",c.html());break;case "lines":0==c.children("div").length&&c.wrapInner("
    ");var k=c.children("div"),d=k.height(),h=k.html(c.data("oCnt")).css("height","").height();k.css("height",d); +k.animate({height:h},f,function(){k.height("auto");g()});c.removeClass(a.o.hideClass).addClass(a.o.showClass);break;case "block":a.blockMode(c,"show",f,g)}a.status=1;if(!0==a.o.lockHide)return c.find("[data-ctrl]").remove(),"";if("block"==a.mode)c.off("click.coll").on("click.coll",function(b){b.preventDefault();a.hide(c)});else 0!=c.find("[data-ctrl]").length||e.isFunction(a.o.controlBtn)||c.append(a.ctrlHtml),a.ctrlBtn=e.isFunction(a.o.controlBtn)?a.o.controlBtn.call(a.e):e(c.find("[data-ctrl]")), +a.ctrlBtn.off("click.coll").on("click.coll",function(b){b.preventDefault();a.hide(c)}).html(a.o.hideText)},hide:function(b,f){var a=this,c=e(b);"undefined"===typeof f&&(f=a.o.speed);var g=function(){e.isFunction(a.o.afterHide)&&a.o.afterHide.call(a.e,a)};e.isFunction(a.o.beforeHide)&&a.o.beforeHide.call(a.e,a);c.find("[data-ctrl]").remove();switch(a.mode){case "chars":var d=e.trim(c.text());a.remaining.chars=d.length-a.o.truncate;d.length>a.o.truncate&&(c.data("tHTML",c.html()),d=a.pad(d.slice(0, +a.o.truncate),d.slice(a.o.truncate,d.length)),c.html(d).removeClass(a.o.showClass).addClass(a.o.hideClass),g());break;case "words":d=e.trim(c.text());d=d.split(" ");a.remaining.words=d.length-a.o.truncate;d.length>a.o.truncate&&(c.data("tHTML",c.html()),d=a.pad(d.slice(0,a.o.truncate).join(" "),d.slice(a.o.truncate,d.length).join(" ")),c.html(d).removeClass(a.o.showClass).addClass(a.o.hideClass),g());break;case "lines":0==c.children("div").length&&c.wrapInner("
    ");d=c.children("div").css("height", +"");d.html(d.text());var h=d.height();"undefined"===typeof c.data("lHeight")?(temp=d.clone(),lHeight=temp.text("a").insertAfter(d).height(),c.data("lHeight",lHeight),d.next().remove()):lHeight=c.data("lHeight");lines=h/lHeight;a.remaining.lines=lines-a.o.truncate;0'+this.o.ellipsis+""+(e.isFunction(this.o.ctrlBtn)?"":this.ctrlHtml)+'"},blockMode:function(b,f,a,c){var g=["fadeOut","slideUp","fadeIn","slideDown"],d="fade"==this.o.effect?0:1,g="hide"==f?g[d]:g[d+2];if(e.isFunction(this.o.target))this.o.target.call(this.e)[g](a,c);else if(e.fn[this.o.target])e(b)[this.o.target]()[g](a, +c);"show"==f?(b.removeClass(this.o.showClass).addClass(this.o.hideClass),this.o.changeText&&b.text(this.o.hideText)):(b.removeClass(this.o.hideClass).addClass(this.o.showClass),this.o.changeText&&b.text(this.o.showText))},reInit:function(b){b.find("[data-ctrl]").remove();b.html(this.e.data("oCnt"));0==this.status?this.hide(b,0):this.show(b,0)}};e.fn.collapser=function(b){return this.each(function(){e.data(this,"collapser")||e.data(this,"collapser",new l(this,b))})}})(jQuery,window,document); \ No newline at end of file diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index 79af0236..352e89a6 100755 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -153,6 +153,9 @@ TRASH_ROTATE_LOGS = False HOME_SEARCH_FOCUS = True SORT_ARTICLE = False DEBUG = False +DISPLAY_BACKGROUND = False +DISPLAY_BACKGROUND_TRANSPARENT = None +DISPLAY_ALL_SEASONS = True USE_LISTVIEW = False METADATA_XBMC = None @@ -524,7 +527,7 @@ def initialize(consoleLogging=True): AUTOPOSTPROCESSER_FREQUENCY, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \ ANIME_DEFAULT, NAMING_ANIME, USE_ANIDB, ANIDB_USERNAME, ANIDB_PASSWORD, ANIDB_USE_MYLIST, \ ANIME_SPLIT_HOME, SCENE_DEFAULT, BACKLOG_DAYS, ANIME_TREAT_AS_HDTV, \ - COOKIE_SECRET, USE_IMDB_INFO + COOKIE_SECRET, USE_IMDB_INFO, DISPLAY_BACKGROUND, DISPLAY_BACKGROUND_TRANSPARENT, DISPLAY_ALL_SEASONS if __INITIALIZED__: return False @@ -595,6 +598,9 @@ def initialize(consoleLogging=True): TIME_PRESET_W_SECONDS = check_setting_str(CFG, 'GUI', 'time_preset', '%I:%M:%S %p') TIME_PRESET = TIME_PRESET_W_SECONDS.replace(u":%S", u"") TIMEZONE_DISPLAY = check_setting_str(CFG, 'GUI', 'timezone_display', 'network') + DISPLAY_BACKGROUND = bool(check_setting_int(CFG, 'General', 'display_background', 0)) + DISPLAY_BACKGROUND_TRANSPARENT = check_setting_str(CFG, 'General', 'display_background_transparent', 'transparent') + DISPLAY_ALL_SEASONS = bool(check_setting_int(CFG, 'General', 'display_all_seasons', 1)) ACTUAL_LOG_DIR = check_setting_str(CFG, 'General', 'log_dir', 'Logs') # put the log dir inside the data dir, unless an absolute path @@ -1472,6 +1478,9 @@ def save_config(): new_config['General']['sort_article'] = int(SORT_ARTICLE) new_config['General']['proxy_setting'] = PROXY_SETTING new_config['General']['proxy_indexers'] = int(PROXY_INDEXERS) + new_config['General']['display_background'] = int(DISPLAY_BACKGROUND) + new_config['General']['display_background_transparent'] = DISPLAY_BACKGROUND_TRANSPARENT + new_config['General']['display_all_seasons'] = int(DISPLAY_ALL_SEASONS) new_config['General']['use_listview'] = int(USE_LISTVIEW) new_config['General']['metadata_xbmc'] = METADATA_XBMC diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 76842872..79186380 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -3365,7 +3365,8 @@ class ConfigGeneral(Config): handle_reverse_proxy=None, home_search_focus=None, sort_article=None, auto_update=None, notify_on_update=None, proxy_setting=None, proxy_indexers=None, anon_redirect=None, git_path=None, git_remote=None, calendar_unprotected=None, fuzzy_dating=None, trim_zero=None, date_preset=None, date_preset_na=None, time_preset=None, - indexer_timeout=None, rootDir=None, theme_name=None, default_home=None, use_imdb_info=None): + indexer_timeout=None, rootDir=None, theme_name=None, default_home=None, use_imdb_info=None, + display_background=None, display_background_transparent=None, display_all_seasons=None): results = [] @@ -3384,6 +3385,9 @@ class ConfigGeneral(Config): sickbeard.LAUNCH_BROWSER = config.checkbox_to_value(launch_browser) sickbeard.HOME_SEARCH_FOCUS = config.checkbox_to_value(home_search_focus) sickbeard.USE_IMDB_INFO = config.checkbox_to_value(use_imdb_info) + sickbeard.DISPLAY_BACKGROUND = config.checkbox_to_value(display_background) + sickbeard.DISPLAY_BACKGROUND_TRANSPARENT = display_background_transparent + sickbeard.DISPLAY_ALL_SEASONS = config.checkbox_to_value(display_all_seasons) sickbeard.SORT_ARTICLE = config.checkbox_to_value(sort_article) sickbeard.CPU_PRESET = cpu_preset sickbeard.ANON_REDIRECT = anon_redirect From 94d0ce3e44a37f5efed268d4221bfb4c49a238e5 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 22 Mar 2015 19:52:56 +0800 Subject: [PATCH 2/2] Add show overview from indexers to the database --- CHANGES.md | 1 + sickbeard/databases/mainDB.py | 12 +++++++++++- sickbeard/db.py | 2 +- sickbeard/tv.py | 9 ++++++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 59d46ad1..dac2809b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -74,6 +74,7 @@ * Add option to collapse seasons and leave current season open on displayShow (disabled) * Add filesize to episode location qtip on displayShow * Change selected options from editShow will only show when enabled now on displayShow +* Add show overview from indexers to the database [develop changelog] * Fix traceback error when using the menu item Manage/Update Kodi diff --git a/sickbeard/databases/mainDB.py b/sickbeard/databases/mainDB.py index 59616b50..fe4ea879 100644 --- a/sickbeard/databases/mainDB.py +++ b/sickbeard/databases/mainDB.py @@ -27,7 +27,7 @@ from sickbeard import encodingKludge as ek from sickbeard.name_parser.parser import NameParser, InvalidNameException, InvalidShowException MIN_DB_VERSION = 9 # oldest db version we support migrating from -MAX_DB_VERSION = 20001 +MAX_DB_VERSION = 20002 class MainSanityCheck(db.DBSanityCheck): @@ -960,6 +960,16 @@ class DBIncreaseTo20001(db.SchemaUpgrade): return self.checkDBVersion() +class AddTvShowOverview(db.SchemaUpgrade): + def execute(self): + backup_database(self.checkDBVersion()) + + logger.log(u'Adding column overview to tv_shows') + self.addColumn('tv_shows', 'overview', 'TEXT', '') + + self.setDBVersion(20002) + return self.checkDBVersion() + # 10001 -> 10000 class RemoveDefaultEpStatusFromTvShows(db.SchemaUpgrade): def execute(self): diff --git a/sickbeard/db.py b/sickbeard/db.py index 0818f5c1..0ef25659 100644 --- a/sickbeard/db.py +++ b/sickbeard/db.py @@ -412,7 +412,7 @@ def MigrationCode(myDB): 10001: sickbeard.mainDB.RemoveDefaultEpStatusFromTvShows, 20000: sickbeard.mainDB.DBIncreaseTo20001, - # 20001: sickbeard.mainDB.AddCoolSickGearFeature2, + 20001: sickbeard.mainDB.AddTvShowOverview, # 20002: sickbeard.mainDB.AddCoolSickGearFeature3, } diff --git a/sickbeard/tv.py b/sickbeard/tv.py index 28d8e8b4..362eac75 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -98,6 +98,7 @@ class TVShow(object): self._scene = 0 self._rls_ignore_words = "" self._rls_require_words = "" + self._overview = '' self.dirty = True @@ -141,6 +142,7 @@ class TVShow(object): scene = property(lambda self: self._scene, dirty_setter("_scene")) rls_ignore_words = property(lambda self: self._rls_ignore_words, dirty_setter("_rls_ignore_words")) rls_require_words = property(lambda self: self._rls_require_words, dirty_setter("_rls_require_words")) + overview = property(lambda self: self._overview, dirty_setter('_overview')) @property def is_anime(self): @@ -832,6 +834,9 @@ class TVShow(object): if self.is_anime: self.release_groups = BlackAndWhiteList(self.indexerid) + if not self.overview: + self.overview = sqlResults[0]['overview'] + logger.log(str(self.indexerid) + u': Show info [%s] loaded from database' % self.name) # Get IMDb_info from database @@ -895,6 +900,7 @@ class TVShow(object): self.startyear = int(str(myEp["firstaired"]).split('-')[0]) self.status = getattr(myEp, 'status', '') + self.overview = getattr(myEp, 'overview', '') def load_imdb_info(self): @@ -1184,7 +1190,8 @@ class TVShow(object): "imdb_id": self.imdbid, "last_update_indexer": self.last_update_indexer, "rls_ignore_words": self.rls_ignore_words, - "rls_require_words": self.rls_require_words + 'rls_require_words': self.rls_require_words, + 'overview': self.overview } myDB = db.DBConnection()