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.
This commit is contained in:
JackDandy 2016-02-14 12:28:30 +00:00
parent 5e848c157f
commit 58ea9588a7
15 changed files with 318 additions and 272 deletions

View file

@ -32,6 +32,9 @@
* Add CPU throttling preset "Disabled" to config/General/Advanced Settings
* Change overhaul Kodi notifier and tidy up config/notification/KodiNotifier ui
* 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)

View file

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

View file

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

View file

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

View file

@ -304,6 +304,7 @@
#for $cur_result in $sql_results:
#set $cur_indexer = int($cur_result['indexer'])
#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:
#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>
</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']):
<span class="pause">[paused]</span>
#end if
@ -437,6 +438,7 @@
#for $cur_result in $sql_results:
#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:
#continue
@ -551,7 +553,7 @@
<td class="next_episode">
<div class="clearfix">
<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']):
<span class="pause">[paused]</span>
#end if
@ -785,7 +787,7 @@
</div> <!-- end carouselinner //-->
</div> <!-- end Carousel //-->
</div> <!-- end daybydayCarouselContainer //-->
</div> <!-- end daybydayCarouselContainer //-->
<!-- end calender view //-->
#end if

View file

@ -39,7 +39,7 @@
#if ('detailed' == $layout)
4: function(node) { return \$(node).find('span').text().toLowerCase(); }
#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(); },
5: function(node) { return \$(node).attr('quality').toLowerCase(); }
#end if
@ -111,7 +111,7 @@
<th>Quality</th>
</tr>
</thead>
<tfoot>
<tr>
<th class="nowrap" colspan="5">&nbsp;</th>
@ -121,11 +121,16 @@
<tbody>
#for $hItem in $historyResults
#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>
#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 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#echo ('', ' class="subtitles_column"')[$curStatus == SUBTITLED]#>
<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"')[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' %>">
#end if
@ -151,7 +156,7 @@
#end if
#end if
</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>
#end for
@ -178,6 +183,11 @@
<tbody>
#for $hItem in $compactResults
#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 $down_list = []
#set $order = 1
@ -227,7 +237,7 @@
<tr>
<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">
<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 class="provider" provider="<%= str(sorted(hItem['actions'])[0]['provider']) %>">
#echo ''.join($prov_list)#

View file

@ -28,48 +28,47 @@
</script>
<script type="text/javascript" src="$sbRoot/js/home.js?v=$sbPID"></script>
<h1 class="header" style="margin-bottom:0">$showlists[0][1]</h1>
<div id="HomeLayout" class="pull-right">
#set $tab = 1
#if 'poster' != $layout
<div id="HomeLayout" class="pull-right not-poster">
<div class="not-poster">
<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 resetanime btn btn-inline" tabindex="$tab#set $tab += 1#">Reset Search</button>
</div>
<span class="pull-right not-poster">Layout:
#else
<div id="HomeLayout" class="pull-right poster">
<span class="pull-right poster">Layout:
#end if
#set $selected = ' selected="selected"'
<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=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=simple"#echo $selected if 'simple' == sickbeard.HOME_LAYOUT else ''#>Simple</option>
</select>
</span>
#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>
<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-left:5px">Sort Order:
<select id="postersortdirection" class="form-control form-control-inline input-sm" tabindex="$tab#set $tab += 1#">
<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>
<span style="margin:0 0 0 5px">Sort Order:
<select id="postersortdirection" class="form-control form-control-inline input-sm" tabindex="$tab#set $tab += 1#">
<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;
<span style="margin-left:5px">Layout:
#else
<span class="pull-right">Layout:
#end if
<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#">
<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=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>
</select>
</span>
#if 'poster' == $layout
</div>
#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 -->
##
#for $curShowlist in $showlists
@ -84,7 +83,7 @@
##
#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">
##
#for $curLoadingShow in $sickbeard.showQueueScheduler.action.loadingShowList
@ -95,7 +94,7 @@
##
#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" />
<div class="show-details">
<div class="show-add">Loading... ($curLoadingShow.show_name)</div>
@ -116,6 +115,7 @@
#set $cur_total = 0
#set $download_stat_tip = ''
#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 re.search(r'(?i)(?:new|returning)\s*series', $curShow.status)
#set $display_status = 'Continuing'
@ -178,18 +178,19 @@
#end if
#end if
##
<div id="show$curShow.indexerid" class="show" data-name="$curShow.name" data-date="$data_date" data-network="$curShow.network">
<div class="show-image">
<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="show$curShow.indexerid" class="show-card" data-name="$curShow.name" data-date="$data_date" data-network="$curShow.network">
<div class="show-card-top">
<div class="show-image">
<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">
$curShow.name
</div>
<div class="show-title">
$display_name
</div>
<div class="show-date">
<div class="show-date">
#if $cur_airs_next
#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>
@ -202,34 +203,40 @@
#set $output_html = $display_status
#end if
#end if
$output_html
$output_html
#end if
</div><!-- /show-date -->
</div><!-- /show-date -->
<table width="100%" border="0">
<tr>
<td class="show-table">
<span class="show-dlstats" title="$download_stat_tip">$download_stat</span>
</td>
<table width="100%" border="0">
<tr>
<td class="show-table">
<span class="show-dlstats" title="$download_stat_tip">$download_stat</span>
</td>
<td class="show-table">
#if 'simple' != $layout
<td class="show-table show-network">
#if 'simple' == $layout
$curShow.network
#else
#set $img_text = ($curShow.network, 'No Network')[None is $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
$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
</td>
</td>
<td class="show-table">
<td class="show-table">
#if $curShow.quality in $qualityPresets
<span class="show-quality">$qualityPresetStrings[$curShow.quality]</span>
<span class="show-quality">$qualityPresetStrings[$curShow.quality]</span>
#else
<span class="show-quality">Custom</span>
<span class="show-quality">Custom</span>
#end if
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="progressbar$curShow.indexerid"></div>
<span class="sort-data" data-progress="$progressbar_percent"></span>
</div><!-- /show$curShow.indexerid -->
@ -294,6 +301,7 @@
#set $cur_downloaded = 0
#set $cur_total = 0
#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
#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">
<img src="$sbRoot/showPoster/?show=$curShow.indexerid&amp;which=poster_thumb" class="$layout" alt="$curShow.indexerid"/>
</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>
</td>
#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" />
</a>
</div>
<span class="sort-data">$curShow.name</span>
<span class="sort-data">$display_name/span>
</td>
#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
#if 'simple' != $layout
#set $img_text = ($curShow.network, 'No Network')[None is $curShow.network]
<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)#" />
<span class="sort-data">$curShow.network</span>
#end if
</td>
#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')

