Browse Source

Add search show Name to Show List Layout: Poster.

Change indicate when not sorting with article by dimming ("The", "A", "An") on Show List, Episode, History, Mass Update, Add with Browse and from Existing views.
pull/651/head
JackDandy 9 years ago
parent
commit
58ea9588a7
  1. 3
      CHANGES.md
  2. 42
      gui/slick/css/dark.css
  3. 34
      gui/slick/css/light.css
  4. 129
      gui/slick/css/style.css
  5. 8
      gui/slick/interfaces/default/episodeView.tmpl
  6. 22
      gui/slick/interfaces/default/history.tmpl
  7. 150
      gui/slick/interfaces/default/home.tmpl
  8. 8
      gui/slick/interfaces/default/home_addExistingShow.tmpl
  9. 41
      gui/slick/interfaces/default/home_addShows.tmpl
  10. 16
      gui/slick/interfaces/default/home_browseShows.tmpl
  11. 4
      gui/slick/interfaces/default/home_massAddTable.tmpl
  12. 23
      gui/slick/interfaces/default/manage.tmpl
  13. 12
      gui/slick/js/addExistingShow.js
  14. 58
      gui/slick/js/home.js
  15. 38
      sickbeard/webserve.py

3
CHANGES.md

@ -32,6 +32,9 @@
* Add CPU throttling preset "Disabled" to config/General/Advanced Settings * Add CPU throttling preset "Disabled" to config/General/Advanced Settings
* Change overhaul Kodi notifier and tidy up config/notification/KodiNotifier ui * Change overhaul Kodi notifier and tidy up config/notification/KodiNotifier ui
* Add passthru of param "post_json" to Requests() "json" in helpers.getURL * Add passthru of param "post_json" to Requests() "json" in helpers.getURL
* Add search show Name to Show List Layout: Poster
* Change indicate when not sorting with article by dimming ("The", "A", "An") on Show List, Episode, History,
Mass Update, Add with Browse and from Existing views
### 0.11.6 (2016-02-18 23:10:00 UTC) ### 0.11.6 (2016-02-18 23:10:00 UTC)

42
gui/slick/css/dark.css

