mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Merge pull request #207 from JackDandy/feature/OverhaulEditShow
Feature/overhaul edit show
This commit is contained in:
commit
619aca1965
16 changed files with 593 additions and 420 deletions
|
@ -61,6 +61,13 @@
|
||||||
* Add setting "Update shows during hour" to General Config/Misc
|
* Add setting "Update shows during hour" to General Config/Misc
|
||||||
* Add max-width to prevent ui glitch on Pull request and Branch Version selectors on config/General/Advanced and change <input> tags to html5
|
* Add max-width to prevent ui glitch on Pull request and Branch Version selectors on config/General/Advanced and change <input> tags to html5
|
||||||
* Change order of some settings on Config/General/Interface/Web Interface and tweak texts
|
* Change order of some settings on Config/General/Interface/Web Interface and tweak texts
|
||||||
|
* Change overhaul UI of editShow and anime release groups, refactor and simplify code
|
||||||
|
* Change list order of option on the right of the displayShow page to be mostly inline with the order of options on editShow
|
||||||
|
* Change legend wording and text colour on the displayShow page
|
||||||
|
* Add output message if no release group results are available
|
||||||
|
* Add cleansing of text used in the processes to a add a show
|
||||||
|
* Add sorting of AniDB available group results
|
||||||
|
* Add error handling and related UI feedback to reflect result of AniDB communications
|
||||||
|
|
||||||
[develop changelog]
|
[develop changelog]
|
||||||
* Change uT params from unicode to str.format as magnet URLs worked but sending files in POST bodies failed
|
* Change uT params from unicode to str.format as magnet URLs worked but sending files in POST bodies failed
|
||||||
|
@ -68,6 +75,7 @@
|
||||||
* Fix validation of release groups when no group is detected
|
* Fix validation of release groups when no group is detected
|
||||||
* Fix missed html tag replacing in notifications
|
* Fix missed html tag replacing in notifications
|
||||||
* Add history module to pnotify lib
|
* Add history module to pnotify lib
|
||||||
|
* Change the remove show notification to properly send the title and message parameters to PNotify
|
||||||
|
|
||||||
|
|
||||||
### 0.6.4 (2015-02-10 20:20:00 UTC)
|
### 0.6.4 (2015-02-10 20:20:00 UTC)
|
||||||
|
|
|
@ -950,7 +950,8 @@ div.formpaginate {
|
||||||
}
|
}
|
||||||
|
|
||||||
#addShowForm #blackwhitelist,
|
#addShowForm #blackwhitelist,
|
||||||
#addShowForm #blackwhitelist h4 {
|
#addShowForm #blackwhitelist h4,
|
||||||
|
#addShowForm #blackwhitelist p {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1372,6 +1373,17 @@ td.col-search {
|
||||||
padding-right: 6px;
|
padding-right: 6px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.options-on-right {
|
||||||
|
width:180px;
|
||||||
|
float: right;
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.options-on-right .showLegendRight {
|
||||||
|
padding-right: 6px;
|
||||||
|
padding-bottom: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-scene {
|
.input-scene {
|
||||||
|
@ -1381,10 +1393,11 @@ td.col-search {
|
||||||
}
|
}
|
||||||
|
|
||||||
#editShow {
|
#editShow {
|
||||||
width: 700px;
|
/*width: 700px;
|
||||||
padding-top: 10px;
|
padding-top: 10px;*/
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
padding: 15px 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
/* =======================================================================
|
/* =======================================================================
|
||||||
|
@ -1867,6 +1880,15 @@ select .selected {
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#editShow .field-pair #SceneException h4,
|
||||||
|
#editShow .field-pair #customQuality h4 {
|
||||||
|
font-size: 13px !important;
|
||||||
|
margin-bottom: 10px
|
||||||
|
}
|
||||||
|
#editShow .field-pair #customQuality h4 {
|
||||||
|
margin-bottom:1px;
|
||||||
|
}
|
||||||
|
|
||||||
.testNotification {
|
.testNotification {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
@ -2293,44 +2315,59 @@ option.flag {
|
||||||
}
|
}
|
||||||
|
|
||||||
#Anime div.component-group-desc p {
|
#Anime div.component-group-desc p {
|
||||||
margin-bottom: 0.4em;
|
margin: 0.4em 0;
|
||||||
margin-left: 0;
|
|
||||||
margin-right: 0;
|
|
||||||
margin-top: 0.4em;
|
|
||||||
width: 95%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.blackwhitelist h4 {
|
||||||
|
margin-top:0
|
||||||
|
}
|
||||||
div.blackwhitelist{
|
div.blackwhitelist{
|
||||||
float:left;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.blackwhitelist input {
|
|
||||||
margin: 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.blackwhitelist.pool select{
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.blackwhitelist.pool {
|
|
||||||
margin:5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.blackwhitelist.white select, div.blackwhitelist.black select {
|
|
||||||
width: 180px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.blackwhitelist.white, div.blackwhitelist.black {
|
|
||||||
margin:5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.blackwhitelist span {
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.blackwhitelist.anidb, div.blackwhitelist.manual {
|
div.blackwhitelist.white input,
|
||||||
|
div.blackwhitelist.black input,
|
||||||
|
div.blackwhitelist.pool input {
|
||||||
|
margin: 5px 0 !important;
|
||||||
|
}
|
||||||
|
div.blackwhitelist select {
|
||||||
|
margin : 0 !important
|
||||||
|
}
|
||||||
|
|
||||||
|
div.blackwhitelist .inuse {
|
||||||
|
margin-right: 5px;
|
||||||
|
width: 243px;
|
||||||
|
float: left
|
||||||
|
}
|
||||||
|
|
||||||
|
div.blackwhitelist.white,
|
||||||
|
div.blackwhitelist.black {
|
||||||
|
width: 243px;
|
||||||
|
}
|
||||||
|
div.blackwhitelist.white select,
|
||||||
|
div.blackwhitelist.black select{
|
||||||
|
margin:0;
|
||||||
|
width: 215px;
|
||||||
|
/* clear:both*/
|
||||||
|
}
|
||||||
|
div.blackwhitelist.white select,
|
||||||
|
div.blackwhitelist.black select {
|
||||||
|
height: 110px;
|
||||||
|
}
|
||||||
|
div.blackwhitelist.pool,
|
||||||
|
div.blackwhitelist.pool select{
|
||||||
|
width: 330px;
|
||||||
|
height: 265px;
|
||||||
|
float:right
|
||||||
|
}
|
||||||
|
|
||||||
|
div.blackwhitelist span {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#blackwhitelist,
|
||||||
|
div.blackwhitelist.manual {
|
||||||
margin: 7px 0;
|
margin: 7px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,20 +110,20 @@
|
||||||
|
|
||||||
<div class="field-pair">
|
<div class="field-pair">
|
||||||
<label>
|
<label>
|
||||||
<span class="component-title">Ignore words</span>
|
<span class="component-title">Ignore result with any word</span>
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
<input type="text" name="ignore_words" value="$sickbeard.IGNORE_WORDS" class="form-control input-sm input350" />
|
<input type="text" name="ignore_words" value="$sickbeard.IGNORE_WORDS" class="form-control input-sm input350" />
|
||||||
<div class="clear-left">results containing any word in the comma separated word list will be ignored</div>
|
<div class="clear-left">ignore search result <em class="grey-text">if its title contains any</em> of these comma seperated words</div>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field-pair">
|
<div class="field-pair">
|
||||||
<label>
|
<label>
|
||||||
<span class="component-title">Require words</span>
|
<span class="component-title">Require at least one word</span>
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
<input type="text" name="require_words" value="$sickbeard.REQUIRE_WORDS" class="form-control input-sm input350" />
|
<input type="text" name="require_words" value="$sickbeard.REQUIRE_WORDS" class="form-control input-sm input350" />
|
||||||
<div class="clear-left">results not containing all words in the comma separated word list will be ignored</div>
|
<div class="clear-left">ignore search result <em class="grey-text">unless its title contains one</em> of these comma seperated words</div>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -196,70 +196,69 @@
|
||||||
<div id="summary">
|
<div id="summary">
|
||||||
<table class="summaryTable pull-left">
|
<table class="summaryTable pull-left">
|
||||||
#if $show.network and $show.airs:
|
#if $show.network and $show.airs:
|
||||||
<tr><td class="showLegend">Originally Airs: </td><td>$show.airs #if not $network_timezones.test_timeformat($show.airs) then " <font color='#FF0000'><b>(invalid Timeformat)</b></font> " else ""# on $show.network</td></tr>
|
<tr><td class="showLegend grey-text">Originally airs</td><td>$show.airs #if not $network_timezones.test_timeformat($show.airs) then ' <font color="#FF0000"><b>(invalid Timeformat)</b></font> ' else ''# on $show.network</td></tr>
|
||||||
#else if $show.network:
|
#else if $show.network:
|
||||||
<tr><td class="showLegend">Originally Airs: </td><td>$show.network</td></tr>
|
<tr><td class="showLegend grey-text">Originally airs</td><td>$show.network</td></tr>
|
||||||
#else if $show.airs:
|
#else if $show.airs:
|
||||||
<tr><td class="showLegend">Originally Airs: </td><td>>$show.airs #if not $network_timezones.test_timeformat($show.airs) then " <font color='#FF0000'><b>(invalid Timeformat)</b></font> " else ""#</td></tr>
|
<tr><td class="showLegend grey-text">Originally airs</td><td>$show.airs #if not $network_timezones.test_timeformat($show.airs) then ' <font color="#FF0000"><b>(invalid Timeformat)</b></font> ' else ''#</td></tr>
|
||||||
#end if
|
#end if
|
||||||
<tr><td class="showLegend">Status: </td><td>$show.status</td></tr>
|
<tr><td class="showLegend grey-text">Status</td><td>$show.status</td></tr>
|
||||||
#if $showLoc[1]:
|
#if $showLoc[1]:
|
||||||
<tr><td class="showLegend">Location: </td><td>$showLoc[0]</td></tr>
|
<tr><td class="showLegend grey-text">Location</td><td>$showLoc[0]</td></tr>
|
||||||
#else:
|
#else:
|
||||||
<tr><td class="showLegend"><span style="color: red;">Location: </span></td><td><span style="color: red;">$showLoc[0]</span> (dir is missing)</td></tr>
|
<tr><td class="showLegend grey-text"><span style="color: red;">Location</span></td><td><span style="color: red;">$showLoc[0]</span> (dir is missing)</td></tr>
|
||||||
#end if
|
#end if
|
||||||
#set $anyQualities, $bestQualities = $Quality.splitQuality(int($show.quality))
|
#set $anyQualities, $bestQualities = $Quality.splitQuality(int($show.quality))
|
||||||
<tr><td class="showLegend">Quality: </td><td>
|
<tr><td class="showLegend grey-text">Quality</td><td>
|
||||||
#if $show.quality in $qualityPresets:
|
#if $show.quality in $qualityPresets:
|
||||||
<span class="quality $qualityPresetStrings[$show.quality]">$qualityPresetStrings[$show.quality]</span>
|
<span class="quality $qualityPresetStrings[$show.quality]">$qualityPresetStrings[$show.quality]</span>
|
||||||
#else:
|
#else:
|
||||||
#if $anyQualities:
|
#if $anyQualities:
|
||||||
<i>Initial:</i> <%=", ".join([Quality.qualityStrings[x] for x in sorted(anyQualities)])%> #if $bestQualities then " </br> " else ""#
|
<i class="grey-text">Initial ...</i> <%= ', '.join([Quality.qualityStrings[x] for x in sorted(anyQualities)])%> #if $bestQualities then " </br> " else ""#
|
||||||
#end if
|
#end if
|
||||||
#if $bestQualities:
|
#if $bestQualities:
|
||||||
<i>Replace with:</i> <%=", ".join([Quality.qualityStrings[x] for x in sorted(bestQualities)])%>
|
<i class="grey-text">Replace with ...</i> <%= ', '.join([Quality.qualityStrings[x] for x in sorted(bestQualities)])%>
|
||||||
#end if
|
#end if
|
||||||
#end if
|
#end if
|
||||||
<tr><td class="showLegend">Scene Name:</td><td>#if $show.exceptions then $exceptions_string else $show.name#</td></tr>
|
<tr><td class="showLegend grey-text">Scene name</td><td>#if $show.exceptions then $exceptions_string else $show.name#</td></tr>
|
||||||
|
|
||||||
#if $show.rls_require_words:
|
|
||||||
<tr><td class="showLegend">Required Words: </td><td>#echo $show.rls_require_words#</td></tr>
|
|
||||||
#end if
|
|
||||||
#if $show.rls_ignore_words:
|
#if $show.rls_ignore_words:
|
||||||
<tr><td class="showLegend">Ignored Words: </td><td>#echo $show.rls_ignore_words#</td></tr>
|
<tr><td class="showLegend grey-text">Ignore with any of</td><td>#echo $show.rls_ignore_words#</td></tr>
|
||||||
|
#end if
|
||||||
|
#if $show.rls_require_words:
|
||||||
|
<tr><td class="showLegend grey-text">Require one of</td><td>#echo $show.rls_require_words#</td></tr>
|
||||||
#end if
|
#end if
|
||||||
|
|
||||||
#if $bwl and $bwl.whitelist:
|
#if $bwl and $bwl.whitelist:
|
||||||
<tr><td class="showLegend">Wanted Group#if len($bwl.whitelist)>1 then "s" else ""#:</td>
|
<tr><td class="showLegend grey-text">Whitelist group#if len($bwl.whitelist)>1 then 's' else ''#</td>
|
||||||
<td>#echo ', '.join($bwl.whitelist)#</td>
|
<td>#echo ', '.join($bwl.whitelist)#</td>
|
||||||
</tr>
|
</tr>
|
||||||
#end if
|
#end if
|
||||||
#if $bwl and $bwl.blacklist:
|
#if $bwl and $bwl.blacklist:
|
||||||
<tr><td class="showLegend">Unwanted Group#if len($bwl.blacklist)>1 then "s" else ""#:</td>
|
<tr><td class="showLegend grey-text">Blacklist group#if len($bwl.blacklist)>1 then 's' else ''#</td>
|
||||||
<td>#echo ', '.join($bwl.blacklist)#</td>
|
<td>#echo ', '.join($bwl.blacklist)#</td>
|
||||||
</tr>
|
</tr>
|
||||||
#end if
|
#end if
|
||||||
|
|
||||||
|
<tr><td class="showLegend grey-text">Size</td><td>$sickbeard.helpers.human(sickbeard.helpers.get_size($showLoc[0]))</td></tr>
|
||||||
<tr><td class="showLegend">Size:</td><td>$sickbeard.helpers.human(sickbeard.helpers.get_size($showLoc[0]))</td></tr>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table style="width:180px; float: right; vertical-align: middle; height: 100%;">
|
<table class="options-on-right">
|
||||||
<tr><td class="showLegend">Info Language:</td><td><img src="$sbRoot/images/flags/${show.lang}.png" width="16" height="11" alt="$show.lang" title="$show.lang" /></td></tr>
|
<tr><td class="showLegendRight grey-text">Paused</td><td><img src="$sbRoot/images/#if int($show.paused) == 1 then 'yes16.png" title="Yes" alt="Yes' else 'no16.png" title="No" alt="No'#" width="16" height="16" /></td></tr>
|
||||||
#if $sickbeard.USE_SUBTITLES
|
|
||||||
<tr><td class="showLegend">Subtitles: </td><td><img src="$sbRoot/images/#if int($show.subtitles) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
|
|
||||||
#end if
|
|
||||||
<tr><td class="showLegend">Flat Folders: </td><td><img src="$sbRoot/images/#if $show.flatten_folders == 1 or $sickbeard.NAMING_FORCE_FOLDERS then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
|
|
||||||
<tr><td class="showLegend">Paused: </td><td><img src="$sbRoot/images/#if int($show.paused) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
|
|
||||||
<tr><td class="showLegend">Air-by-Date: </td><td><img src="$sbRoot/images/#if int($show.air_by_date) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
|
|
||||||
<tr><td class="showLegend">Sports: </td><td><img src="$sbRoot/images/#if int($show.is_sports) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
|
|
||||||
<tr><td class="showLegend">Anime: </td><td><img src="$sbRoot/images/#if int($show.is_anime) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
|
|
||||||
<tr><td class="showLegend">DVD Order: </td><td><img src="$sbRoot/images/#if int($show.dvdorder) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
|
|
||||||
<tr><td class="showLegend">Scene Numbering: </td><td><img src="$sbRoot/images/#if int($show.scene) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
|
|
||||||
#if $anyQualities + $bestQualities
|
#if $anyQualities + $bestQualities
|
||||||
<tr><td class="showLegend">Archive First Match: </td><td><img src="$sbRoot/images/#if int($show.archive_firstmatch) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
|
<tr><td class="showLegendRight grey-text">Archive on first match</td><td><img src="$sbRoot/images/#if int($show.archive_firstmatch) == 1 then 'yes16.png" title="Yes" alt="Yes' else 'no16.png" title="No" alt="No'#" width="16" height="16" /></td></tr>
|
||||||
#end if
|
#end if
|
||||||
|
<tr><td class="showLegendRight grey-text">Flat folder structure</td><td><img src="$sbRoot/images/#if $show.flatten_folders == 1 or $sickbeard.NAMING_FORCE_FOLDERS then 'yes16.png" title="Yes" alt="Yes' else 'no16.png" title="No" alt="No'#" width="16" height="16" /></td></tr>
|
||||||
|
<tr><td class="showLegendRight grey-text">Air by date naming</td><td><img src="$sbRoot/images/#if int($show.air_by_date) == 1 then 'yes16.png" title="Yes" alt="Yes' else 'no16.png" title="No" alt="No'#" width="16" height="16" /></td></tr>
|
||||||
|
<tr><td class="showLegendRight grey-text">Use DVD order</td><td><img src="$sbRoot/images/#if int($show.dvdorder) == 1 then 'yes16.png" title="Yes" alt="Yes' else 'no16.png" title="No" alt="No'#" width="16" height="16" /></td></tr>
|
||||||
|
<tr><td class="showLegendRight grey-text">Scene numbering</td><td><img src="$sbRoot/images/#if int($show.scene) == 1 then 'yes16.png" title="Yes" alt="Yes' else 'no16.png" title="No" alt="No'#" width="16" height="16" /></td></tr>
|
||||||
|
#if $sickbeard.USE_SUBTITLES
|
||||||
|
<tr><td class="showLegendRight grey-text">Subtitles</td><td><img src="$sbRoot/images/#if int($show.subtitles) == 1 then 'yes16.png" title="Yes" alt="Yes' else 'no16.png" title="No" alt="No'#" width="16" height="16" /></td></tr>
|
||||||
|
#end if
|
||||||
|
<tr><td class="showLegendRight grey-text">Show is sports</td><td><img src="$sbRoot/images/#if int($show.is_sports) == 1 then 'yes16.png" title="Yes" alt="Yes' else 'no16.png" title="No" alt="No'#" width="16" height="16" /></td></tr>
|
||||||
|
<tr><td class="showLegendRight grey-text">Show is anime</td><td><img src="$sbRoot/images/#if int($show.is_anime) == 1 then 'yes16.png" title="Yes" alt="Yes' else 'no16.png" title="No" alt="No'#" width="16" height="16" /></td></tr>
|
||||||
|
<tr><td class="showLegendRight grey-text">Info language</td><td><img src="$sbRoot/images/flags/${show.lang}.png" width="16" height="11" alt="$show.lang" title="$show.lang" /></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -3,221 +3,303 @@
|
||||||
#from sickbeard import common
|
#from sickbeard import common
|
||||||
#from sickbeard import exceptions
|
#from sickbeard import exceptions
|
||||||
#from sickbeard import scene_exceptions
|
#from sickbeard import scene_exceptions
|
||||||
#from sickbeard.blackandwhitelist import *
|
#import sickbeard.blackandwhitelist
|
||||||
#set global $title="Edit " + $show.name
|
|
||||||
#set global $header="Edit " + $show.name
|
|
||||||
|
|
||||||
#set global $sbPath=".."
|
#set global $title = 'Edit ' + $show.name
|
||||||
|
#set global $header = 'Edit ' + $show.name
|
||||||
|
|
||||||
#set global $topmenu="home"
|
#set global $sbPath = '..'
|
||||||
|
#set html_checked = ' checked="checked"'
|
||||||
|
#set html_disabled = ' disabled="disabled"'
|
||||||
|
|
||||||
|
#set global $topmenu = 'home'
|
||||||
#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')
|
||||||
|
|
||||||
#if $varExists('header')
|
|
||||||
<h1 class="header">$header</h1>
|
|
||||||
#else
|
|
||||||
<h1 class="title">$title</h1>
|
|
||||||
#end if
|
|
||||||
|
|
||||||
<div id="editShow">
|
|
||||||
<script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script>
|
<script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
<!--
|
<!--
|
||||||
\$(document).ready(function(){
|
\$(document).ready(function(){
|
||||||
|
|
||||||
\$.getJSON('$sbRoot/home/addShows/getIndexerLanguages', {}, function(data) {
|
\$.getJSON('$sbRoot/home/addShows/getIndexerLanguages', {}, function(data) {
|
||||||
var resultStr = '';
|
var resultStr = '';
|
||||||
|
|
||||||
if (data.results.length == 0) {
|
if (data.results.length == 0) {
|
||||||
flag = ' class="flag" style="background-image:url($sbRoot/images/flags/${show.lang}.png)"';
|
flag = ' class="flag" style="background-image:url($sbRoot/images/flags/${show.lang}.png)"';
|
||||||
resultStr = '<option value="$show.lang" selected="selected" + flag>$show.lang</option>';
|
resultStr = '<option value="$show.lang" selected="selected" + flag>$show.lang</option>';
|
||||||
} else {
|
} else {
|
||||||
var current_lang_added = false;
|
var current_lang_added = false;
|
||||||
\$.each(data.results, function(index, obj) {
|
\$.each(data.results, function(index, obj) {
|
||||||
|
|
||||||
if (obj == "$show.lang") {
|
if (obj == '$show.lang') {
|
||||||
selected = ' selected="selected"';
|
selected = ' selected="selected"';
|
||||||
current_lang_added = true;
|
current_lang_added = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
selected = '';
|
selected = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
flag = ' class="flag" style="background-image:url($sbRoot/images/flags/' + obj + '.png);"';
|
flag = ' class="flag" style="background-image:url($sbRoot/images/flags/' + obj + '.png);"';
|
||||||
resultStr += '<option value="' + obj + '"' + selected + flag + '>' + obj + '</option>';
|
resultStr += '<option value="' + obj + '"' + selected + flag + '>' + obj + '</option>';
|
||||||
});
|
});
|
||||||
if (!current_lang_added)
|
|
||||||
resultStr += '<option value="$show.lang" selected="selected">$show.lang</option>';
|
|
||||||
|
|
||||||
}
|
if (!current_lang_added)
|
||||||
\$('#indexerLangSelect').html(resultStr)
|
resultStr += '<option value="$show.lang" selected="selected">$show.lang</option>';
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
}
|
||||||
|
\$('#indexerLangSelectEdit').html(resultStr)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<br>
|
#if $varExists('header')
|
||||||
|
<h1 class="header">$header</h1>
|
||||||
|
#else
|
||||||
|
<h1 class="title">$title</h1>
|
||||||
|
#end if
|
||||||
|
|
||||||
<form action="editShow" method="post">
|
<form action="editShow" method="post" id="addShowForm">
|
||||||
<input type="hidden" name="show" value="$show.indexerid" />
|
<input type="hidden" name="show" value="$show.indexerid">
|
||||||
<b>Location:</b> <input type="text" name="location" id="location" value="$show._location" class="form-control form-control-inline input-sm input350" /><br />
|
|
||||||
<br />
|
<div id="editShow" class="stepDiv">
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label for="paused">
|
||||||
|
<span class="component-title">Paused</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="checkbox" name="paused" id="paused"#if 1 == $show.paused then $html_checked else ''#>
|
||||||
|
<p>enable to pause searching providers for show episodes</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
#set $qualities = $common.Quality.splitQuality(int($show.quality))
|
#set $qualities = $common.Quality.splitQuality(int($show.quality))
|
||||||
#set global $anyQualities = $qualities[0]
|
#set global $anyQualities = $qualities[0]
|
||||||
#set global $bestQualities = $qualities[1]
|
#set global $bestQualities = $qualities[1]
|
||||||
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_qualityChooser.tmpl")
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_qualityChooser.tmpl')
|
||||||
<br />
|
|
||||||
|
|
||||||
#if $anyQualities + $bestQualities
|
#if $anyQualities + $bestQualities
|
||||||
<b>Archive on first match: </b>
|
<div class="field-pair">
|
||||||
<input type="checkbox" name="archive_firstmatch" #if $show.archive_firstmatch == 1 then "checked=\"checked\"" else ""# /><br>
|
<label for="archive_firstmatch">
|
||||||
(check this to have the episode archived after the first best match is found from your archive quality list)
|
<span class="component-title">Archive on first match</span>
|
||||||
<br />
|
<span class="component-desc">
|
||||||
<br />
|
<input type="checkbox" name="archive_firstmatch" id="archive_firstmatch"#if $show.archive_firstmatch == 1 then $html_checked else ''#>
|
||||||
|
<p>enable to have the episode archived after the first best match is found from your archive quality list</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
#end if
|
#end if
|
||||||
|
</div>
|
||||||
|
|
||||||
<b>Scene Exception:</b>
|
<div class="field-pair">
|
||||||
<input type="text" id="SceneName" class="form-control form-control-inline input-sm input200">
|
<label for="SceneName">
|
||||||
<input class="btn btn-inline" type="button" value="Add" id="addSceneName"><br />
|
<span class="component-title input">Scene exception</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="text" id="SceneName" class="form-control form-control-inline input-sm input200">
|
||||||
|
<input class="btn btn-inline" type="button" value="Add" id="addSceneName">
|
||||||
|
<p class="clear-left">add alternative release names found on search providers for <b class="boldest grey-text">$show.name</b></p>
|
||||||
|
</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<div id="SceneException">
|
||||||
|
<h4>Exceptions list (multi-selectable)</h4>
|
||||||
|
<select id="exceptions_list" name="exceptions_list" multiple="multiple" class="input200" style="min-height:90px; float:left" >
|
||||||
|
#for $cur_exception in $show.exceptions:
|
||||||
|
<option value="$cur_exception">$cur_exception</option>
|
||||||
|
#end for
|
||||||
|
</select>
|
||||||
|
<span><p>this list overrides the original name<br />to search, it doesn't append to it</p></span>
|
||||||
|
<div>
|
||||||
|
<input id="removeSceneName" value="Remove" class="btn pull-left" type="button" style="margin-top: 10px;"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<div style="clear:right"> </div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="SceneException" >
|
<div class="field-pair">
|
||||||
|
<label for="rls_ignore_words">
|
||||||
|
<span class="component-title input">Ignore result with any word</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="text" name="rls_ignore_words" id="rls_ignore_words" value="$show.rls_ignore_words" class="form-control form-control-inline input-sm input350">
|
||||||
|
<p>e.g. [word1,word2, ... ,word_n]</p>
|
||||||
|
<span><p>ignore search result <em class="grey-text">if its title contains any</em> of these comma seperated words</p></span>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="field-pair">
|
||||||
<p>This will <b>affect the episode show search</b> on nzb and torrent provider.<br />
|
<label for="rls_require_words">
|
||||||
This list overrides the original name, it doesn't append to it.<br />
|
<span class="component-title input">Require at least one word</span>
|
||||||
</p>
|
<span class="component-desc">
|
||||||
</div>
|
<input type="text" name="rls_require_words" id="rls_require_words" value="$show.rls_require_words" class="form-control form-control-inline input-sm input350">
|
||||||
|
<p>e.g. [word1,word2, ... ,word_n]</p>
|
||||||
<div class="pull-left" style="text-align:center;">
|
<span><p>ignore search result <em class="grey-text">unless its title contains one</em> of these comma seperated words</p></span>
|
||||||
<h4>Exceptions List</h4>
|
</span>
|
||||||
<select id="exceptions_list" name="exceptions_list" multiple="multiple" style="min-width:10em;" >
|
</label>
|
||||||
#for $cur_exception in $show.exceptions:
|
</div>
|
||||||
<option value="$cur_exception">$cur_exception</option>
|
|
||||||
#end for
|
|
||||||
</select>
|
|
||||||
<div>
|
|
||||||
<input id="removeSceneName" value="Remove" class="btn pull-left" type="button" style="margin-top: 10px;"/>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="clearfix"></div>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<b>Info Language:</b> <select name="indexerLang" id="indexerLangSelect" class="form-control form-control-inline input-sm"></select><br />
|
<div class="field-pair">
|
||||||
Note: This will only affect the language of the retrieved metadata file contents and episode filenames.<br />
|
<label for="location">
|
||||||
This <b>DOES NOT</b> allow SickGear to download non-english TV episodes!<br />
|
<span class="component-title input">Location for files</span>
|
||||||
<br />
|
<span class="component-desc">
|
||||||
|
<input type="text" name="location" id="location" value="$show._location" class="form-control form-control-inline input-sm input350">
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<b>Flatten files (no folders):</b> <input type="checkbox" name="flatten_folders" #if $show.flatten_folders == 1 and not $sickbeard.NAMING_FORCE_FOLDERS then "checked=\"checked\"" else ""# #if $sickbeard.NAMING_FORCE_FOLDERS then "disabled=\"disabled\"" else ""#/><br /><br />
|
<div class="field-pair">
|
||||||
<b>Paused:</b> <input type="checkbox" name="paused" #if $show.paused == 1 then "checked=\"checked\"" else ""# /><br /><br />
|
<label for="flatten_folders">
|
||||||
<b>Subtitles:</b> <input type="checkbox" name="subtitles"#if $show.subtitles == 1 and $sickbeard.USE_SUBTITLES then " checked=\"checked\"" else ""##if not $sickbeard.USE_SUBTITLES then " disabled=\"disabled\"" else ""#/><br /><br />
|
<span class="component-title">Flat folder structure</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="checkbox" name="flatten_folders" id="flatten_folders"#if 1 == $show.flatten_folders and not $sickbeard.NAMING_FORCE_FOLDERS then $html_checked else ''##if $sickbeard.NAMING_FORCE_FOLDERS then $html_disabled else ''#>
|
||||||
|
<p>enable to prevent creating the folders normally used to group seasons</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<b>Scene Numbering: </b>
|
<div class="field-pair">
|
||||||
<input type="checkbox" name="scene" #if $show.scene == 1 then "checked=\"checked\"" else ""# /><br/>
|
<label for="air_by_date">
|
||||||
(check this if you wish to search by scene numbering, uncheck to search by indexer numbering)
|
<span class="component-title">Air by date episode names</span>
|
||||||
<br/><br/>
|
<span class="component-desc">
|
||||||
<b>Air by date: </b>
|
<input type="checkbox" name="air_by_date" id="air_by_date"#if 1 == $show.air_by_date then $html_checked else ''#>
|
||||||
<input type="checkbox" name="air_by_date" #if $show.air_by_date == 1 then "checked=\"checked\"" else ""# /><br />
|
<p>enable if episode releases are named ... <em class="grey-text">Show.03.02.2010</em> instead of <em class="grey-text">Show.S02E03</em></p>
|
||||||
(check this if the show is released as Show.03.02.2010 rather than Show.S02E03)
|
</span>
|
||||||
<br /><br />
|
</label>
|
||||||
<b>Sports: </b>
|
</div>
|
||||||
<input type="checkbox" name="sports" #if $show.sports == 1 then "checked=\"checked\"" else ""# /><br />
|
|
||||||
(check this if the show is a sporting or MMA event)
|
|
||||||
<br /><br />
|
|
||||||
<b>Anime: </b>
|
|
||||||
<input type="checkbox" name="anime" #if $show.is_anime then "CHECKED" else ""#><br />
|
|
||||||
(check this if the show is released as Show.265 rather than Show.S02E03, this show is an anime)
|
|
||||||
<br /><br />
|
|
||||||
<b>DVD Order: </b>
|
|
||||||
<input type="checkbox" name="dvdorder" #if $show.dvdorder == 1 then "checked=\"checked\"" else ""# /><br/>
|
|
||||||
(check this if you wish to use the DVD order instead of the Airing order)
|
|
||||||
<br/><br/>
|
|
||||||
|
|
||||||
<b>Ignored Words:</b> <input type="text" name="rls_ignore_words" id="rls_ignore_words" value="$show.rls_ignore_words" class="form-control form-control-inline input-sm input350" /><br />
|
<div class="field-pair">
|
||||||
Results with any of these words in the title will be filtered out <br />
|
<label for="dvdorder">
|
||||||
Separate words with a comma, e.g. "word1,word2,word3"
|
<span class="component-title">Use DVD order</span>
|
||||||
<br /><br />
|
<span class="component-desc">
|
||||||
|
<input type="checkbox" name="dvdorder" id="dvdorder"#if 1 == $show.dvdorder then $html_checked else ''#>
|
||||||
|
<p>for episode titles, numbering etc. instead of the order the show aired on the network</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<b>Required Words:</b> <input type="text" name="rls_require_words" id="rls_require_words" value="$show.rls_require_words" class="form-control form-control-inline input-sm input350" /><br />
|
<div class="field-pair">
|
||||||
Results without one of these words in the title will be filtered out <br />
|
<label for="scene">
|
||||||
Separate words with a comma, e.g. "word1,word2,word3"
|
<span class="component-title">Scene numbering</span>
|
||||||
<br /><br />
|
<span class="component-desc">
|
||||||
|
<input type="checkbox" name="scene" id="scene"#if $show.scene == 1 then $html_checked else ''#>
|
||||||
|
<p>search for episodes that are numbered by scene groups instead of by the TV network</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair" style="margin-bottom:10px">
|
||||||
|
<label for="indexerLangSelectEdit">
|
||||||
|
<span class="component-title input">Info language</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<select name="indexerLang" id="indexerLangSelectEdit" class="form-control form-control-inline input-sm"></select>
|
||||||
|
<span>attempt to fetch show data and episode filenames in this language</span>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label for="subtitles">
|
||||||
|
<span class="component-title">Subtitles</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="checkbox" name="subtitles" id="subtitles"#if 1 == $show.subtitles and $sickbeard.USE_SUBTITLES then $html_checked else ''##if not $sickbeard.USE_SUBTITLES then $html_disabled else ''#>
|
||||||
|
<p#if not $sickbeard.USE_SUBTITLES then ' class="grey-text"><del' else ''#>attempt to download episode subtitles for this show#if not $sickbeard.USE_SUBTITLES then '</del> ... (<span class="red-text">note: first <a href="%s/config/subtitles/">enable the subtitle system here</a></span>)' % $sbRoot else ''#</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label for="sports">
|
||||||
|
<span class="component-title">Show is sports</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="checkbox" name="sports" id="sports"#if 1 == $show.sports then $html_checked else ''#>
|
||||||
|
<p>enable to treat this show as a sporting or MMA event</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label for="anime">
|
||||||
|
<span class="component-title">Show is anime</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="checkbox" name="anime" id="anime"#if $show.is_anime then $html_checked else ''#>
|
||||||
|
<p>enable if this show is anime and episode releases are named ... <em class="grey-text">Show.265</em> instead of <em class="grey-text">Show.S02E03</em></p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
#if $show.is_anime:
|
#if $show.is_anime:
|
||||||
#from sickbeard.blackandwhitelist import *
|
#import sickbeard.blackandwhitelist
|
||||||
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_blackwhitelist.tmpl")
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_blackwhitelist.tmpl')
|
||||||
<script type="text/javascript" src="$sbRoot/js/blackwhite.js?$sbPID"></script>
|
<script type="text/javascript" src="$sbRoot/js/blackwhite.js?$sbPID"></script>
|
||||||
#end if
|
#end if
|
||||||
|
<input type="submit" id="submit" value="Submit" class="btn btn-primary" />
|
||||||
<input type="submit" id="submit" value="Submit" class="btn btn-primary" />
|
</form>
|
||||||
</form>
|
|
||||||
|
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
<!--
|
<!--
|
||||||
var all_exceptions = new Array;
|
var all_exceptions = new Array;
|
||||||
|
|
||||||
jQuery('#location').fileBrowser({ title: 'Select Show Location' });
|
jQuery('#location').fileBrowser({ title: 'Select Show Location' });
|
||||||
|
|
||||||
\$('#submit').click(function(){
|
\$('#submit').click(function(){
|
||||||
all_exceptions = []
|
all_exceptions = []
|
||||||
|
|
||||||
\$("#exceptions_list option").each ( function() {
|
\$('#exceptions_list option').each ( function() {
|
||||||
all_exceptions.push( \$(this).val() );
|
all_exceptions.push( \$(this).val() );
|
||||||
});
|
});
|
||||||
|
|
||||||
\$("#exceptions_list").val(all_exceptions);
|
\$('#exceptions_list').val(all_exceptions);
|
||||||
#if $show.is_anime:
|
#if $show.is_anime:
|
||||||
generate_bwlist()
|
generate_bwlist()
|
||||||
#end if
|
#end if
|
||||||
});
|
});
|
||||||
|
|
||||||
\$('#addSceneName').click(function() {
|
\$('#addSceneName').click(function() {
|
||||||
var scene_ex = \$('#SceneName').val()
|
var scene_ex = \$('#SceneName').val()
|
||||||
var option = \$("<option>")
|
var option = \$('<option>')
|
||||||
all_exceptions = []
|
all_exceptions = []
|
||||||
|
|
||||||
\$("#exceptions_list option").each ( function() {
|
\$('#exceptions_list option').each ( function() {
|
||||||
all_exceptions.push( \$(this).val() )
|
all_exceptions.push( \$(this).val() )
|
||||||
});
|
});
|
||||||
|
|
||||||
\$('#SceneName').val('')
|
|
||||||
|
|
||||||
if (jQuery.inArray(scene_ex, all_exceptions) > -1 || (scene_ex == ''))
|
|
||||||
return
|
|
||||||
|
|
||||||
\$("#SceneException").show()
|
\$('#SceneName').val('')
|
||||||
|
|
||||||
option.attr("value",scene_ex)
|
if (jQuery.inArray(scene_ex, all_exceptions) > -1 || (scene_ex == ''))
|
||||||
option.html(scene_ex)
|
return
|
||||||
return option.appendTo('#exceptions_list');
|
|
||||||
});
|
\$('#SceneException').show()
|
||||||
|
|
||||||
\$('#removeSceneName').click(function() {
|
option.attr('value',scene_ex)
|
||||||
|
option.html(scene_ex)
|
||||||
|
return option.appendTo('#exceptions_list');
|
||||||
|
});
|
||||||
|
|
||||||
|
\$('#removeSceneName').click(function() {
|
||||||
\$('#exceptions_list option:selected').remove();
|
\$('#exceptions_list option:selected').remove();
|
||||||
|
|
||||||
\$(this).toggle_SceneException()
|
\$(this).toggle_SceneException()
|
||||||
});
|
});
|
||||||
|
|
||||||
$.fn.toggle_SceneException = function() {
|
$.fn.toggle_SceneException = function() {
|
||||||
all_exceptions = []
|
all_exceptions = []
|
||||||
|
|
||||||
\$("#exceptions_list option").each ( function() {
|
\$('#exceptions_list option').each ( function() {
|
||||||
all_exceptions.push( \$(this).val() );
|
all_exceptions.push( \$(this).val() );
|
||||||
});
|
});
|
||||||
|
|
||||||
if (all_exceptions == '')
|
if ('' == all_exceptions)
|
||||||
\$("#SceneException").hide();
|
\$('#SceneException').hide();
|
||||||
else
|
else
|
||||||
\$("#SceneException").show();
|
\$('#SceneException').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
\$(this).toggle_SceneException();
|
\$(this).toggle_SceneException();
|
||||||
|
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
#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')
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
<input class="btn btn-inline" type="button" id="searchName" value="Search" />
|
<input class="btn btn-inline" type="button" id="searchName" value="Search" />
|
||||||
</span>
|
</span>
|
||||||
<br />
|
<br />
|
||||||
<p style="margin:5px 0 15px"><b>*</b> SickGear supports english episodes. The language choice is used for fetching metadata and episode filenames</p>
|
<p style="margin:5px 0 15px"><b>*</b> SickGear supports english episodes. The language choice is used for fetching show data and episode filenames</p>
|
||||||
|
|
||||||
<div id="searchResults" style="height: 100%"></div>
|
<div id="searchResults" style="height: 100%"></div>
|
||||||
#end if
|
#end if
|
||||||
|
|
|
@ -20,6 +20,33 @@
|
||||||
<p class="grey-text">Tip: The following options are <span style="font-weight:800">edit</span>able later in the detail view of the show</p>
|
<p class="grey-text">Tip: The following options are <span style="font-weight:800">edit</span>able later in the detail view of the show</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
#set $qualities = $Quality.splitQuality($sickbeard.QUALITY_DEFAULT)
|
||||||
|
#set global $anyQualities = $qualities[0]
|
||||||
|
#set global $bestQualities = $qualities[1]
|
||||||
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_qualityChooser.tmpl')
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair alt">
|
||||||
|
<label for="flatten_folders">
|
||||||
|
<span class="component-title">Flat folder structure</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input class="cb" type="checkbox" name="flatten_folders" id="flatten_folders" #if $sickbeard.FLATTEN_FOLDERS_DEFAULT then "checked=\"checked\"" else ""# />
|
||||||
|
<p>do not create sub folders</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair alt">
|
||||||
|
<label for="scene">
|
||||||
|
<span class="component-title">Scene numbering</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="checkbox" name="scene" id="scene" #if $sickbeard.SCENE_DEFAULT then "checked=\"checked\"" else ""# />
|
||||||
|
<p>search for episodes that are numbered by scene groups instead of by the TV network</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
#if $sickbeard.USE_SUBTITLES:
|
#if $sickbeard.USE_SUBTITLES:
|
||||||
<div class="field-pair alt">
|
<div class="field-pair alt">
|
||||||
<label for="subtitles">
|
<label for="subtitles">
|
||||||
|
@ -32,42 +59,17 @@
|
||||||
</div>
|
</div>
|
||||||
#end if
|
#end if
|
||||||
|
|
||||||
<div class="field-pair alt">
|
|
||||||
<label for="flatten_folders">
|
|
||||||
<span class="component-title">Flatten folders</span>
|
|
||||||
<span class="component-desc">
|
|
||||||
<input class="cb" type="checkbox" name="flatten_folders" id="flatten_folders" #if $sickbeard.FLATTEN_FOLDERS_DEFAULT then "checked=\"checked\"" else ""# />
|
|
||||||
<p>do not create sub folders</p>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field-pair alt">
|
<div class="field-pair alt">
|
||||||
<label for="anime">
|
<label for="anime">
|
||||||
<span class="component-title">Anime</span>
|
<span class="component-title">Show is anime</span>
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
<input type="checkbox" name="anime" id="anime" #if $sickbeard.ANIME_DEFAULT then "checked=\"checked\"" else ""# />
|
<input type="checkbox" name="anime" id="anime" #if $sickbeard.ANIME_DEFAULT then "checked=\"checked\"" else ""# />
|
||||||
<p>use anime processing for this show</p>
|
<p>enable if this show is anime and episode releases are named ... <em class="grey-text">Show.265</em> instead of <em class="grey-text">Show.S02E03</em></p>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field-pair alt">
|
<div class="field-pair alt" style="margin-top:20px">
|
||||||
<label for="scene">
|
|
||||||
<span class="component-title">Scene numbering</span>
|
|
||||||
<span class="component-desc">
|
|
||||||
<input type="checkbox" name="scene" id="scene" #if $sickbeard.SCENE_DEFAULT then "checked=\"checked\"" else ""# />
|
|
||||||
<p>enable if episodes are numbered by scene releases and not by the TV network</p>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
#set $qualities = $Quality.splitQuality($sickbeard.QUALITY_DEFAULT)
|
|
||||||
#set global $anyQualities = $qualities[0]
|
|
||||||
#set global $bestQualities = $qualities[1]
|
|
||||||
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_qualityChooser.tmpl")
|
|
||||||
|
|
||||||
<div class="field-pair alt" style="margin-top:30px">
|
|
||||||
<label for="saveDefaultsButton">
|
<label for="saveDefaultsButton">
|
||||||
<span class="component-title">Save options as defaults</span>
|
<span class="component-title">Save options as defaults</span>
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
|
@ -77,5 +79,5 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
#from sickbeard.blackandwhitelist import *
|
#import sickbeard.blackandwhitelist
|
||||||
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_blackwhitelist.tmpl")
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_blackwhitelist.tmpl')
|
|
@ -1,58 +1,68 @@
|
||||||
<div id="blackwhitelist">
|
<div class="field-pair alt" id="blackwhitelist">
|
||||||
<input type="hidden" name="whitelist" id="whitelist"/>
|
<input type="hidden" name="whitelist" id="whitelist">
|
||||||
<input type="hidden" name="blacklist" id="blacklist"/>
|
<input type="hidden" name="blacklist" id="blacklist">
|
||||||
|
|
||||||
<b>Fansub Groups:</b>
|
<span class="component-title">Fansub groups</span>
|
||||||
<div >
|
<span class="component-desc">
|
||||||
<p>Select your preferred fansub groups from the <b>Available Groups</b> and add them to the <b>Whitelist</b>. Add groups to the <b>Blacklist</b> to ignore them.</p>
|
|
||||||
<p>The <b>Whitelist</b> is checked <i>before</i> the <b>Blacklist</b>.</p>
|
<div class="bwlWrapper">
|
||||||
<p>Groups are shown as <b>Name</b> | <b>Rating</b> | <b>Number of subbed episodes</b>.</p>
|
<div class="blackwhitelist all">
|
||||||
<p>You may also add any fansub group not listed to either list manually.</p>
|
|
||||||
</div>
|
<div class="blackwhitelist anidb">
|
||||||
<div class="bwlWrapper" id="Anime">
|
<div class="inuse" style="padding:0">
|
||||||
<div class="blackwhitelist all">
|
<div class="blackwhitelist white" style="margin-bottom:10px">
|
||||||
<div class="blackwhitelist anidb">
|
<h4 style="margin:0 41px 6px 0">Whitelist<br /><span class="grey-text">Only snatch releases by group(s)</span></h4>
|
||||||
<div class="blackwhitelist white">
|
<div style="width:243px; height:110px">
|
||||||
<span><h4>Whitelist</h4></span>
|
<select style="width:202px" class="pull-left" id="white" multiple="multiple" size="12">
|
||||||
<select id="white" multiple="multiple" size="12">
|
#for $keyword in sorted($whitelist):
|
||||||
#for $keyword in $whitelist:
|
<option value="$keyword">$keyword</option>
|
||||||
<option value="$keyword">$keyword</option>
|
#end for
|
||||||
#end for
|
</select>
|
||||||
</select>
|
<div style="position:relative; width:36px; height:64px; margin: -32px 0 0; top: 50%;" class="pull-right">
|
||||||
<br/>
|
<input style="margin:0 0 10px !important" class="btn" id="add-white" value="<<" type="button">
|
||||||
<input class="btn" id="removeW" value="Remove" type="button"/>
|
<input style="margin:0 !important" class="btn clear:right" id="remove-white" value=">>" type="button">
|
||||||
</div>
|
</div>
|
||||||
<div class="blackwhitelist pool">
|
</div>
|
||||||
<span><h4>Available Groups</h4></span>
|
</div>
|
||||||
<select id="pool" multiple="multiple" size="12">
|
|
||||||
#for $group in $groups
|
<div class="blackwhitelist black" style="position:relative; bottom: -1px">
|
||||||
#if $group not in $whitelist and $group['name'] not in $blacklist:
|
<h4 style="margin:0 41px 6px 0">Blacklist<br /><span class="grey-text">Ignore releases by group(s)</span></h4>
|
||||||
<option value="$group['name']">$group['name'] | $group['rating'] | $group['range']</option>
|
<div style="width:243px; height:110px">
|
||||||
#end if
|
<select style="width:202px" class="pull-left" id="black" multiple="multiple" size="12">
|
||||||
#end for
|
#for $keyword in sorted($blacklist):
|
||||||
</select>
|
<option value="$keyword">$keyword</option>
|
||||||
<br/>
|
#end for
|
||||||
<input class="btn" id="addW" value="Add to Whitelist" type="button"/>
|
</select>
|
||||||
<input class="btn" id="addB" value="Add to Blacklist" type="button"/>
|
<div style="position:relative; width:36px; height:64px; margin: -32px 0 0; top: 50%;" class="pull-right">
|
||||||
</div>
|
<input style="margin:0 0 10px !important" class="btn" id="add-black" value="<<" type="button">
|
||||||
<div class="blackwhitelist black">
|
<input style="margin:0 !important" class="btn clear:right" id="remove-black" value=">>" type="button">
|
||||||
<span><h4>Blacklist</h4></span>
|
</div>
|
||||||
<select id="black" multiple="multiple" size="12">
|
</div>
|
||||||
#for $keyword in $blacklist:
|
</div>
|
||||||
<option value="$keyword">$keyword</option>
|
</div>
|
||||||
#end for
|
<div class="blackwhitelist pool">
|
||||||
</select>
|
<h4 style="margin:0 0 6px 0">Available groups<br /><span class="grey-text">Name (Rating) Number of subbed episodes</span></h4>
|
||||||
<br/>
|
<select id="pool" multiple="multiple" size="12">
|
||||||
<input class="btn" id="removeB" value="Remove" type="button"/>
|
#for $group in sorted($groups)
|
||||||
|
#if $group not in $whitelist and $group['name'] not in $blacklist:
|
||||||
|
<option value="$group['name']">$group['name'] ($group['rating']) $group['range']</option>
|
||||||
|
#end if
|
||||||
|
#end for
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="clear:both"> </div>
|
||||||
|
<div class="blackwhitelist manual">
|
||||||
|
<div class="pull-left">
|
||||||
|
<input type="text" id="addToPoolText" class="form-control form-control-inline input-sm input200" style="width:202px">
|
||||||
|
<input class="btn btn-inline" type="button" value="Add to Whitelist" id="new-white">
|
||||||
|
<input style="margin-right:0" class="btn btn-inline" type="button" value="Add to Blacklist" id="new-black">
|
||||||
|
</div>
|
||||||
|
<span class="pull-left">add a custom item to either the whitelist or blacklist</span>
|
||||||
|
<div style="clear:both"> </div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br style="clear:both" />
|
</span>
|
||||||
<div class="blackwhitelist manual">
|
</div><!-- /blackwhitelist -->
|
||||||
<input type="text" id="addToPoolText" class="form-control form-control-inline input-sm input250" />
|
|
||||||
<input class="btn btn-inline" type="button" value="Add to Whitelist" id="addToWhite">
|
|
||||||
<input class="btn btn-inline" type="button" value="Add to Blacklist" id="addToBlack">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br style="clear:both" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
<div style="float:left; padding-right: 40px">
|
<div style="float:left; padding-right: 40px">
|
||||||
<h4>Initial</h4>
|
<h4 class="jumbo">Initial</h4>
|
||||||
#set $anyQualityList = filter(lambda x: x > $Quality.NONE, $Quality.qualityStrings)
|
#set $anyQualityList = filter(lambda x: x > $Quality.NONE, $Quality.qualityStrings)
|
||||||
<select id="anyQualities" name="anyQualities" multiple="multiple" size="$len($anyQualityList)" class="form-control form-control-inline input-sm">
|
<select id="anyQualities" name="anyQualities" multiple="multiple" size="$len($anyQualityList)" class="form-control form-control-inline input-sm">
|
||||||
#for $curQuality in sorted($anyQualityList):
|
#for $curQuality in sorted($anyQualityList):
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="float:left">
|
<div style="float:left">
|
||||||
<h4>Archive</h4>
|
<h4 class="jumbo">Archive</h4>
|
||||||
#set $bestQualityList = filter(lambda x: x > $Quality.SDTV and x < $Quality.UNKNOWN, $Quality.qualityStrings)
|
#set $bestQualityList = filter(lambda x: x > $Quality.SDTV and x < $Quality.UNKNOWN, $Quality.qualityStrings)
|
||||||
<select id="bestQualities" name="bestQualities" multiple="multiple" size="$len($bestQualityList)" class="form-control form-control-inline input-sm">
|
<select id="bestQualities" name="bestQualities" multiple="multiple" size="$len($bestQualityList)" class="form-control form-control-inline input-sm">
|
||||||
#for $curQuality in sorted($bestQualityList):
|
#for $curQuality in sorted($bestQualityList):
|
||||||
|
|
|
@ -1,54 +1,30 @@
|
||||||
function generate_bwlist() {
|
function generate_bwlist() {
|
||||||
var realvalues = [];
|
$.each(['white', 'black'], function(i, list) {
|
||||||
|
var group_list = [];
|
||||||
|
|
||||||
$('#white option').each(function(i, selected) {
|
$('#' + list + ' option').each(function(i, option) {
|
||||||
realvalues[i] = $(selected).val();
|
group_list.push($(option).val());
|
||||||
});
|
});
|
||||||
$("#whitelist").val(realvalues.join(","));
|
|
||||||
|
|
||||||
realvalues = [];
|
$('#' + list + 'list').val(group_list.join(','));
|
||||||
$('#black option').each(function(i, selected) {
|
});
|
||||||
realvalues[i] = $(selected).val();
|
}
|
||||||
});
|
|
||||||
$("#blacklist").val(realvalues.join(","));
|
|
||||||
};
|
|
||||||
|
|
||||||
$('#removeW').click(function() {
|
$('#add-white, #add-black').click(function() {
|
||||||
!$('#white option:selected').remove().appendTo('#pool');
|
!$('#pool option:selected').remove().appendTo('#' + $(this).attr('id').replace(/add[-]/i, ''));
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#addW').click(function() {
|
$('#remove-white, #remove-black').click(function() {
|
||||||
!$('#pool option:selected').remove().appendTo('#white');
|
!$('#' + $(this).attr('id').replace(/remove[-]/i, '') + ' option:selected').remove().appendTo('#pool');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#addB').click(function() {
|
$('#new-white, #new-black').click(function() {
|
||||||
!$('#pool option:selected').remove().appendTo('#black');
|
var group = $('#addToPoolText').attr('value');
|
||||||
|
if ('' != group) {
|
||||||
|
var option = $('<option>');
|
||||||
|
option.attr('value', group);
|
||||||
|
option.html(group);
|
||||||
|
option.appendTo('#' + $(this).attr('id').replace(/new[-]/i, ''));
|
||||||
|
$('#addToPoolText').attr('value', '');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#removeP').click(function() {
|
|
||||||
!$('#pool option:selected').remove();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#removeB').click(function() {
|
|
||||||
!$('#black option:selected').remove().appendTo('#pool');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#addToWhite').click(function() {
|
|
||||||
var group = $('#addToPoolText').attr("value");
|
|
||||||
if(group == "") { return; }
|
|
||||||
$('#addToPoolText').attr("value", "");
|
|
||||||
var option = $("<option>");
|
|
||||||
option.attr("value",group);
|
|
||||||
option.html(group);
|
|
||||||
option.appendTo('#white');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#addToBlack').click(function() {
|
|
||||||
var group = $('#addToPoolText').attr("value");
|
|
||||||
if(group == "") { return; }
|
|
||||||
$('#addToPoolText').attr("value", "");
|
|
||||||
var option = $("<option>");
|
|
||||||
option.attr("value",group);
|
|
||||||
option.html(group);
|
|
||||||
option.appendTo('#black');
|
|
||||||
});
|
|
|
@ -1,6 +1,6 @@
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
function populateSelect() {
|
function populateLangSelect() {
|
||||||
if (!$('#nameToSearch').length)
|
if (!$('#nameToSearch').length)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -30,6 +30,16 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cleanseText(text, toDisplay) {
|
||||||
|
return (!0 == toDisplay
|
||||||
|
? text
|
||||||
|
.replace(/["]/g, '"')
|
||||||
|
: text
|
||||||
|
.replace(/Pokémon/, 'Pokemon')
|
||||||
|
.replace(/(?:["]|")/g, '')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
var searchRequestXhr = null;
|
var searchRequestXhr = null;
|
||||||
|
|
||||||
function searchIndexers() {
|
function searchIndexers() {
|
||||||
|
@ -42,15 +52,17 @@ $(document).ready(function () {
|
||||||
searchRequestXhr.abort();
|
searchRequestXhr.abort();
|
||||||
|
|
||||||
var elTvDatabase = $('#providedIndexer'),
|
var elTvDatabase = $('#providedIndexer'),
|
||||||
elIndexerLang = $('#indexerLangSelect'),
|
elIndexerLang = $('#indexerLangSelect');
|
||||||
searchingFor = elNameToSearch.val() + ' on ' + elTvDatabase.find('option:selected').text() + ' in ' + elIndexerLang.val();
|
|
||||||
|
|
||||||
$('#searchResults').empty().html('<img id="searchingAnim" src="' + sbRoot + '/images/loading32' + themeSpinner + '.gif" height="32" width="32" /> searching ' + searchingFor + '...');
|
$('#searchResults').empty().html('<img id="searchingAnim" src="' + sbRoot + '/images/loading32' + themeSpinner + '.gif" height="32" width="32" />'
|
||||||
|
+ ' searching <span class="boldest">' + cleanseText(elNameToSearch.val(), !0) + '</span>'
|
||||||
|
+ ' on ' + elTvDatabase.find('option:selected').text() + ' in ' + elIndexerLang.val()
|
||||||
|
+ '...');
|
||||||
|
|
||||||
searchRequestXhr = $.ajax({
|
searchRequestXhr = $.ajax({
|
||||||
url: sbRoot + '/home/addShows/searchIndexersForShowName',
|
url: sbRoot + '/home/addShows/searchIndexersForShowName',
|
||||||
data: {
|
data: {
|
||||||
'search_term': elNameToSearch.val(),
|
'search_term': cleanseText(elNameToSearch.val(), !1),
|
||||||
'lang': elIndexerLang.val(),
|
'lang': elIndexerLang.val(),
|
||||||
'indexer': elTvDatabase.val()
|
'indexer': elTvDatabase.val()
|
||||||
},
|
},
|
||||||
|
@ -70,7 +82,8 @@ $(document).ready(function () {
|
||||||
rowType = (0 == row % 2 ? '' : ' class="alt"');
|
rowType = (0 == row % 2 ? '' : ' class="alt"');
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
var whichSeries = obj.join('|'),
|
var whichSeries = cleanseText(obj.join('|'), !0),
|
||||||
|
display_show_name = cleanseText(obj[4], !0),
|
||||||
showstartdate = '';
|
showstartdate = '';
|
||||||
|
|
||||||
if (null !== obj[5]) {
|
if (null !== obj[5]) {
|
||||||
|
@ -84,17 +97,17 @@ $(document).ready(function () {
|
||||||
resultStr += '<div' + rowType + '>'
|
resultStr += '<div' + rowType + '>'
|
||||||
+ '<input id="whichSeries" type="radio"'
|
+ '<input id="whichSeries" type="radio"'
|
||||||
+ ' class="stepone-result-radio"'
|
+ ' class="stepone-result-radio"'
|
||||||
+ ' title="Add show <span style=\'color: rgb(66, 139, 202)\'>' + obj[4] + '</span>"'
|
+ ' title="Add show <span style=\'color: rgb(66, 139, 202)\'>' + display_show_name + '</span>"'
|
||||||
+ ' name="whichSeries"'
|
+ ' name="whichSeries"'
|
||||||
+ ' value="' + whichSeries + '"'
|
+ ' value="' + whichSeries + '"'
|
||||||
+ checked
|
+ checked
|
||||||
+ ' />'
|
+ ' />'
|
||||||
+ '<a'
|
+ '<a'
|
||||||
+ ' class="stepone-result-title"'
|
+ ' class="stepone-result-title"'
|
||||||
+ ' title="View detail for <span style=\'color: rgb(66, 139, 202)\'>' + obj[4] + '</span>"'
|
+ ' title="View detail for <span style=\'color: rgb(66, 139, 202)\'>' + display_show_name + '</span>"'
|
||||||
+ ' href="' + anonURL + obj[2] + obj[3] + ((data.langid && '' != data.langid) ? '&lid=' + data.langid : '') + '"'
|
+ ' href="' + anonURL + obj[2] + obj[3] + ((data.langid && '' != data.langid) ? '&lid=' + data.langid : '') + '"'
|
||||||
+ ' onclick="window.open(this.href, \'_blank\'); return false;"'
|
+ ' onclick="window.open(this.href, \'_blank\'); return false;"'
|
||||||
+ '>' + obj[4] + '</a>'
|
+ '>' + display_show_name + '</a>'
|
||||||
+ showstartdate
|
+ showstartdate
|
||||||
+ (null == obj[0] ? ''
|
+ (null == obj[0] ? ''
|
||||||
: ' <span class="stepone-result-db grey-text">' + '[' + obj[0] + ']' + '</span>')
|
: ' <span class="stepone-result-db grey-text">' + '[' + obj[0] + ']' + '</span>')
|
||||||
|
@ -131,7 +144,7 @@ $(document).ready(function () {
|
||||||
alert('You must choose a show to continue');
|
alert('You must choose a show to continue');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
generate_bwlist()
|
generate_bwlist();
|
||||||
$('#addShowForm').submit();
|
$('#addShowForm').submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -155,7 +168,7 @@ $(document).ready(function () {
|
||||||
formid: 'addShowForm',
|
formid: 'addShowForm',
|
||||||
revealfx: ['slide', 500],
|
revealfx: ['slide', 500],
|
||||||
oninit: function () {
|
oninit: function () {
|
||||||
populateSelect();
|
populateLangSelect();
|
||||||
updateSampleText();
|
updateSampleText();
|
||||||
if ($('input:hidden[name="whichSeries"]').length && $('#fullShowPath').length) {
|
if ($('input:hidden[name="whichSeries"]').length && $('#fullShowPath').length) {
|
||||||
goToStep(3);
|
goToStep(3);
|
||||||
|
@ -193,8 +206,8 @@ $(document).ready(function () {
|
||||||
} else {
|
} else {
|
||||||
show_name = '';
|
show_name = '';
|
||||||
}
|
}
|
||||||
update_bwlist(show_name);
|
update_bwlist(show_name);
|
||||||
var sample_text = '<p>Adding show <span class="show-name">' + show_name + '</span>'
|
var sample_text = '<p>Adding show <span class="show-name">' + cleanseText(show_name, !0) + '</span>'
|
||||||
+ ('' == show_name ? 'into<br />' : '<br />into')
|
+ ('' == show_name ? 'into<br />' : '<br />into')
|
||||||
+ ' <span class="show-dest">';
|
+ ' <span class="show-dest">';
|
||||||
|
|
||||||
|
@ -225,7 +238,7 @@ $(document).ready(function () {
|
||||||
|
|
||||||
// if we have a show name then sanitize and use it for the dir name
|
// if we have a show name then sanitize and use it for the dir name
|
||||||
if (show_name.length) {
|
if (show_name.length) {
|
||||||
$.get(sbRoot + '/home/addShows/sanitizeFileName', {name: show_name}, function (data) {
|
$.get(sbRoot + '/home/addShows/sanitizeFileName', {name: cleanseText(show_name, !1)}, function (data) {
|
||||||
$('#displayText').html(sample_text.replace('||', data));
|
$('#displayText').html(sample_text.replace('||', data));
|
||||||
});
|
});
|
||||||
// if not then it's unknown
|
// if not then it's unknown
|
||||||
|
@ -281,29 +294,54 @@ $(document).ready(function () {
|
||||||
myform.loadsection(2);
|
myform.loadsection(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function add_option_to_pool (text) {
|
||||||
|
var groupvalue = '', groupview = text,
|
||||||
|
option = $('<option>'),
|
||||||
|
match = /^(.*?)#<3SG#(.*)$/m.exec(text);
|
||||||
|
|
||||||
|
if (match != null) {
|
||||||
|
groupvalue = match[1];
|
||||||
|
groupview = groupvalue + match[2];
|
||||||
|
}
|
||||||
|
option.attr('value', groupvalue);
|
||||||
|
option.html(groupview);
|
||||||
|
option.appendTo('#pool');
|
||||||
|
}
|
||||||
|
|
||||||
function update_bwlist (show_name) {
|
function update_bwlist (show_name) {
|
||||||
|
|
||||||
$('#white').children().remove();
|
$('#black, #white, #pool').children().remove();
|
||||||
$('#black').children().remove();
|
|
||||||
$('#pool').children().remove();
|
|
||||||
|
|
||||||
if ($('#anime').prop('checked')) {
|
if ($('#anime').prop('checked')) {
|
||||||
$('#blackwhitelist').show();
|
$('#blackwhitelist').show();
|
||||||
if (show_name) {
|
if (show_name) {
|
||||||
$.getJSON(sbRoot + '/home/fetch_releasegroups', {'show_name': show_name}, function (data) {
|
$.getJSON(sbRoot + '/home/fetch_releasegroups', {'show_name': cleanseText(show_name, !1)}, function (data) {
|
||||||
if (data['result'] == 'success') {
|
if ('success' == data['result']) {
|
||||||
$.each(data.groups, function(i, group) {
|
var groups = [];
|
||||||
var option = $("<option>");
|
$.each(data.groups, function (i, group) {
|
||||||
option.attr("value", group.name);
|
if ('' != group.name) {
|
||||||
option.html(group.name + ' | ' + group.rating + ' | ' + group.range);
|
groups.push(group.name + '#<3SG#' + ' (' + group.rating + ') ' + group.range)
|
||||||
option.appendTo('#pool');
|
}
|
||||||
});
|
});
|
||||||
}
|
if (0 < groups.length) {
|
||||||
});
|
groups.sort();
|
||||||
|
$.each(groups, function (i, text) {
|
||||||
|
add_option_to_pool(text);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
add_option_to_pool('No groups returned from AniDB');
|
||||||
|
}
|
||||||
|
} else if ('fail' == data['result']) {
|
||||||
|
if ('connect' == data['resp']) {
|
||||||
|
add_option_to_pool('Fail:AniDB connect. Restart sg else check debug log');
|
||||||
|
} else if ('init' == data['resp']) {
|
||||||
|
add_option_to_pool('Did not initialise AniDB. Check debug log if reqd.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$('#blackwhitelist').hide();
|
$('#blackwhitelist').hide();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
import sickbeard
|
import sickbeard
|
||||||
from sickbeard import db, logger, helpers
|
from sickbeard import db, logger, helpers
|
||||||
|
import urllib
|
||||||
|
|
||||||
class BlackAndWhiteList(object):
|
class BlackAndWhiteList(object):
|
||||||
blacklist = []
|
blacklist = []
|
||||||
|
@ -64,7 +64,7 @@ class BlackAndWhiteList(object):
|
||||||
|
|
||||||
groups = []
|
groups = []
|
||||||
for result in sqlResults:
|
for result in sqlResults:
|
||||||
groups.append(result["keyword"])
|
groups.append(result['keyword'])
|
||||||
|
|
||||||
logger.log('BWL: ' + str(self.show_id) + ' loaded keywords from ' + table + ': ' + str(groups), logger.DEBUG)
|
logger.log('BWL: ' + str(self.show_id) + ' loaded keywords from ' + table + ': ' + str(groups), logger.DEBUG)
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ class BlackAndWhiteList(object):
|
||||||
logger.log('Failed to detect release group, invalid result', logger.DEBUG)
|
logger.log('Failed to detect release group, invalid result', logger.DEBUG)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if result.release_group.lower() in [x.lower() for x in self.whitelist]:
|
if result.release_group.lower() in [x.lower() for x in self.whitelist] or not self.whitelist:
|
||||||
white_result = True
|
white_result = True
|
||||||
else:
|
else:
|
||||||
white_result = False
|
white_result = False
|
||||||
|
@ -95,21 +95,23 @@ class BlackAndWhiteList(object):
|
||||||
|
|
||||||
|
|
||||||
class BlackWhitelistNoShowIDException(Exception):
|
class BlackWhitelistNoShowIDException(Exception):
|
||||||
'No show_id was given'
|
"""
|
||||||
|
No show_id was given
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
def short_group_names(groups):
|
def short_group_names(groups):
|
||||||
groups = groups.split(",")
|
group_list = groups.split(',')
|
||||||
shortGroupList = []
|
short_group_list = []
|
||||||
if helpers.set_up_anidb_connection():
|
if helpers.set_up_anidb_connection():
|
||||||
for groupName in groups:
|
for group_name in group_list:
|
||||||
group = sickbeard.ADBA_CONNECTION.group(gname=groupName)
|
adba_result = sickbeard.ADBA_CONNECTION.group(gname=group_name) # no such group is returned for utf8 groups like interrobang
|
||||||
for line in group.datalines:
|
for line in adba_result.datalines:
|
||||||
if line["shortname"]:
|
if line['shortname']:
|
||||||
shortGroupList.append(line["shortname"])
|
short_group_list.append(line['shortname'])
|
||||||
else:
|
else:
|
||||||
if not groupName in shortGroupList:
|
if group_name not in short_group_list:
|
||||||
shortGroupList.append(groupName)
|
short_group_list.append(group_name)
|
||||||
else:
|
else:
|
||||||
shortGroupList = groups
|
short_group_list = group_list
|
||||||
return shortGroupList
|
return short_group_list
|
|
@ -1082,22 +1082,29 @@ def validateShow(show, season=None, episode=None):
|
||||||
|
|
||||||
def set_up_anidb_connection():
|
def set_up_anidb_connection():
|
||||||
if not sickbeard.USE_ANIDB:
|
if not sickbeard.USE_ANIDB:
|
||||||
logger.log(u"Usage of anidb disabled. Skiping", logger.DEBUG)
|
logger.log(u'Usage of anidb disabled. Skipping', logger.DEBUG)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not sickbeard.ANIDB_USERNAME and not sickbeard.ANIDB_PASSWORD:
|
if not sickbeard.ANIDB_USERNAME and not sickbeard.ANIDB_PASSWORD:
|
||||||
logger.log(u"anidb username and/or password are not set. Aborting anidb lookup.", logger.DEBUG)
|
logger.log(u'anidb username and/or password are not set. Aborting anidb lookup.', logger.DEBUG)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not sickbeard.ADBA_CONNECTION:
|
if not sickbeard.ADBA_CONNECTION:
|
||||||
anidb_logger = lambda x: logger.log("ANIDB: " + str(x), logger.DEBUG)
|
anidb_logger = lambda x: logger.log('ANIDB: ' + str(x), logger.DEBUG)
|
||||||
sickbeard.ADBA_CONNECTION = adba.Connection(keepAlive=True, log=anidb_logger)
|
sickbeard.ADBA_CONNECTION = adba.Connection(keepAlive=True, log=anidb_logger)
|
||||||
|
|
||||||
if not sickbeard.ADBA_CONNECTION.authed():
|
auth = False
|
||||||
|
try:
|
||||||
|
auth = sickbeard.ADBA_CONNECTION.authed()
|
||||||
|
except Exception, e:
|
||||||
|
logger.log(u'exception msg: ' + str(e))
|
||||||
|
pass
|
||||||
|
|
||||||
|
if not auth:
|
||||||
try:
|
try:
|
||||||
sickbeard.ADBA_CONNECTION.auth(sickbeard.ANIDB_USERNAME, sickbeard.ANIDB_PASSWORD)
|
sickbeard.ADBA_CONNECTION.auth(sickbeard.ANIDB_USERNAME, sickbeard.ANIDB_PASSWORD)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
logger.log(u"exception msg: " + str(e))
|
logger.log(u'exception msg: ' + str(e))
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -32,9 +32,6 @@ from name_parser.parser import NameParser, InvalidNameException, InvalidShowExce
|
||||||
from lib.unidecode import unidecode
|
from lib.unidecode import unidecode
|
||||||
from sickbeard.blackandwhitelist import BlackAndWhiteList
|
from sickbeard.blackandwhitelist import BlackAndWhiteList
|
||||||
|
|
||||||
resultFilters = ["sub(bed|ed|pack|s)", "(dk|fin|heb|kor|nor|nordic|pl|swe)sub(bed|ed|s)?",
|
|
||||||
"(dir|sample|sub|nfo)fix", "sample", "(dvd)?extras",
|
|
||||||
"dub(bed)?"]
|
|
||||||
|
|
||||||
def filterBadReleases(name, parse=True):
|
def filterBadReleases(name, parse=True):
|
||||||
"""
|
"""
|
||||||
|
@ -56,6 +53,10 @@ def filterBadReleases(name, parse=True):
|
||||||
logger.log(u"Unable to parse the filename " + name + " into a valid show", logger.DEBUG)
|
logger.log(u"Unable to parse the filename " + name + " into a valid show", logger.DEBUG)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
resultFilters = ['sub(bed|ed|pack|s)', '(dk|fin|heb|kor|nor|nordic|pl|swe)sub(bed|ed|s)?',
|
||||||
|
'(dir|sample|sub|nfo)fix', 'sample', '(dvd)?extras',
|
||||||
|
'dub(bed)?']
|
||||||
|
|
||||||
# if any of the bad strings are in the name then say no
|
# if any of the bad strings are in the name then say no
|
||||||
if sickbeard.IGNORE_WORDS:
|
if sickbeard.IGNORE_WORDS:
|
||||||
resultFilters.extend(sickbeard.IGNORE_WORDS.split(','))
|
resultFilters.extend(sickbeard.IGNORE_WORDS.split(','))
|
||||||
|
|
|
@ -991,7 +991,9 @@ class TVShow(object):
|
||||||
["DELETE FROM tv_shows WHERE indexer_id = ?", [self.indexerid]],
|
["DELETE FROM tv_shows WHERE indexer_id = ?", [self.indexerid]],
|
||||||
["DELETE FROM imdb_info WHERE indexer_id = ?", [self.indexerid]],
|
["DELETE FROM imdb_info WHERE indexer_id = ?", [self.indexerid]],
|
||||||
["DELETE FROM xem_refresh WHERE indexer_id = ?", [self.indexerid]],
|
["DELETE FROM xem_refresh WHERE indexer_id = ?", [self.indexerid]],
|
||||||
["DELETE FROM scene_numbering WHERE indexer_id = ?", [self.indexerid]]]
|
["DELETE FROM scene_numbering WHERE indexer_id = ?", [self.indexerid]],
|
||||||
|
["DELETE FROM whitelist WHERE show_id = ?", [self.indexerid]],
|
||||||
|
["DELETE FROM blacklist WHERE show_id = ?", [self.indexerid]]]
|
||||||
|
|
||||||
myDB = db.DBConnection()
|
myDB = db.DBConnection()
|
||||||
myDB.mass_action(sql_l)
|
myDB.mass_action(sql_l)
|
||||||
|
|
|
@ -3817,8 +3817,13 @@ class Home(MainHandler):
|
||||||
|
|
||||||
t.groups = []
|
t.groups = []
|
||||||
if helpers.set_up_anidb_connection():
|
if helpers.set_up_anidb_connection():
|
||||||
anime = adba.Anime(sickbeard.ADBA_CONNECTION, name=showObj.name)
|
try:
|
||||||
t.groups = anime.get_groups()
|
anime = adba.Anime(sickbeard.ADBA_CONNECTION, name=showObj.name)
|
||||||
|
t.groups = anime.get_groups()
|
||||||
|
except Exception, e:
|
||||||
|
t.groups.append(dict([('name', 'Fail:AniDB connect. Restart sg else check debug log'), ('rating', ''), ('range', '')]))
|
||||||
|
else:
|
||||||
|
t.groups.append(dict([('name', 'Did not initialise AniDB. Check debug log if reqd.'), ('rating', ''), ('range', '')]))
|
||||||
|
|
||||||
with showObj.lock:
|
with showObj.lock:
|
||||||
t.show = showObj
|
t.show = showObj
|
||||||
|
@ -3990,10 +3995,9 @@ class Home(MainHandler):
|
||||||
|
|
||||||
showObj.deleteShow(bool(full))
|
showObj.deleteShow(bool(full))
|
||||||
|
|
||||||
ui.notifications.message('<b>%s</b> has been %s %s' %
|
ui.notifications.message('%s with %s' % (('Deleting', 'Trashing')[sickbeard.TRASH_REMOVE_SHOW],
|
||||||
(showObj.name,
|
('media left untouched', 'all related media')[bool(full)]),
|
||||||
('deleted', 'trashed')[sickbeard.TRASH_REMOVE_SHOW],
|
'<b>%s</b>' % showObj.name)
|
||||||
('(media untouched)', '(with all related media)')[bool(full)]))
|
|
||||||
redirect("/home/")
|
redirect("/home/")
|
||||||
|
|
||||||
|
|
||||||
|
@ -4536,11 +4540,16 @@ class Home(MainHandler):
|
||||||
def fetch_releasegroups(show_name):
|
def fetch_releasegroups(show_name):
|
||||||
|
|
||||||
if helpers.set_up_anidb_connection():
|
if helpers.set_up_anidb_connection():
|
||||||
anime = adba.Anime(sickbeard.ADBA_CONNECTION, name=show_name)
|
try:
|
||||||
groups = anime.get_groups()
|
anime = adba.Anime(sickbeard.ADBA_CONNECTION, name=show_name)
|
||||||
|
groups = anime.get_groups()
|
||||||
|
except Exception, e:
|
||||||
|
logger.log(u'exception msg: ' + str(e), logger.DEBUG)
|
||||||
|
return json.dumps({'result': 'fail', 'resp': 'connect'})
|
||||||
|
|
||||||
return json.dumps({'result': 'success', 'groups': groups})
|
return json.dumps({'result': 'success', 'groups': groups})
|
||||||
|
|
||||||
return json.dumps({'result': 'failure'})
|
return json.dumps({'result': 'fail', 'resp': 'init'})
|
||||||
|
|
||||||
|
|
||||||
class UI(MainHandler):
|
class UI(MainHandler):
|
||||||
|
|
Loading…
Reference in a new issue