View file

@ -12,13 +12,11 @@
<script type="text/javascript" charset="utf-8">
<!--
var config = { sortArticle: #echo ['!1','!0'][$sickbeard.SORT_ARTICLE]# }
\$.sgSid = '$kwargs.get('sid', '')';
\$.sgHashDir = '$kwargs.get('hash_dir', '')';
\$(document).ready(function(){
\$( '#tabs' ).tabs({
collapsible: true,
selected: #if $sickbeard.ROOT_DIRS then '-1' else '0'#
});
\$('#tabs').tabs({ collapsible: !0, selected: #echo ('0','-1')[any($sickbeard.ROOT_DIRS)]# });
});
//-->
</script>
@ -37,7 +35,7 @@
<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 style="margin-top:15px">

View file

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

View file

@ -10,6 +10,7 @@
#set global $header='Browse Shows'
#set global $sbPath='..'
#set global $topmenu='home'
#set global $page_body_attr = 'browse-list'
##
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
@ -38,12 +39,13 @@
var \$container = [\$('#container')];
jQuery.each(\$container, function (j) {
this.isotope({
itemSelector: '.browse-show',
itemSelector: '.show-card',
sortBy: 'original-order',
layoutMode: 'masonry',
masonry: {
columnWidth: 12,
isFitWidth: true
columnWidth: 188,
isFitWidth: !0,
gutter: 12
},
getSortData: {
premiered: '[data-premiered] parseInt',
@ -196,8 +198,8 @@
#set $overview = $this_show['overview']
#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="browse-container">
<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="show-card-inner">
<div class="browse-image">
<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#
@ -214,7 +216,7 @@
</div>
<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 class="clearfix">
@ -243,7 +245,7 @@
</div>
#end if
#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">
#if $kwargs and $kwargs.get('error_msg', None):
$kwargs['error_msg']

View file

@ -1,3 +1,4 @@
#import re
#import sickbeard
#from sickbeard.helpers import anon_url
@ -47,7 +48,8 @@
</td>
<td>
<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']]#
</label>
</td>

View file

@ -23,24 +23,16 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
<!--
\$.tablesorter.addParser({
id: 'showNames',
is: function(s) {
return false;
},
is: function(s) { return !1; },
format: function(s) {
#if not $sickbeard.SORT_ARTICLE
return (s || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
#else
return (s || '');
#end if
return (s || '')#if not $sickbeard.SORT_ARTICLE#.replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1')#end if#;
},
type: 'text'
});
\$.tablesorter.addParser({
id: 'quality',
is: function(s) {
return false;
},
is: function(s) { return !1; },
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);
},
@ -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>
</tr>
</tfoot>
<tbody>
#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]))
<tr>
<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
<td align="center"><span class="quality $qualityPresetStrings[$curShow.quality]">$qualityPresetStrings[$curShow.quality]</span></td>
#else
@ -208,9 +201,9 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
</tr>
#end for
</tbody>
</table>
</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')

View file

@ -52,11 +52,21 @@ $(document).ready(function(){
url,
function(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({
sortList: [[1,0]],
widgets: ['zebra'],
headers: {
0: { sorter: false }
0: { sorter: false },
1: { sorter: 'showNames' }
}
});
});

View file

@ -1,16 +1,13 @@
$.tablesorter.addParser({
id: 'loadingNames',
is: function (s) {
return false;
return !1;
},
format: function (s) {
if (s.indexOf('Loading...') === 0) {
return s.replace('Loading...', '000');
} else if (config.sortArticle) {
return (s || '');
} else {
return (s || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
}
var name = (s || '');
if (0 == name.indexOf('Loading...'))
return name.replace('Loading...', '000');
return config.sortArticle ? name : name.replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
},
type: 'text'
});
@ -18,7 +15,7 @@ $.tablesorter.addParser({
$.tablesorter.addParser({
id: 'quality',
is: function (s) {
return false;
return !1;
},
format: function (s) {
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);
});
$('img#network').on('error', function () {
$(this).parent().text($(this).attr('alt'));
$(this).remove();
});
if (config.isPoster) {
$('.container').each(function (i, obj) {
$(obj).isotope({
itemSelector: '.show',
itemSelector: '.show-card',
sortBy: config.posterSortby,
sortAscending: config.posterSortdir,
layoutMode: 'masonry',
masonry: {
columnWidth: 12,
isFitWidth: true
columnWidth: 188,
isFitWidth: !0,
gutter: 12
},
getSortData: {
name: function (itemElem) {
var name = $(itemElem).attr('data-name');
if (config.sortArticle) {
return (name || '');
} else {
return (name || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
}
var name = $(itemElem).attr('data-name') || '';
return config.sortArticle ? name : name.replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
},
date: function (itemElem) {
var date = $(itemElem).attr('data-date');
@ -101,6 +90,14 @@ $(document).ready(function () {
$.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 {
$('.tablesorter').each(function (i, obj) {
$(obj).has('tbody tr').tablesorter({
@ -130,12 +127,19 @@ $(document).ready(function () {
4: {sorter: 'eps'}
},
widgetOptions: {
filter_columnFilters: false,
filter_reset: '.resetshows'
filter_columnFilters: !1
},
sortStable: true
sortStable: !0
});
$.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();
}
});
});

View file

@ -2351,7 +2351,7 @@ class NewHomeAddShows(Home):
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
posts them to addNewShow
@ -2485,11 +2485,15 @@ class NewHomeAddShows(Home):
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):
if helpers.findCertainShow(sickbeard.showList, config.to_int(indexer_id, '')):
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):
@ -2581,8 +2585,12 @@ class NewHomeAddShows(Home):
kwargs.update(dict(footnote=footnote))
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):
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)
def trakt_anticipated(self, *args, **kwargs):
@ -2752,7 +2760,7 @@ class NewHomeAddShows(Home):
def addTraktShow(self, indexer_id, showName):
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)
def browse_shows(self, browse_type, browse_title, shows, *args, **kwargs):
@ -2790,7 +2798,7 @@ class NewHomeAddShows(Home):
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
"""
@ -2808,7 +2816,7 @@ class NewHomeAddShows(Home):
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
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
@ -2827,7 +2835,7 @@ class NewHomeAddShows(Home):
rest_of_show_dirs = other_shows[1:]
# 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 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.ERROR)
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_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
if ek.ek(os.path.isdir, show_dir) and not fullShowPath:
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
if sickbeard.ADD_SHOWS_WO_DIR:
@ -2932,11 +2940,11 @@ class NewHomeAddShows(Home):
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
along to the newShow page.
along to the new_show page.
"""
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', '')]))
# 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))
# 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:
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
num_added = 0
@ -2993,8 +3001,8 @@ class NewHomeAddShows(Home):
if not dirs_only:
return self.redirect('/home/')
# for the remaining shows we need to prompt for each one, so forward this on to the newShow page
return self.newShow(dirs_only[0], dirs_only[1:])
# for the remaining shows we need to prompt for each one, so forward this on to the new_show page
return self.new_show(dirs_only[0], dirs_only[1:])
class Manage(MainHandler):