@ -218,12 +218,12 @@ home.tmpl
color:#fff color:#fff
} }
.show{ #show-list .show-card{
background-color:#333; background-color:#333;
border:1px solid #111 border:1px solid #111
} }
.show .ui-widget-content{ #show-list .show-card .ui-widget-content{
border-top:1px solid #111; border-top:1px solid #111;
border-bottom:1px solid #111; border-bottom:1px solid #111;
border-left:0; border-left:0;
@ -265,6 +265,7 @@ td.tvShow a{
text-decoration:none text-decoration:none
} }
td.tvShow a:hover span,
td.tvShow a:hover{ td.tvShow a:hover{
cursor:pointer; cursor:pointer;
color:#09A2FF color:#09A2FF
@ -274,21 +275,10 @@ td.tvShow a:hover{
home_addShows.tmpl home_addShows.tmpl
========================================================================== */ ========================================================================== */
.icon-addnewshow{ .icon-addnewshow{background-image:url("../images/addshows/add-new32-white.png")}
background-image:url("../images/addshows/add-new32-white.png") .icon-addexistingshow{background-image:url("../images/addshows/add-existing32-white.png")}
} .icon-addrecommendedshow{background-image:url("../images/addshows/add-trakt32-white.png")}
.icon-addtrendingshow{background-image:url("../images/addshows/add-trending32-white.png")}
.icon-addtrendingshow{
background-image:url("../images/addshows/add-trending32-white.png")
}
.icon-addrecommendedshow{
background-image:url("../images/addshows/add-trakt32-white.png")
}
.icon-addexistingshow{
background-image:url("../images/addshows/add-existing32-white.png")
}
/* ======================================================================= /* =======================================================================
home_newShow.tmpl home_newShow.tmpl
@ -303,6 +293,10 @@ home_newShow.tmpl
background-color:rgb(40, 40, 40) background-color:rgb(40, 40, 40)
} }
.article{
color:#707070
}
#addRootDirTable td label .filepath, #addRootDirTable td label .filepath,
.grey-text{ .grey-text{
color:#999 color:#999
@ -331,7 +325,7 @@ ul#rootDirStaticList li{
home_browseShows.tmpl home_browseShows.tmpl
========================================================================== */ ========================================================================== */
.browse-container{ #browse-list .show-card{
background-color:#333; background-color:#333;
border:1px solid #111 border:1px solid #111
} }
@ -684,10 +678,14 @@ bootstrap Overrides
========================================================================== */ ========================================================================== */
body{ body{
color:#fff;
background-color:#222 background-color:#222
} }
body,
.show-date{
color:#fff
}
input, textarea, select, .uneditable-input{ input, textarea, select, .uneditable-input{
width:auto; width:auto;
color:#000 color:#000
@ -1177,7 +1175,7 @@ pre{
/* ======================================================================= /* =======================================================================
input sizing (for config pages) input sizing (for config pages)
========================================================================== */ ========================================================================== */
.showlist-select optgroup, .showlist-select optgroup,
#pickShow optgroup, #pickShow optgroup,
#showfilter optgroup, #showfilter optgroup,
@ -1185,8 +1183,8 @@ input sizing (for config pages)
color:#eee; color:#eee;
background-color:rgb(51, 51, 51) background-color:rgb(51, 51, 51)
} }
.showlist-select optgroup option, .showlist-select optgroup option,
#pickShow optgroup option, #pickShow optgroup option,
#showfilter optgroup option, #showfilter optgroup option,
#editAProvider optgroup option{ #editAProvider optgroup option{

34
gui/slick/css/light.css

@ -217,12 +217,13 @@ home.tmpl
color:#000 color:#000
} }
.show{ #show-list .show-card{
background-color:#DFDACF; background-color:#DFDACF;
color:#666;
border:1px solid #111 border:1px solid #111
} }
.show .ui-widget-content{ #show-list .show-card .ui-widget-content{
border-top:1px solid #111; border-top:1px solid #111;
border-bottom:1px solid #111; border-bottom:1px solid #111;
border-left:0; border-left:0;
@ -264,6 +265,7 @@ td.tvShow a{
text-decoration:none text-decoration:none
} }
td.tvShow a:hover span,
td.tvShow a:hover{ td.tvShow a:hover{
cursor:pointer; cursor:pointer;
color:#428BCA color:#428BCA
@ -273,21 +275,10 @@ td.tvShow a:hover{
home_addShows.tmpl home_addShows.tmpl
========================================================================== */ ========================================================================== */
.icon-addnewshow{ .icon-addnewshow{background-image:url("../images/addshows/add-new32-black.png")}
background-image:url("../images/addshows/add-new32-black.png") .icon-addexistingshow{background-image:url("../images/addshows/add-existing32-black.png")}
} .icon-addrecommendedshow{background-image:url("../images/addshows/add-trakt32-black.png")}
.icon-addtrendingshow{background-image:url("../images/addshows/add-trending32-black.png")}
.icon-addtrendingshow{
background-image:url("../images/addshows/add-trending32-black.png")
}
.icon-addrecommendedshow{
background-image:url("../images/addshows/add-trakt32-black.png")
}
.icon-addexistingshow{
background-image:url("../images/addshows/add-existing32-black.png")
}
/* ======================================================================= /* =======================================================================
home_newShow.tmpl home_newShow.tmpl
@ -302,6 +293,10 @@ home_newShow.tmpl
background-color:rgb(245, 245, 245) background-color:rgb(245, 245, 245)
} }
.article{
color:#909090
}
#addRootDirTable td label .filepath, #addRootDirTable td label .filepath,
.grey-text{ .grey-text{
color:#666 color:#666
@ -330,7 +325,7 @@ ul#rootDirStaticList li{
home_browseShows.tmpl home_browseShows.tmpl
========================================================================== */ ========================================================================== */
.browse-container{ #browse-list .show-card{
background-color:#DFDACF; background-color:#DFDACF;
border:1px solid #111 border:1px solid #111
} }
@ -656,7 +651,8 @@ span.path{
bootstrap Overrides bootstrap Overrides
========================================================================== */ ========================================================================== */
body{ body,
.show-date{
color:#000 color:#000
} }

129
gui/slick/css/style.css

@ -563,12 +563,11 @@ home.tmpl
font-size:100% font-size:100%
} }
#HomeLayout{margin-top:-35px} #HomeLayout{
#HomeLayout.not-poster{height:75px} margin-top:-35px;
#HomeLayout div.not-poster{position:relative;top:38px} height:75px;
#HomeLayout span.not-poster{margin-top:-30px} margin-bottom:10px
#HomeLayout.poster{margin-top:-35px} }
#HomeLayout span.poster{margin-bottom:10px}
#search_show_name{margin-top:0} #search_show_name{margin-top:0}
.ui-progressbar{ .ui-progressbar{
@ -644,18 +643,24 @@ home.tmpl
.yes{background-image:url("../images/yes16.png")} .yes{background-image:url("../images/yes16.png")}
.no{background-image:url("../images/no16.png")} .no{background-image:url("../images/no16.png")}
.container,
#container{ #container{
margin:0 auto margin:12px auto 12px
} }
.show{ #show-list .show-card{
margin:12px; margin:0 2px 12px;
width:188px; width:188px;
height:352px; height:352px;
float:left;
background-color:#DFDACF; background-color:#DFDACF;
color:#a6a6a6;
border:1px solid #111; border:1px solid #111;
border-radius:6px border-radius:6px
} }
#show-list .show-card-top{
height:344px
}
.show-image{ .show-image{
overflow:hidden; overflow:hidden;
@ -665,28 +670,33 @@ home.tmpl
border-top-right-radius:5px border-top-right-radius:5px
} }
.show .ui-progressbar{ .show-image a{
height:7px !important; display:block;
top:-2px height:100%;
width:100%
}
#show-list .show-card .ui-progressbar{
height:8px !important;
} }
.show .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br{ #show-list .show-card .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br{
border-bottom-right-radius:0 border-bottom-right-radius:5px
} }
.show .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl{ #show-list .show-card .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl{
border-bottom-left-radius:0 border-bottom-left-radius:5px
} }
.show .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr{ #show-list .show-card .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr{
border-top-right-radius:0 border-top-right-radius:0
} }
.show .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl{ #show-list .show-card .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl{
border-top-left-radius:0 border-top-left-radius:0
} }
.show .ui-widget-content{ #show-list .show-card .ui-widget-content{
border-top:1px solid #111; border-top:1px solid #111;
border-bottom:1px solid #111; border-bottom:1px solid #111;
border-left:0; border-left:0;
@ -701,26 +711,17 @@ home.tmpl
border:none border:none
} }
.show .progress-20, #show-list .show-card .progress-20,
.show .progress-40, #show-list .show-card .progress-40,
.show .progress-60, #show-list .show-card .progress-60,
.show .progress-80{ #show-list .show-card .progress-80{
height:7px height:8px
}
.show .progress-80{
border-radius:0
}
.show .progress-60{
border-radius:0
}
.show .progress-40{
border-radius:0
} }
.show .progress-20{ #show-list .show-card .progress-20,
#show-list .show-card .progress-40,
#show-list .show-card .progress-60,
#show-list .show-card .progress-80{
border-radius:0 border-radius:0
} }
@ -788,6 +789,10 @@ home.tmpl
display:block display:block
} }
.show-network{
font-size:11px;
}
.show-network-image{ .show-network-image{
width:50px; width:50px;
height:auto height:auto
@ -860,7 +865,7 @@ home_addShows.tmpl
margin-left:auto margin-left:auto
} }
#addShowPortal a{ #addShowPortal a.btn{
padding:0 20px; padding:0 20px;
width:360px; width:360px;
float:left; float:left;
@ -889,26 +894,14 @@ div.buttontext p{
font-size:13px font-size:13px
} }
.icon-addnewshow{ .icon-addnewshow{background-image:url("../images/addshows/add-new32-black.png")}
background-image:url("../images/addshows/add-new32-black.png"); .icon-addexistingshow{background-image:url("../images/addshows/add-existing32-black.png")}
width:32px; .icon-addrecommendedshow{background-image:url("../images/addshows/add-trakt32-black.png")}
height:32px .icon-addtrendingshow{background-image:url("../images/addshows/add-trending32-black.png")}
} .img-anime{background-image: url("../images/addshows/add-anime.gif")}
.img-imdb{background-image: url("../images/addshows/add-imdb.gif")}
.icon-addtrendingshow{
background-image:url("../images/addshows/add-trending32-black.png");
width:32px;
height:32px
}
.icon-addrecommendedshow{ .square-32{
background-image:url("../images/addshows/add-trakt32-black.png");
width:32px;
height:32px
}
.icon-addexistingshow{
background-image:url("../images/addshows/add-existing32-black.png");
width:32px; width:32px;
height:32px height:32px
} }
@ -1063,16 +1056,16 @@ home_browseShows.tmpl
padding-bottom:4px padding-bottom:4px
} }
.browse-container p{ .show-card-inner p{
padding-top:2px padding-top:2px
} }
.browse-container p img{ .show-card-inner p img{
position:relative; position:relative;
top:-2px top:-2px
} }
.browse-container p, .browse-container i{ .show-card-inner p, .show-card-inner i{
white-space:nowrap; white-space:nowrap;
font-size:12px; font-size:12px;
overflow:hidden; overflow:hidden;
@ -1080,9 +1073,11 @@ home_browseShows.tmpl
margin:0 margin:0
} }
.browse-container{ #browse-list .show-card{
margin:12px 12px 12px 0; margin:0 2px 12px;
width:188px; width:188px;
height:341px;
float:left;
background-color:#DFDACF; background-color:#DFDACF;
border:1px solid #111; border:1px solid #111;
border-radius:6px border-radius:6px
@ -2070,6 +2065,10 @@ history.tmpl
vertical-align:middle vertical-align:middle
} }
#historyTable td span.article{
vertical-align:initial
}
#historyTable td img.help, #historyTable td img.help,
#historyTable td span.help{ #historyTable td span.help{
cursor:help cursor:help
@ -2853,6 +2852,12 @@ div.blackwhitelist.manual{
max-width:300px max-width:300px
} }
img[src=''],img:not([src]){
width:102%;
height:102%;
margin:-1%;
}
/* ======================================================================= /* =======================================================================
bootstrap Overrides bootstrap Overrides
========================================================================== */ ========================================================================== */

8
gui/slick/interfaces/default/episodeView.tmpl

@ -304,6 +304,7 @@
#for $cur_result in $sql_results: #for $cur_result in $sql_results:
#set $cur_indexer = int($cur_result['indexer']) #set $cur_indexer = int($cur_result['indexer'])
#set $runtime = $cur_result['runtime'] #set $runtime = $cur_result['runtime']
#set $display_name = (re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', $cur_result['show_name']), $cur_result['show_name'])[$sickbeard.SORT_ARTICLE]
#if int($cur_result['paused']) and not $sickbeard.EPISODE_VIEW_DISPLAY_PAUSED: #if int($cur_result['paused']) and not $sickbeard.EPISODE_VIEW_DISPLAY_PAUSED:
#continue #continue
@ -334,7 +335,7 @@
<div class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING)</div><span class="sort-data">$cur_result['localtime'].strftime('%Y%m%d%H%M')</span> <div class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING)</div><span class="sort-data">$cur_result['localtime'].strftime('%Y%m%d%H%M')</span>
</td> </td>
<td class="tvShow"><a href="$sbRoot/home/displayShow?show=${cur_result['showid']}" data-name="$cur_result['data_show_name']">$cur_result['show_name']</a> <td class="tvShow"><a href="$sbRoot/home/displayShow?show=${cur_result['showid']}" data-name="$cur_result['data_show_name']">$display_name</a>
#if int($cur_result['paused']): #if int($cur_result['paused']):
<span class="pause">[paused]</span> <span class="pause">[paused]</span>
#end if #end if
@ -437,6 +438,7 @@
#for $cur_result in $sql_results: #for $cur_result in $sql_results:
#set $cur_indexer = int($cur_result['indexer']) #set $cur_indexer = int($cur_result['indexer'])
#set $display_name = (re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', $cur_result['show_name']), $cur_result['show_name'])[$sickbeard.SORT_ARTICLE]
#if int($cur_result['paused']) and not $sickbeard.EPISODE_VIEW_DISPLAY_PAUSED: #if int($cur_result['paused']) and not $sickbeard.EPISODE_VIEW_DISPLAY_PAUSED:
#continue #continue
@ -551,7 +553,7 @@
<td class="next_episode"> <td class="next_episode">
<div class="clearfix"> <div class="clearfix">
<span class="tvshowTitle"> <span class="tvshowTitle">
<a href="$sbRoot/home/displayShow?show=${cur_result['showid']}" data-name="$cur_result['data_show_name']">$cur_result['show_name'] <a href="$sbRoot/home/displayShow?show=${cur_result['showid']}" data-name="$cur_result['data_show_name']">$display_name
#if int($cur_result['paused']): #if int($cur_result['paused']):
<span class="pause">[paused]</span> <span class="pause">[paused]</span>
#end if #end if
@ -785,7 +787,7 @@
</div> <!-- end carouselinner //--> </div> <!-- end carouselinner //-->
</div> <!-- end Carousel //--> </div> <!-- end Carousel //-->
</div> <!-- end daybydayCarouselContainer //--> </div> <!-- end daybydayCarouselContainer //-->
<!-- end calender view //--> <!-- end calender view //-->
#end if #end if

22
gui/slick/interfaces/default/history.tmpl

@ -39,7 +39,7 @@
#if ('detailed' == $layout) #if ('detailed' == $layout)
4: function(node) { return \$(node).find('span').text().toLowerCase(); } 4: function(node) { return \$(node).find('span').text().toLowerCase(); }
#else #else
1: function(node) { return \$(node).find('span').text().toLowerCase(); }, 1: function(node) { return \$(node).find('span[data-name]').attr('data-name').toLowerCase(); },
2: function(node) { return \$(node).attr('provider').toLowerCase(); }, 2: function(node) { return \$(node).attr('provider').toLowerCase(); },
5: function(node) { return \$(node).attr('quality').toLowerCase(); } 5: function(node) { return \$(node).attr('quality').toLowerCase(); }
#end if #end if
@ -111,7 +111,7 @@
<th>Quality</th> <th>Quality</th>
</tr> </tr>
</thead> </thead>
<tfoot> <tfoot>
<tr> <tr>
<th class="nowrap" colspan="5">&nbsp;</th> <th class="nowrap" colspan="5">&nbsp;</th>
@ -121,11 +121,16 @@
<tbody> <tbody>
#for $hItem in $historyResults #for $hItem in $historyResults
#set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($hItem['action'])) #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($hItem['action']))
#set $data_name = (re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'\2', $hItem['show_name']), $hItem['show_name'])[$sickbeard.SORT_ARTICLE]
#set $display_name = '<span data-name="%s">%s - S%02iE%02i</span>' % (
$data_name,
(re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', $hItem['show_name']), $hItem['show_name'])[$sickbeard.SORT_ARTICLE],
int(hItem['season']), int(hItem['episode']))
<tr> <tr>
#set $curdatetime = $datetime.datetime.strptime(str($hItem['date']), $history.dateFormat) #set $curdatetime = $datetime.datetime.strptime(str($hItem['date']), $history.dateFormat)
<td><div class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($curdatetime, show_seconds=True)</div><span class="sort-data">$time.mktime($curdatetime.timetuple())</span></td> <td><div class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($curdatetime, show_seconds=True)</div><span class="sort-data">$time.mktime($curdatetime.timetuple())</span></td>
<td class="tvShow"><a href="$sbRoot/home/displayShow?show=$hItem['showid']#season-$hItem['season']">$hItem['show_name'] - <%= 'S%02i' % int(hItem['season']) + 'E%02i' % int(hItem['episode']) %>#if 'proper' in $hItem['resource'].lower or 'repack' in $hItem['resource'].lower then ' <span class="quality Proper">Proper</span>' else ''#</a></td> <td class="tvShow"><a href="$sbRoot/home/displayShow?show=$hItem['showid']#season-$hItem['season']">$display_name#if 'proper' in $hItem['resource'].lower or 'repack' in $hItem['resource'].lower then ' <span class="quality Proper">Proper</span>' else ''#</a></td>
<td#echo ('', ' class="subtitles_column"')[$curStatus == SUBTITLED]#> <td#echo ('', ' class="subtitles_column"')[SUBTITLED == $curStatus]#>
#if SUBTITLED == $curStatus #if SUBTITLED == $curStatus
<img width="16" height="11" src="$sbRoot/images/flags/<%= hItem["resource"][len(hItem["resource"])-6:len(hItem["resource"])-4] + '.png' %>"> <img width="16" height="11" src="$sbRoot/images/flags/<%= hItem["resource"][len(hItem["resource"])-6:len(hItem["resource"])-4] + '.png' %>">
#end if #end if
@ -151,7 +156,7 @@
#end if #end if
#end if #end if
</td> </td>
<td><span style="display:none">$curQuality</span><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><span class="hide">$curQuality</span><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>
</tr> </tr>
#end for #end for
@ -178,6 +183,11 @@
<tbody> <tbody>
#for $hItem in $compactResults #for $hItem in $compactResults
#set $curdatetime = $datetime.datetime.strptime(str($hItem['actions'][0]['time']), $history.dateFormat) #set $curdatetime = $datetime.datetime.strptime(str($hItem['actions'][0]['time']), $history.dateFormat)
#set $data_name = (re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'\2', $hItem['show_name']), $hItem['show_name'])[$sickbeard.SORT_ARTICLE]
#set $display_name = '<span data-name="%s">%s - S%02iE%02i</span>' % (
$data_name,
(re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', $hItem['show_name']), $hItem['show_name'])[$sickbeard.SORT_ARTICLE],
int(hItem['season']), int(hItem['episode']))
#set $prov_list = [] #set $prov_list = []
#set $down_list = [] #set $down_list = []
#set $order = 1 #set $order = 1
@ -227,7 +237,7 @@
<tr> <tr>
<td><div class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($curdatetime, show_seconds=True)</div><span class="sort-data">$time.mktime($curdatetime.timetuple())</span></td> <td><div class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($curdatetime, show_seconds=True)</div><span class="sort-data">$time.mktime($curdatetime.timetuple())</span></td>
<td class="tvShow"> <td class="tvShow">
<span><a href="$sbRoot/home/displayShow?show=$hItem['show_id']#season-$hItem['season']">$hItem['show_name'] - <%= 'S%02i' % int(hItem['season']) + 'E%02i' % int(hItem['episode']) %>#if 'proper' in $hItem['resource'].lower or 'repack' in $hItem['resource'].lower then ' <span class="quality Proper">Proper</span>' else ''#</a></span> <span><a href="$sbRoot/home/displayShow?show=$hItem['show_id']#season-$hItem['season']">$display_name#if 'proper' in $hItem['resource'].lower or 'repack' in $hItem['resource'].lower then ' <span class="quality Proper">Proper</span>' else ''#</a></span>
</td> </td>
<td class="provider" provider="<%= str(sorted(hItem['actions'])[0]['provider']) %>"> <td class="provider" provider="<%= str(sorted(hItem['actions'])[0]['provider']) %>">
#echo ''.join($prov_list)# #echo ''.join($prov_list)#

150
gui/slick/interfaces/default/home.tmpl

@ -28,48 +28,47 @@
</script> </script>
<script type="text/javascript" src="$sbRoot/js/home.js?v=$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/home.js?v=$sbPID"></script>
<h1 class="header" style="margin-bottom:0">$showlists[0][1]</h1> <h1 class="header" style="margin-bottom:0">$showlists[0][1]</h1>
<div id="HomeLayout" class="pull-right">
#set $tab = 1 #set $tab = 1
#if 'poster' != $layout #set $selected = ' selected="selected"'
#if 'poster' == $layout
<div>
<span>Sort By:
<select id="postersort" class="form-control form-control-inline input-sm" tabindex="$tab#set $tab += 1#">
<option value="name" data-sort="$sbRoot/setPosterSortBy/?sort=name"#echo $selected if 'name' == sickbeard.POSTER_SORTBY else ''#>Name</option>
<option value="date" data-sort="$sbRoot/setPosterSortBy/?sort=date"#echo $selected if 'date' == sickbeard.POSTER_SORTBY else ''#>Next Episode</option>
<option value="network" data-sort="$sbRoot/setPosterSortBy/?sort=network"#echo $selected if 'network' == sickbeard.POSTER_SORTBY else ''#>Network</option>
<option value="progress" data-sort="$sbRoot/setPosterSortBy/?sort=progress"#echo $selected if 'progress' == sickbeard.POSTER_SORTBY else ''#>Progress</option>
</select>
</span>
<div id="HomeLayout" class="pull-right not-poster"> <span style="margin-left:5px">Sort Order:
<div class="not-poster"> <select id="postersortdirection" class="form-control form-control-inline input-sm" tabindex="$tab#set $tab += 1#">
<input id="search_show_name" class="search form-control form-control-inline input-sm input200" type="search" data-column="1" placeholder="Search Show Name" tabindex="$tab#set $tab += 1#"> <option value="true" data-sort="$sbRoot/setPosterSortDir/?direction=1"#echo $selected if 1 == sickbeard.POSTER_SORTDIR else ''#>Asc</option>
&nbsp;<button type="button" class="resetshows resetanime btn btn-inline" tabindex="$tab#set $tab += 1#">Reset Search</button> <option value="false" data-sort="$sbRoot/setPosterSortDir/?direction=0"#echo $selected if 0 == sickbeard.POSTER_SORTDIR else ''#>Desc</option>
</div> </select>
</span>
<span class="pull-right not-poster">Layout: <span style="margin-left:5px">Layout:
#else #else
<span class="pull-right">Layout:
<div id="HomeLayout" class="pull-right poster">
<span class="pull-right poster">Layout:
#end if #end if
#set $selected = ' selected="selected"' <select style="margin-bottom:10px" name="layout" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;" tabindex="$tab#set $tab += 1#">
<select name="layout" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;" tabindex="$tab#set $tab += 1#"> <option value="$sbRoot/setHomeLayout/?layout=poster"#echo $selected if 'poster' == sickbeard.HOME_LAYOUT else ''#>Poster</option>
<option value="$sbRoot/setHomeLayout/?layout=poster"#echo $selected if 'poster' == sickbeard.HOME_LAYOUT else ''#>Poster</option> <option value="$sbRoot/setHomeLayout/?layout=small"#echo $selected if 'small' == sickbeard.HOME_LAYOUT else ''#>Small Poster</option>
<option value="$sbRoot/setHomeLayout/?layout=small"#echo $selected if 'small' == sickbeard.HOME_LAYOUT else ''#>Small Poster</option> <option value="$sbRoot/setHomeLayout/?layout=banner"#echo $selected if 'banner' == sickbeard.HOME_LAYOUT else ''#>Banner</option>
<option value="$sbRoot/setHomeLayout/?layout=banner"#echo $selected if 'banner' == sickbeard.HOME_LAYOUT else ''#>Banner</option> <option value="$sbRoot/setHomeLayout/?layout=simple"#echo $selected if 'simple' == sickbeard.HOME_LAYOUT else ''#>Simple</option>
<option value="$sbRoot/setHomeLayout/?layout=simple"#echo $selected if 'simple' == sickbeard.HOME_LAYOUT else ''#>Simple</option> </select>
</select> </span>
</span>
#if 'poster' == $layout
<span>Sort By:
<select id="postersort" class="form-control form-control-inline input-sm" tabindex="$tab#set $tab += 1#">
<option value="name" data-sort="$sbRoot/setPosterSortBy/?sort=name"#echo $selected if 'name' == sickbeard.POSTER_SORTBY else ''#>Name</option>
<option value="date" data-sort="$sbRoot/setPosterSortBy/?sort=date"#echo $selected if 'date' == sickbeard.POSTER_SORTBY else ''#>Next Episode</option>
<option value="network" data-sort="$sbRoot/setPosterSortBy/?sort=network"#echo $selected if 'network' == sickbeard.POSTER_SORTBY else ''#>Network</option>
<option value="progress" data-sort="$sbRoot/setPosterSortBy/?sort=progress"#echo $selected if 'progress' == sickbeard.POSTER_SORTBY else ''#>Progress</option>
</select>
</span>
<span style="margin:0 0 0 5px">Sort Order: #if 'poster' == $layout
<select id="postersortdirection" class="form-control form-control-inline input-sm" tabindex="$tab#set $tab += 1#"> </div>
<option value="true" data-sort="$sbRoot/setPosterSortDir/?direction=1"#echo $selected if 1 == sickbeard.POSTER_SORTDIR else ''#>Asc</option>
<option value="false" data-sort="$sbRoot/setPosterSortDir/?direction=0"#echo $selected if 0 == sickbeard.POSTER_SORTDIR else ''#>Desc</option>
</select>
</span>
&nbsp;
#end if #end if
<div class="pull-right" style="clear:right">
<input id="search_show_name" class="search form-control form-control-inline input-sm input200" type="search" data-column="1" placeholder="Search Show Name" tabindex="$tab#set $tab += 1#">
&nbsp;<button type="button" class="resetshows btn btn-inline" tabindex="$tab#set $tab += 1#">Reset Search</button>
</div>
</div><!-- /HomeLayout --> </div><!-- /HomeLayout -->
## ##
#for $curShowlist in $showlists #for $curShowlist in $showlists
@ -84,7 +83,7 @@
## ##
#if 'poster' == $layout #if 'poster' == $layout
## ##
<div id="$curListID" class="clearfix container"> <div id="$curListID" class="clearfix container" style="clear:both#if 'poster' == $layout#;padding:0#end if#">
<div class="posterview"> <div class="posterview">
## ##
#for $curLoadingShow in $sickbeard.showQueueScheduler.action.loadingShowList #for $curLoadingShow in $sickbeard.showQueueScheduler.action.loadingShowList
@ -95,7 +94,7 @@
## ##
#if None is $curLoadingShow.show #if None is $curLoadingShow.show
## ##
<div class="show" data-name="0" data-date="010101" data-network="0"> <div class="show-card" data-name="0" data-date="010101" data-network="0">
<img alt="" title="$curLoadingShow.show_name" class="show-image" style="border-bottom:1px solid #111" src="$sbRoot/images/poster.png" /> <img alt="" title="$curLoadingShow.show_name" class="show-image" style="border-bottom:1px solid #111" src="$sbRoot/images/poster.png" />
<div class="show-details"> <div class="show-details">
<div class="show-add">Loading... ($curLoadingShow.show_name)</div> <div class="show-add">Loading... ($curLoadingShow.show_name)</div>
@ -116,6 +115,7 @@
#set $cur_total = 0 #set $cur_total = 0
#set $download_stat_tip = '' #set $download_stat_tip = ''
#set $display_status = $curShow.status #set $display_status = $curShow.status
#set $display_name = (re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', $curShow.name), $curShow.name)[$sickbeard.SORT_ARTICLE]
#if None is not $display_status #if None is not $display_status
#if re.search(r'(?i)(?:new|returning)\s*series', $curShow.status) #if re.search(r'(?i)(?:new|returning)\s*series', $curShow.status)
#set $display_status = 'Continuing' #set $display_status = 'Continuing'
@ -178,18 +178,19 @@
#end if #end if
#end if #end if
## ##
<div id="show$curShow.indexerid" class="show" data-name="$curShow.name" data-date="$data_date" data-network="$curShow.network"> <div id="show$curShow.indexerid" class="show-card" data-name="$curShow.name" data-date="$data_date" data-network="$curShow.network">
<div class="show-image"> <div class="show-card-top">
<a href="$sbRoot/home/displayShow?show=$curShow.indexerid"><img alt="" class="show-image" src="$sbRoot/showPoster/?show=$curShow.indexerid&amp;which=poster_thumb" /></a> <div class="show-image">
</div> <a href="$sbRoot/home/displayShow?show=$curShow.indexerid"><img alt="" class="show-image" src="$sbRoot/showPoster/?show=$curShow.indexerid&amp;which=poster_thumb" /></a>
</div>
<div id="progressbar$curShow.indexerid"></div> <div style="border-top:1px solid black;height:1px"></div>
<div class="show-title"> <div class="show-title">
$curShow.name $display_name
</div> </div>
<div class="show-date"> <div class="show-date">
#if $cur_airs_next #if $cur_airs_next
#set $ldatetime = $sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($cur_airs_next,$curShow.airs,$curShow.network)) #set $ldatetime = $sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($cur_airs_next,$curShow.airs,$curShow.network))
<span class="$fuzzydate">$sbdatetime.sbdatetime.sbfdate($ldatetime)</span> <span class="$fuzzydate">$sbdatetime.sbdatetime.sbfdate($ldatetime)</span>
@ -202,34 +203,40 @@
#set $output_html = $display_status #set $output_html = $display_status
#end if #end if
#end if #end if
$output_html $output_html
#end if #end if
</div><!-- /show-date --> </div><!-- /show-date -->
<table width="100%" border="0"> <table width="100%" border="0">
<tr> <tr>
<td class="show-table"> <td class="show-table">
<span class="show-dlstats" title="$download_stat_tip">$download_stat</span> <span class="show-dlstats" title="$download_stat_tip">$download_stat</span>
</td> </td>
<td class="show-table"> <td class="show-table show-network">
#if 'simple' != $layout #if 'simple' == $layout
#set $img_text = ($curShow.network, 'No Network')[None is $curShow.network] $curShow.network
<img class="show-network-image" src="$sbRoot/images/network/$network_images[$curShow.indexerid]" alt="#echo '%s" title="%s' % ($img_text, $img_text)#" />
#else #else
$curShow.network #set $img_text = ($curShow.network, 'No Network')[None is $curShow.network]
#if 'No Network' is not $img_text and 'nonetwork' in $network_images[$curShow.indexerid]
$curShow.network
#else
<img class="show-network-image" src="$sbRoot/images/network/$network_images[$curShow.indexerid]" alt="$img_text" title="$img_text" />
#end if
#end if #end if
</td> </td>
<td class="show-table"> <td class="show-table">
#if $curShow.quality in $qualityPresets #if $curShow.quality in $qualityPresets
<span class="show-quality">$qualityPresetStrings[$curShow.quality]</span> <span class="show-quality">$qualityPresetStrings[$curShow.quality]</span>
#else #else
<span class="show-quality">Custom</span> <span class="show-quality">Custom</span>
#end if #end if
</td> </td>
</tr> </tr>
</table> </table>
</div>
<div id="progressbar$curShow.indexerid"></div>
<span class="sort-data" data-progress="$progressbar_percent"></span> <span class="sort-data" data-progress="$progressbar_percent"></span>
</div><!-- /show$curShow.indexerid --> </div><!-- /show$curShow.indexerid -->
@ -294,6 +301,7 @@
#set $cur_downloaded = 0 #set $cur_downloaded = 0
#set $cur_total = 0 #set $cur_total = 0
#set $download_stat_tip = '' #set $download_stat_tip = ''
#set $display_name = (re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', $curShow.name), $curShow.name)[$sickbeard.SORT_ARTICLE]
## ##
#if $curShow.indexerid in $show_stat #if $curShow.indexerid in $show_stat
#set $cur_airs_next = $show_stat[$curShow.indexerid]['ep_airs_next'] #set $cur_airs_next = $show_stat[$curShow.indexerid]['ep_airs_next']
@ -350,7 +358,7 @@
<a href="$sbRoot/showPoster/?show=$curShow.indexerid&amp;which=poster" rel="dialog" title="$curShow.name"> <a href="$sbRoot/showPoster/?show=$curShow.indexerid&amp;which=poster" rel="dialog" title="$curShow.name">
<img src="$sbRoot/showPoster/?show=$curShow.indexerid&amp;which=poster_thumb" class="$layout" alt="$curShow.indexerid"/> <img src="$sbRoot/showPoster/?show=$curShow.indexerid&amp;which=poster_thumb" class="$layout" alt="$curShow.indexerid"/>
</a> </a>
<a href="$sbRoot/home/displayShow?show=$curShow.indexerid" style="vertical-align:middle">$curShow.name</a> <a href="$sbRoot/home/displayShow?show=$curShow.indexerid" style="vertical-align:middle">$display_name</a>
</div> </div>
</td> </td>
#else if 'banner' == $layout #else if 'banner' == $layout
@ -361,18 +369,22 @@
<img src="$sbRoot/showPoster/?show=$curShow.indexerid&amp;which=banner" class="$layout" alt="$curShow.indexerid" title="$curShow.name" /> <img src="$sbRoot/showPoster/?show=$curShow.indexerid&amp;which=banner" class="$layout" alt="$curShow.indexerid" title="$curShow.name" />
</a> </a>
</div> </div>
<span class="sort-data">$curShow.name</span> <span class="sort-data">$display_name/span>
</td> </td>
#else if 'simple' == $layout #else if 'simple' == $layout
<td class="tvShow text-left"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></td> <td class="tvShow text-left"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$display_name</a></td>
#end if #end if
#if 'simple' != $layout #if 'simple' != $layout
#set $img_text = ($curShow.network, 'No Network')[None is $curShow.network] #set $img_text = ($curShow.network, 'No Network')[None is $curShow.network]
<td> <td>
#if 'No Network' is not $img_text and 'nonetwork' in $network_images[$curShow.indexerid]
$curShow.network
#else
<img width="54" height="27" src="$sbRoot/images/network/$network_images[$curShow.indexerid]" alt="#echo '%s" title="%s' % ($img_text, $img_text)#" /> <img width="54" height="27" src="$sbRoot/images/network/$network_images[$curShow.indexerid]" alt="#echo '%s" title="%s' % ($img_text, $img_text)#" />
<span class="sort-data">$curShow.network</span> <span class="sort-data">$curShow.network</span>
#end if
</td> </td>
#else #else
@ -420,4 +432,4 @@
## ##
#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')

8
gui/slick/interfaces/default/home_addExistingShow.tmpl

@ -12,13 +12,11 @@
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
<!-- <!--
var config = { sortArticle: #echo ['!1','!0'][$sickbeard.SORT_ARTICLE]# }
\$.sgSid = '$kwargs.get('sid', '')'; \$.sgSid = '$kwargs.get('sid', '')';
\$.sgHashDir = '$kwargs.get('hash_dir', '')'; \$.sgHashDir = '$kwargs.get('hash_dir', '')';
\$(document).ready(function(){ \$(document).ready(function(){
\$( '#tabs' ).tabs({ \$('#tabs').tabs({ collapsible: !0, selected: #echo ('0','-1')[any($sickbeard.ROOT_DIRS)]# });
collapsible: true,
selected: #if $sickbeard.ROOT_DIRS then '-1' else '0'#
});
}); });
//--> //-->
</script> </script>
@ -37,7 +35,7 @@
<form id="addShowForm" method="post" action="$sbRoot/home/addShows/addNewShow" accept-charset="utf-8"> <form id="addShowForm" method="post" action="$sbRoot/home/addShows/addNewShow" accept-charset="utf-8">
<span#if $kwargs.get('hash_dir', None)# style="display:none"#end if> <span#if $kwargs.get('hash_dir', None)# class="hide"#end if#>
<p>Tip: shows are added quicker when usable show nfo and xml metadata is found</p> <p>Tip: shows are added quicker when usable show nfo and xml metadata is found</p>
<p style="margin-top:15px"> <p style="margin-top:15px">

41
gui/slick/interfaces/default/home_addShows.tmpl

@ -17,36 +17,36 @@
#end if #end if
<div id="addShowPortal"> <div id="addShowPortal">
<a class="btn btn-large" href="$sbRoot/home/addShows/newShow/"> <a class="btn btn-large" href="$sbRoot/home/addShows/new_show/">
<div class="button"><div class="icon-addnewshow"></div></div> <div class="button"><div class="icon-addnewshow square-32"></div></div>
<div class="buttontext"> <div class="buttontext">
<h3>Add New Show</h3> <h3>Add new show</h3>
<p>Search a TV database for a show to add.</p> <p>Search a TV database for a show.</p>
</div> </div>
</a> </a>
<a class="btn btn-large" href="$sbRoot/home/addShows/trakt_default/"> <a class="btn btn-large" href="$sbRoot/home/addShows/trakt_default/">
<div class="button"><div class="icon-addrecommendedshow"></div></div> <div class="button"><div class="icon-addrecommendedshow square-32"></div></div>
<div class="buttontext"> <div class="buttontext">
<h3>Add From Trakt</h3> <h3>Add from Trakt</h3>
<p>Browse trends, recommended and more.</p> <p>Browse trends, recommended and more.</p>
</div> </div>
</a> </a>
<div style="clear:both;font-size:2px">&nbsp;</div> <div style="clear:both;font-size:2px">&nbsp;</div>
<a class="btn btn-large" href="$sbRoot/home/addShows/existingShows/"> <a class="btn btn-large" href="$sbRoot/home/addShows/existing_shows/">
<div class="button"><div class="icon-addexistingshow"></div></div> <div class="button"><div class="icon-addexistingshow square-32"></div></div>
<div class="buttontext"> <div class="buttontext">
<h3>Add Existing Shows</h3> <h3>Add existing shows</h3>
<p>Scan parent folders to import into SickGear.</p> <p>Scan parent folders to import into SickGear.</p>
</div> </div>
</a> </a>
<a class="btn btn-large" href="$sbRoot/home/addShows/popular_imdb/"> <a class="btn btn-large" href="$sbRoot/home/addShows/imdb_default/">
<div class="button"><div class="icon-addtrendingshow"></div></div> <div class="button"><div class="img-imdb square-32"></div></div>
<div class="buttontext"> <div class="buttontext">
<h3>Add From IMDb</h3> <h3>Add from IMDb</h3>
<p>Browse popular for a show to add.</p> <p>Browse popular for a show to add.</p>
</div> </div>
</a> </a>
@ -54,17 +54,20 @@
<div style="clear:both;font-size:2px">&nbsp;</div> <div style="clear:both;font-size:2px">&nbsp;</div>
#if $sickbeard.USE_ANIDB #if $sickbeard.USE_ANIDB
<a class="btn btn-large" href="$sbRoot/home/addShows/randomhot_anidb/" style="float:right"> <a class="btn btn-large" href="$sbRoot/home/addShows/anime_default/">
<div class="button"><div class="icon-addtrendingshow"></div></div> <div class="button"><div class="img-anime square-32"></div></div>
<div class="buttontext"> <div class="buttontext">
<h3>Add from AniDB</h3> <h3>Add anime show</h3>
<p>Browse what's hot and recommnended.</p> <p>Browse anime to add.</p>
</div> </div>
</a> </a>
#else #else
<div class="buttontext" style="padding:10px 5px 10px 30px"> <div class="buttontext" style="margin:0px 7px 14px;padding:0 5px 0 28px">
<h3>Add Random/Hot AniDB</h3> <div class="button"><div class="img-anime square-32"></div></div>
<p>To use, enable AniDB in Config/Anime.</p> <div class="buttontext">
<h3>Add anime show</h3>
<p>To use, enable AniDB in <a href="$sbRoot/config/anime/">Config/Anime</a>.</p>
</div>
</div> </div>
#end if #end if

16
gui/slick/interfaces/default/home_browseShows.tmpl

@ -10,6 +10,7 @@
#set global $header='Browse Shows' #set global $header='Browse Shows'
#set global $sbPath='..' #set global $sbPath='..'
#set global $topmenu='home' #set global $topmenu='home'
#set global $page_body_attr = 'browse-list'
## ##
#import os.path #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')
@ -38,12 +39,13 @@
var \$container = [\$('#container')]; var \$container = [\$('#container')];
jQuery.each(\$container, function (j) { jQuery.each(\$container, function (j) {
this.isotope({ this.isotope({
itemSelector: '.browse-show', itemSelector: '.show-card',
sortBy: 'original-order', sortBy: 'original-order',
layoutMode: 'masonry', layoutMode: 'masonry',
masonry: { masonry: {
columnWidth: 12, columnWidth: 188,
isFitWidth: true isFitWidth: !0,
gutter: 12
}, },
getSortData: { getSortData: {
premiered: '[data-premiered] parseInt', premiered: '[data-premiered] parseInt',
@ -196,8 +198,8 @@
#set $overview = $this_show['overview'] #set $overview = $this_show['overview']
#end if #end if
<div class="browse-show <%= ('notinlibrary', 'inlibrary')[':' in this_show['show_id']] %>" data-name="#echo re.sub(r'([\'\"])', r'', $this_show['title'])#" data-rating="$this_show['rating']" data-votes="$this_show['votes']" data-premiered="$this_show['premiered']"> <div class="show-card <%= ('notinlibrary', 'inlibrary')[':' in this_show['show_id']] %>" data-name="#echo re.sub(r'([\'\"])', r'', $this_show['title'])#" data-rating="$this_show['rating']" data-votes="$this_show['votes']" data-premiered="$this_show['premiered']">
<div class="browse-container"> <div class="show-card-inner">
<div class="browse-image"> <div class="browse-image">
<a class="browse-image" href="<%= anon_url(this_show['url_src_db']) %>" target="_blank" <a class="browse-image" href="<%= anon_url(this_show['url_src_db']) %>" target="_blank"
title="<span style='color: rgb(66, 139, 202)'>$re.sub(r'(?m)\s+\((?:19|20)\d\d\)\s*$', '', $title_html)</span>#if $this_show['genres']#<br /><div style='font-weight:bold'>(<em>$this_show['genres']</em>)</div>#end if# title="<span style='color: rgb(66, 139, 202)'>$re.sub(r'(?m)\s+\((?:19|20)\d\d\)\s*$', '', $title_html)</span>#if $this_show['genres']#<br /><div style='font-weight:bold'>(<em>$this_show['genres']</em>)</div>#end if#
@ -214,7 +216,7 @@
</div> </div>
<div class="show-title"> <div class="show-title">
<%= (this_show['title'], '<span>&nbsp;</span>')['' == this_show['title']] %> <%= ((re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', this_show['title']), this_show['title'])[sickbeard.SORT_ARTICLE], '<span>&nbsp;</span>')['' == this_show['title']] %>
</div> </div>
<div class="clearfix"> <div class="clearfix">
@ -243,7 +245,7 @@
</div> </div>
#end if #end if
#else #else
<div class="browse-show" style="width:100%; margin-top:20px"> <div class="show-card" style="width:100%; margin-top:20px">
<p class="red-text"> <p class="red-text">
#if $kwargs and $kwargs.get('error_msg', None): #if $kwargs and $kwargs.get('error_msg', None):
$kwargs['error_msg'] $kwargs['error_msg']

4
gui/slick/interfaces/default/home_massAddTable.tmpl

@ -1,3 +1,4 @@
#import re
#import sickbeard #import sickbeard
#from sickbeard.helpers import anon_url #from sickbeard.helpers import anon_url
@ -47,7 +48,8 @@
</td> </td>
<td> <td>
<label for="$show_id"> <label for="$show_id">
<span class="filepath#echo ('', ' red-text')[$curDir['highlight']]#">$curDir['path']</span>$curDir['name'] #set $display_name = (re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', $curDir['name']), $curDir['name'])[$sickbeard.SORT_ARTICLE]
<span class="filepath#echo ('', ' red-text')[$curDir['highlight']]#">$curDir['path']</span>$display_name
#echo ('', '<br />^ <span class="red-text">... (cannot add, this location is in use)</span>')[$curDir['highlight']]# #echo ('', '<br />^ <span class="red-text">... (cannot add, this location is in use)</span>')[$curDir['highlight']]#
</label> </label>
</td> </td>

23
gui/slick/interfaces/default/manage.tmpl

@ -23,24 +23,16 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
<!-- <!--
\$.tablesorter.addParser({ \$.tablesorter.addParser({
id: 'showNames', id: 'showNames',
is: function(s) { is: function(s) { return !1; },
return false;
},
format: function(s) { format: function(s) {
#if not $sickbeard.SORT_ARTICLE return (s || '')#if not $sickbeard.SORT_ARTICLE#.replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1')#end if#;
return (s || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
#else
return (s || '');
#end if
}, },
type: 'text' type: 'text'
}); });
\$.tablesorter.addParser({ \$.tablesorter.addParser({
id: 'quality', id: 'quality',
is: function(s) { is: function(s) { return !1; },
return false;
},
format: function(s) { format: function(s) {
return s.replace('hd1080p', 5).replace('hd720p', 4).replace('hd', 3).replace('sd', 2).replace('any', 1).replace('best', 0).replace('custom', 7); return s.replace('hd1080p', 5).replace('hd720p', 4).replace('hd', 3).replace('sd', 2).replace('any', 1).replace('best', 0).replace('custom', 7);
}, },
@ -128,7 +120,7 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
<td rowspan="1" colspan="#echo $columns_total-2#" class="align-right alt"><input class="btn pull-right" type="button" value="Submit" id="submitMassUpdate"></td> <td rowspan="1" colspan="#echo $columns_total-2#" class="align-right alt"><input class="btn pull-right" type="button" value="Submit" id="submitMassUpdate"></td>
</tr> </tr>
</tfoot> </tfoot>
<tbody> <tbody>
#set $disabled = ' disabled="disabled"' #set $disabled = ' disabled="disabled"'
@ -179,7 +171,8 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
$option_state % ('remove', 'remove', ('', $disabled + $reason)[$curRemove_disabled])) $option_state % ('remove', 'remove', ('', $disabled + $reason)[$curRemove_disabled]))
<tr> <tr>
<td align="center"><input type="checkbox" class="editCheck" id="edit-$curShow.indexerid"></td> <td align="center"><input type="checkbox" class="editCheck" id="edit-$curShow.indexerid"></td>
<td class="tvShow"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></td> #set $display_name = (re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', $curShow.name), $curShow.name)[$sickbeard.SORT_ARTICLE]
<td class="tvShow"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$display_name</a></td>
#if $curShow.quality in $qualityPresets #if $curShow.quality in $qualityPresets
<td align="center"><span class="quality $qualityPresetStrings[$curShow.quality]">$qualityPresetStrings[$curShow.quality]</span></td> <td align="center"><span class="quality $qualityPresetStrings[$curShow.quality]">$qualityPresetStrings[$curShow.quality]</span></td>
#else #else
@ -208,9 +201,9 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
</tr> </tr>
#end for #end for
</tbody> </tbody>
</table> </table>
</form> </form>
#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')

12
gui/slick/js/addExistingShow.js

@ -52,11 +52,21 @@ $(document).ready(function(){
url, url,
function(data){ function(data){
$('#tableDiv').html(data); $('#tableDiv').html(data);
$.tablesorter.addParser({
id: 'showNames',
is: function(s) { return !1; },
format: function(s) {
var name = (s || '');
return config.sortArticle ? name : name.replace(/(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
},
type: 'text'
});
$('#addRootDirTable').tablesorter({ $('#addRootDirTable').tablesorter({
sortList: [[1,0]], sortList: [[1,0]],
widgets: ['zebra'], widgets: ['zebra'],
headers: { headers: {
0: { sorter: false } 0: { sorter: false },
1: { sorter: 'showNames' }
} }
}); });
}); });

58
gui/slick/js/home.js

@ -1,16 +1,13 @@
$.tablesorter.addParser({ $.tablesorter.addParser({
id: 'loadingNames', id: 'loadingNames',
is: function (s) { is: function (s) {
return false; return !1;
}, },
format: function (s) { format: function (s) {
if (s.indexOf('Loading...') === 0) { var name = (s || '');
return s.replace('Loading...', '000'); if (0 == name.indexOf('Loading...'))
} else if (config.sortArticle) { return name.replace('Loading...', '000');
return (s || ''); return config.sortArticle ? name : name.replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
} else {
return (s || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
}
}, },
type: 'text' type: 'text'
}); });
@ -18,7 +15,7 @@ $.tablesorter.addParser({
$.tablesorter.addParser({ $.tablesorter.addParser({
id: 'quality', id: 'quality',
is: function (s) { is: function (s) {
return false; return !1;
}, },
format: function (s) { format: function (s) {
return s.replace('hd1080p', 5).replace('hd720p', 4).replace('hd', 3).replace('sd', 2).replace('any', 1).replace('custom', 7); return s.replace('hd1080p', 5).replace('hd720p', 4).replace('hd', 3).replace('sd', 2).replace('any', 1).replace('custom', 7);
@ -51,30 +48,22 @@ $(document).ready(function () {
$(elId + ' > .ui-progressbar-value').addClass('progress-' + v); $(elId + ' > .ui-progressbar-value').addClass('progress-' + v);
}); });
$('img#network').on('error', function () {
$(this).parent().text($(this).attr('alt'));
$(this).remove();
});
if (config.isPoster) { if (config.isPoster) {
$('.container').each(function (i, obj) { $('.container').each(function (i, obj) {
$(obj).isotope({ $(obj).isotope({
itemSelector: '.show', itemSelector: '.show-card',
sortBy: config.posterSortby, sortBy: config.posterSortby,
sortAscending: config.posterSortdir, sortAscending: config.posterSortdir,
layoutMode: 'masonry', layoutMode: 'masonry',
masonry: { masonry: {
columnWidth: 12, columnWidth: 188,
isFitWidth: true isFitWidth: !0,
gutter: 12
}, },
getSortData: { getSortData: {
name: function (itemElem) { name: function (itemElem) {
var name = $(itemElem).attr('data-name'); var name = $(itemElem).attr('data-name') || '';
if (config.sortArticle) { return config.sortArticle ? name : name.replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
return (name || '');
} else {
return (name || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
}
}, },
date: function (itemElem) { date: function (itemElem) {
var date = $(itemElem).attr('data-date'); var date = $(itemElem).attr('data-date');
@ -101,6 +90,14 @@ $(document).ready(function () {
$.get(this.options[this.selectedIndex].getAttribute('data-sort')); $.get(this.options[this.selectedIndex].getAttribute('data-sort'));
}); });
}); });
$('#search_show_name').on('input', function() {
$('.container').isotope({
filter: function () {
return 0 <= $(this).attr('data-name').toLowerCase().indexOf(
$('#search_show_name').val().toLowerCase());
}
});
});
} else { } else {
$('.tablesorter').each(function (i, obj) { $('.tablesorter').each(function (i, obj) {
$(obj).has('tbody tr').tablesorter({ $(obj).has('tbody tr').tablesorter({
@ -130,12 +127,19 @@ $(document).ready(function () {
4: {sorter: 'eps'} 4: {sorter: 'eps'}
}, },
widgetOptions: { widgetOptions: {
filter_columnFilters: false, filter_columnFilters: !1
filter_reset: '.resetshows'
}, },
sortStable: true sortStable: !0
}); });
$.tablesorter.filter.bindSearch($(obj), $('.search')); $.tablesorter.filter.bindSearch($(obj), $('.search'));
}); });
} }
}); $('.resetshows').click(function() {
var input = $('#search_show_name');
if ('' !== input.val()){
input.val('').trigger('input').change();
if (config.homeSearchFocus)
input.focus();
}
});
});

38
sickbeard/webserve.py

@ -2351,7 +2351,7 @@ class NewHomeAddShows(Home):
return t.respond() return t.respond()
def newShow(self, show_to_add=None, other_shows=None, use_show_name=None, **kwargs): def new_show(self, show_to_add=None, other_shows=None, use_show_name=None, **kwargs):
""" """
Display the new show page which collects a tvdb id, folder, and extra options and Display the new show page which collects a tvdb id, folder, and extra options and
posts them to addNewShow posts them to addNewShow
@ -2485,11 +2485,15 @@ class NewHomeAddShows(Home):
return self.browse_shows(browse_type, 'Random and Hot at AniDB', filtered, **kwargs) return self.browse_shows(browse_type, 'Random and Hot at AniDB', filtered, **kwargs)
def anime_default(self):
return self.redirect('/home/addShows/randomhot_anidb')
def addAniDBShow(self, indexer_id, showName): def addAniDBShow(self, indexer_id, showName):
if helpers.findCertainShow(sickbeard.showList, config.to_int(indexer_id, '')): if helpers.findCertainShow(sickbeard.showList, config.to_int(indexer_id, '')):
return return
return self.newShow('|'.join(['', '', '', indexer_id or showName]), use_show_name=True, is_anime=True) return self.new_show('|'.join(['', '', '', indexer_id or showName]), use_show_name=True, is_anime=True)
def popular_imdb(self, *args, **kwargs): def popular_imdb(self, *args, **kwargs):
@ -2581,8 +2585,12 @@ class NewHomeAddShows(Home):
kwargs.update(dict(footnote=footnote)) kwargs.update(dict(footnote=footnote))
return self.browse_shows(browse_type, 'Most Popular IMDb TV', filtered, **kwargs) return self.browse_shows(browse_type, 'Most Popular IMDb TV', filtered, **kwargs)
def imdb_default(self):
return self.redirect('/home/addShows/popular_imdb')
def addIMDbShow(self, indexer_id, showName): def addIMDbShow(self, indexer_id, showName):
return self.newShow('|'.join(['', '', '', re.search('(?i)tt\d+$', indexer_id) and indexer_id or showName]), return self.new_show('|'.join(['', '', '', re.search('(?i)tt\d+$', indexer_id) and indexer_id or showName]),
use_show_name=True) use_show_name=True)
def trakt_anticipated(self, *args, **kwargs): def trakt_anticipated(self, *args, **kwargs):
@ -2752,7 +2760,7 @@ class NewHomeAddShows(Home):
def addTraktShow(self, indexer_id, showName): def addTraktShow(self, indexer_id, showName):
if not helpers.findCertainShow(sickbeard.showList, config.to_int(indexer_id, '')): if not helpers.findCertainShow(sickbeard.showList, config.to_int(indexer_id, '')):
return self.newShow('|'.join(['', '', '', config.to_int(indexer_id, None) and indexer_id or showName]), return self.new_show('|'.join(['', '', '', config.to_int(indexer_id, None) and indexer_id or showName]),
use_show_name=True) use_show_name=True)
def browse_shows(self, browse_type, browse_title, shows, *args, **kwargs): def browse_shows(self, browse_type, browse_title, shows, *args, **kwargs):
@ -2790,7 +2798,7 @@ class NewHomeAddShows(Home):
return t.respond() return t.respond()
def existingShows(self, *args, **kwargs): def existing_shows(self, *args, **kwargs):
""" """
Prints out the page to add existing shows from a root dir Prints out the page to add existing shows from a root dir
""" """
@ -2808,7 +2816,7 @@ class NewHomeAddShows(Home):
scene=None, blacklist=None, whitelist=None, wanted_begin=None, wanted_latest=None, tag=None): scene=None, blacklist=None, whitelist=None, wanted_begin=None, wanted_latest=None, tag=None):
""" """
Receive tvdb id, dir, and other options and create a show from them. If extra show dirs are Receive tvdb id, dir, and other options and create a show from them. If extra show dirs are
provided then it forwards back to newShow, if not it goes to /home. provided then it forwards back to new_show, if not it goes to /home.
""" """
# grab our list of other dirs if given # grab our list of other dirs if given
@ -2827,7 +2835,7 @@ class NewHomeAddShows(Home):
rest_of_show_dirs = other_shows[1:] rest_of_show_dirs = other_shows[1:]
# go to add the next show # go to add the next show
return self.newShow(next_show_dir, rest_of_show_dirs) return self.new_show(next_show_dir, rest_of_show_dirs)
# if we're skipping then behave accordingly # if we're skipping then behave accordingly
if skipShow: if skipShow:
@ -2845,7 +2853,7 @@ class NewHomeAddShows(Home):
logger.log('Unable to add show due to show selection. Not enough arguments: %s' % (repr(series_pieces)), logger.log('Unable to add show due to show selection. Not enough arguments: %s' % (repr(series_pieces)),
logger.ERROR) logger.ERROR)
ui.notifications.error('Unknown error. Unable to add show due to problem with show selection.') ui.notifications.error('Unknown error. Unable to add show due to problem with show selection.')
return self.redirect('/home/addShows/existingShows/') return self.redirect('/home/addShows/existing_shows/')
indexer = int(series_pieces[0]) indexer = int(series_pieces[0])
indexer_id = int(series_pieces[2]) indexer_id = int(series_pieces[2])
@ -2868,7 +2876,7 @@ class NewHomeAddShows(Home):
# blanket policy - if the dir exists you should have used 'add existing show' numbnuts # blanket policy - if the dir exists you should have used 'add existing show' numbnuts
if ek.ek(os.path.isdir, show_dir) and not fullShowPath: if ek.ek(os.path.isdir, show_dir) and not fullShowPath:
ui.notifications.error('Unable to add show', u'Found existing folder: ' + show_dir) ui.notifications.error('Unable to add show', u'Found existing folder: ' + show_dir)
return self.redirect('/home/addShows/existingShows?sid=%s&hash_dir=%s' % (indexer_id, abs(hash(show_dir)))) return self.redirect('/home/addShows/existing_shows?sid=%s&hash_dir=%s' % (indexer_id, abs(hash(show_dir))))
# don't create show dir if config says not to # don't create show dir if config says not to
if sickbeard.ADD_SHOWS_WO_DIR: if sickbeard.ADD_SHOWS_WO_DIR:
@ -2932,11 +2940,11 @@ class NewHomeAddShows(Home):
def addExistingShows(self, shows_to_add=None, promptForSettings=None, **kwargs): def addExistingShows(self, shows_to_add=None, promptForSettings=None, **kwargs):
""" """
Receives a dir list and add them. Adds the ones with given TVDB IDs first, then forwards Receives a dir list and add them. Adds the ones with given TVDB IDs first, then forwards
along to the newShow page. along to the new_show page.
""" """
if kwargs.get('sid', None): if kwargs.get('sid', None):
return self.redirect('/home/addShows/newShow?show_to_add=%s&use_show_name=True' % return self.redirect('/home/addShows/new_show?show_to_add=%s&use_show_name=True' %
'|'.join(['', '', '', kwargs.get('sid', '')])) '|'.join(['', '', '', kwargs.get('sid', '')]))
# grab a list of other shows to add, if provided # grab a list of other shows to add, if provided
@ -2965,9 +2973,9 @@ class NewHomeAddShows(Home):
indexer_id_given.append((indexer, show_dir, int(indexer_id), show_name)) indexer_id_given.append((indexer, show_dir, int(indexer_id), show_name))
# if they want me to prompt for settings then I will just carry on to the newShow page # if they want me to prompt for settings then I will just carry on to the new_show page
if promptForSettings and shows_to_add: if promptForSettings and shows_to_add:
return self.newShow(shows_to_add[0], shows_to_add[1:]) return self.new_show(shows_to_add[0], shows_to_add[1:])
# if they don't want me to prompt for settings then I can just add all the nfo shows now # if they don't want me to prompt for settings then I can just add all the nfo shows now
num_added = 0 num_added = 0
@ -2993,8 +3001,8 @@ class NewHomeAddShows(Home):
if not dirs_only: if not dirs_only:
return self.redirect('/home/') return self.redirect('/home/')
# for the remaining shows we need to prompt for each one, so forward this on to the newShow page # for the remaining shows we need to prompt for each one, so forward this on to the new_show page
return self.newShow(dirs_only[0], dirs_only[1:]) return self.new_show(dirs_only[0], dirs_only[1:])
class Manage(MainHandler): class Manage(MainHandler):

Loading…
Cancel
Save