Merge pull request #227 from JackDandy/feature/AddExplainExtraPPScripts

Add text to explain params passed to extra scripts on Config/Post Proces...
This commit is contained in:
JackDandy 2015-02-23 16:54:32 +00:00
commit bbdec53dcd
3 changed files with 538 additions and 505 deletions

View file

@ -3,6 +3,7 @@
* Add requirements file for pip (port from midgetspy/sick-beard)
* Remove unused libraries fuzzywuzzy and pysrt
* Change webserve code to a logical layout and PEP8
* Add text to explain params passed to extra scripts on Config/Post Processing
[develop changelog]

View file

@ -53,7 +53,7 @@
<div class="red-text"><em class="boldest">must not</em> be the folder where downloading files are created</div>
</span>
<span class="component-desc">
<input type="text" name="tv_download_dir" id="tv_download_dir" value="$sickbeard.TV_DOWNLOAD_DIR" class="form-control input-sm input350" />
<input type="text" name="tv_download_dir" id="tv_download_dir" value="$sickbeard.TV_DOWNLOAD_DIR" class="form-control input-sm input350">
<div class="pull-left">
<p>folder where download clients save <b><em class="boldest">completed</em></b> downloads.&nbsp;
<b>note:</b> only use if not using SABnzbd post processing <em>or</em> if SABnzbd is on a different PC to SickGear</p>
@ -86,7 +86,7 @@
<label for="process_automatically">
<span class="component-title">Scan and post process</span>
<span class="component-desc">
<input type="checkbox" name="process_automatically" id="process_automatically" #if $sickbeard.PROCESS_AUTOMATICALLY == True then $checked else ''# />
<input type="checkbox" name="process_automatically" id="process_automatically" #if $sickbeard.PROCESS_AUTOMATICALLY == True then $checked else ''#>
<p>files in the <em>completed TV downloads</em> folder.&nbsp;
<b>note:</b> do not enable with external post processing scripts like sabToSickbeard for SABnzbd, or NZBMedia for NZBGET</p>
</span>
@ -97,7 +97,7 @@
<label for="autopostprocesser_frequency">
<span class="component-title">Run post process every</span>
<span class="component-desc">
<input type="text" name="autopostprocesser_frequency" id="autopostprocesser_frequency" value="$sickbeard.AUTOPOSTPROCESSER_FREQUENCY" class="form-control input-sm input75" />
<input type="text" name="autopostprocesser_frequency" id="autopostprocesser_frequency" value="$sickbeard.AUTOPOSTPROCESSER_FREQUENCY" class="form-control input-sm input75">
<p>minutes to check for new files to process (e.g. 10)</p>
</span>
</label>
@ -107,8 +107,8 @@
<label for="postpone_if_sync_files">
<span class="component-title">Postpone post processing</span>
<span class="component-desc">
<input type="checkbox" name="postpone_if_sync_files" id="postpone_if_sync_files" #if $sickbeard.POSTPONE_IF_SYNC_FILES == True then $checked else ''# />
<p>if <b>!sync</b> files are present in the <em>completed TV downloads</em> folder</p>
<input type="checkbox" name="postpone_if_sync_files" id="postpone_if_sync_files" #if $sickbeard.POSTPONE_IF_SYNC_FILES == True then $checked else ''#>
<p>if <b class="grey-text">!sync</b> files are present in the <em>completed TV downloads</em> folder</p>
</span>
</label>
</div>
@ -117,17 +117,46 @@
<label for="extra_scripts">
<span class="component-title">Extra scripts</span>
<span class="component-desc">
<input type="text" name="extra_scripts" value="<%='|'.join(sickbeard.EXTRA_SCRIPTS)%>" class="form-control input-sm input350" />
<input type="text" name="extra_scripts" id="extra_scripts" value="<%='|'.join(sickbeard.EXTRA_SCRIPTS)%>" class="form-control input-sm input350">
<img src="$sbRoot/images/legend16.png" width="16" height="16" alt="[Toggle Key]" id="show_extra_params" title="Toggle info for script arguments" class="legend" class="legend" />
<div class="clear-left">
<p>scripts are called after SickGear's built-in post processing.
&nbsp;<b>note:</b> use <b>|</b> to separate additional extra scripts</span>
</p>
<p>scripts are called after built-in post processing.
&nbsp;<b>note:</b> use <b class="grey-text boldest">|</b> to separate additional extra scripts
(e.g. <span class="grey-text">inside_SG_root_folder.sh|/other/path/to/script.py</span>)</p>
<div id="extra_params" style="display: none">
<table class="Key" style="width:auto">
<thead>
<tr>
<th class="text-center">Arg</th>
<th>Description</th>
<th style="width:5%"></th>
<th class="text-center">Arg</th>
<th>Description</th>
</tr>
</thead>
<tfoot>
<tr>
<th colspan="5">These arguments are passed to every script</th>
</tr>
</tfoot>
<tbody>
<tr><td class="text-center"><span class="grey-text">1</span></td><td>final full episode file path</td>
<td>&nbsp;</td><td class="text-center"><span class="grey-text">4</span></td><td>season number</td></tr>
<tr class="even"><td class="text-center"><span class="grey-text">2</span></td><td>original episode file name</td>
<td>&nbsp;</td><td class="text-center"><span class="grey-text">5</span></td><td style="padding-right:1.5em !important">episode number</td></tr>
<tr><td class="text-center"><span class="grey-text">3</span></td><td>show id</td>
<td>&nbsp;</td><td class="text-center"><span class="grey-text">6</span></td><td>episode air date</td></tr>
</tbody>
</table>
</div>
</div>
</span>
</label>
</div>
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
<input type="submit" class="btn config_submitter" value="Save Changes"><br />
</fieldset>
</div>
@ -145,7 +174,7 @@
<label for="unpack">
<span class="component-title">Unpack downloads</span>
<span class="component-desc">
<input id="unpack" type="checkbox" name="unpack" #if $sickbeard.UNPACK == True then $checked else ''# />
<input id="unpack" type="checkbox" name="unpack" #if $sickbeard.UNPACK == True then $checked else ''#>
<p>unrar TV releases in the <em>completed TV downloads</em> folder</p>
</span>
</label>
@ -155,8 +184,8 @@
<label for="skip_removed_files">
<span class="component-title">Skip remove detection</span>
<span class="component-desc">
<input type="checkbox" name="skip_removed_files" id="skip_removed_files" #if $sickbeard.SKIP_REMOVED_FILES == True then $checked else ''# />
<p>skip detection of removed files so the episode is not set to ignored<br>
<input type="checkbox" name="skip_removed_files" id="skip_removed_files" #if $sickbeard.SKIP_REMOVED_FILES == True then $checked else ''#>
<p>skip detection of removed files so the episode is not set to ignored<br />
<b>note:</b> this may mean SickGear misses renames as well</p>
</span>
</label>
@ -166,7 +195,7 @@
<label for="move_associated_files">
<span class="component-title">Move associated files</span>
<span class="component-desc">
<input type="checkbox" name="move_associated_files" id="move_associated_files" #if $sickbeard.MOVE_ASSOCIATED_FILES == True then $checked else ''# />
<input type="checkbox" name="move_associated_files" id="move_associated_files" #if $sickbeard.MOVE_ASSOCIATED_FILES == True then $checked else ''#>
<p>move srr/srt/sfv/etc files with the episode when processed</p>
</span>
</label>
@ -176,7 +205,7 @@
<label for="nfo_rename">
<span class="component-title">Rename .nfo file</span>
<span class="component-desc">
<input type="checkbox" name="nfo_rename" id="nfo_rename" #if $sickbeard.NFO_RENAME == True then $checked else ''# />
<input type="checkbox" name="nfo_rename" id="nfo_rename" #if $sickbeard.NFO_RENAME == True then $checked else ''#>
<p>rename the original .nfo file to .nfo-orig to avoid conflicts</p>
</span>
</label>
@ -186,7 +215,7 @@
<label for="rename_episodes">
<span class="component-title">Rename episodes</span>
<span class="component-desc">
<input type="checkbox" name="rename_episodes" id="rename_episodes" #if $sickbeard.RENAME_EPISODES == True then $checked else ''# />
<input type="checkbox" name="rename_episodes" id="rename_episodes" #if $sickbeard.RENAME_EPISODES == True then $checked else ''#>
<p>rename episodes using the Episode Naming settings</p>
</span>
</label>
@ -196,14 +225,14 @@
<label for="airdate_episodes">
<span class="component-title">Change file date</span>
<span class="component-desc">
<input type="checkbox" name="airdate_episodes" id="airdate_episodes" #if $sickbeard.AIRDATE_EPISODES == True then $checked else ''# />
<p>set last modified filedate to the date that the episode aired<br>
<input type="checkbox" name="airdate_episodes" id="airdate_episodes" #if $sickbeard.AIRDATE_EPISODES == True then $checked else ''#>
<p>set last modified filedate to the date that the episode aired<br />
<b>note:</b> some systems may ignore this feature.</p>
</span>
</label>
</div>
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
<input type="submit" class="btn config_submitter" value="Save Changes"><br />
</fieldset>
</div>
@ -221,7 +250,7 @@
<label for="use_failed_downloads" style="margin-bottom:0">
<span class="component-title">Enable</span>
<span class="component-desc">
<input id="use_failed_downloads" type="checkbox" class="enabler" name="use_failed_downloads" #if $sickbeard.USE_FAILED_DOWNLOADS == True then $checked else ''# />
<input id="use_failed_downloads" type="checkbox" class="enabler" name="use_failed_downloads" #if $sickbeard.USE_FAILED_DOWNLOADS == True then $checked else ''#>
<p>failed download handling</p>
</span>
</label>
@ -243,14 +272,14 @@
<label for="delete_failed">
<span class="component-title">Delete failed downloads</span>
<span class="component-desc">
<input id="delete_failed" type="checkbox" name="delete_failed" #if $sickbeard.DELETE_FAILED == True then $checked else ''# />
<p>delete left over files from a failed download<br>
<input id="delete_failed" type="checkbox" name="delete_failed" #if $sickbeard.DELETE_FAILED == True then $checked else ''#>
<p>delete left over files from a failed download<br />
</span>
</label>
</div>
</div>
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
<input type="submit" class="btn config_submitter" value="Save Changes"><br />
</fieldset>
</div>
@ -300,7 +329,7 @@
<label for="naming_pattern">
<span class="component-title"></span>
<span class="component-desc">
<input type="text" name="naming_pattern" id="naming_pattern" value="$sickbeard.NAMING_PATTERN" class="form-control input-sm input350 custom-pattern" />
<input type="text" name="naming_pattern" id="naming_pattern" value="$sickbeard.NAMING_PATTERN" class="form-control input-sm input350 custom-pattern">
<img src="$sbRoot/images/legend16.png" width="16" height="16" alt="[Toggle Key]" id="show_naming_key" title="Toggle Naming Legend" class="legend" class="legend" />
</span>
</label>
@ -423,7 +452,7 @@
</tr>
</tbody>
</table>
<br/>
<br />
</div>
</div>
@ -461,7 +490,7 @@
<div class="example">
<span class="jumbo" id="naming_example">&nbsp;</span>
</div>
<br/>
<br />
</div>
<div id="naming_example_multi_div">
@ -471,7 +500,7 @@
<div class="example">
<span class="jumbo" id="naming_example_multi">&nbsp;</span>
</div>
<br/>
<br />
</div>
</fieldset>
@ -520,7 +549,7 @@
<label for="naming_abd_pattern">
<span class="component-title"></span>
<span class="component-desc">
<input type="text" name="naming_abd_pattern" id="naming_abd_pattern" value="$sickbeard.NAMING_ABD_PATTERN" class="form-control input-sm input350 custom-pattern" />
<input type="text" name="naming_abd_pattern" id="naming_abd_pattern" value="$sickbeard.NAMING_ABD_PATTERN" class="form-control input-sm input350 custom-pattern">
<img src="$sbRoot/images/legend16.png" width="16" height="16" alt="[Toggle Key]" id="show_naming_abd_key" title="Toggle ABD Naming Legend" class="legend" />
</span>
</label>
@ -648,7 +677,7 @@
</tr>
</tbody>
</table>
<br/>
<br />
</div>
</div><!-- /naming_abd_custom -->
</div>
@ -663,13 +692,13 @@
<div class="example">
<span class="jumbo" id="naming_abd_example">&nbsp;</span>
</div>
<br/>
<br />
</div>
</div>
</fieldset>
<div class="field-pair right">
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
<input type="submit" class="btn config_submitter" value="Save Changes"><br />
</div>
</div><!-- /naming_abd_different -->
@ -718,7 +747,7 @@
<label for="naming_sports_pattern">
<span class="component-title"></span>
<span class="component-desc">
<input type="text" name="naming_sports_pattern" id="naming_sports_pattern" value="$sickbeard.NAMING_SPORTS_PATTERN" class="form-control input-sm input350 custom-pattern" />
<input type="text" name="naming_sports_pattern" id="naming_sports_pattern" value="$sickbeard.NAMING_SPORTS_PATTERN" class="form-control input-sm input350 custom-pattern">
<img src="$sbRoot/images/legend16.png" width="16" height="16" alt="[Toggle Key]" id="show_naming_sports_key" title="Toggle Sports Naming Legend" class="legend" />
</span>
</label>
@ -846,7 +875,7 @@
</tr>
</tbody>
</table>
<br/>
<br />
</div>
</div><!-- /naming_sports_custom -->
</div>
@ -863,7 +892,7 @@
<div class="example">
<span class="jumbo" id="naming_sports_example">&nbsp;</span>
</div>
<br/>
<br />
</div>
</div>
@ -871,7 +900,7 @@
</fieldset>
<div class="field-pair right">
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
<input type="submit" class="btn config_submitter" value="Save Changes"><br />
</div>
</div><!-- /naming_sports_different -->
@ -921,7 +950,7 @@
<label for="naming_anime_pattern">
<span class="component-title"></span>
<span class="component-desc">
<input type="text" name="naming_anime_pattern" id="naming_anime_pattern" value="$sickbeard.NAMING_ANIME_PATTERN" class="form-control input-sm input350 custom-pattern" />
<input type="text" name="naming_anime_pattern" id="naming_anime_pattern" value="$sickbeard.NAMING_ANIME_PATTERN" class="form-control input-sm input350 custom-pattern">
<img src="$sbRoot/images/legend16.png" width="16" height="16" alt="[Toggle Key]" id="show_naming_anime_key" title="Toggle Anime Naming Legend" class="legend" />
</span>
</label>
@ -1044,7 +1073,7 @@
</tr>
</tbody>
</table>
<br/>
<br />
</div>
</div><!-- /naming_anime_custom -->
@ -1074,7 +1103,7 @@
<div class="example">
<span class="jumbo" id="naming_example_anime">&nbsp;</span>
</div>
<br/>
<br />
</div>
<div id="naming_example_multi_anime_div">
@ -1084,7 +1113,7 @@
<div class="example">
<span class="jumbo" id="naming_example_multi_anime">&nbsp;</span>
</div>
<br/>
<br />
</div>
</fieldset>
@ -1096,7 +1125,7 @@
<span class="component-title">Add absolute numbering</span>
<span class="component-desc">
<input type="radio" name="naming_anime" id="naming_anime" value="1" #if $sickbeard.NAMING_ANIME == 1 then $checked else ''#/>
<p>add the absolute number to the season/episode format<br>
<p>add the absolute number to the season/episode format<br />
(eg. S15E45 - 310 vs S15E45)</p>
</span>
</label>
@ -1125,7 +1154,7 @@
</fieldset>
<div class="field-pair right">
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
<input type="submit" class="btn config_submitter" value="Save Changes"><br />
</div>
</div><!-- /naming_anime_different -->
@ -1202,18 +1231,18 @@
<label for="${cur_id}_season_all_banner"><span id="${cur_id}_eg_season_all_banner">$cur_metadata_inst.eg_season_all_banner</span></label>
</div>
</div>
<input type="hidden" name="${cur_id}_data" id="${cur_id}_data" value="$cur_metadata_inst.get_config()" />
<input type="hidden" name="${cur_id}_data" id="${cur_id}_data" value="$cur_metadata_inst.get_config()">
</div>
#end for
<div class="clearfix"></div><br/>
<div class="clearfix"></div><br />
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
<input type="submit" class="btn config_submitter" value="Save Changes"><br />
</fieldset>
</div><!-- /component-group3 //-->
<br/>
<br />
<h6 class="pull-right"><b>All non-absolute folder locations are relative to <span class="path">$sickbeard.DATA_DIR</span></b> </h6>
<input type="submit" class="btn pull-left config_submitter button" value="Save Changes" />
<input type="submit" class="btn pull-left config_submitter button" value="Save Changes">
</form>
</div>

View file

@ -375,6 +375,9 @@ $(document).ready(function () {
}, 500);
});
$('#show_extra_params').click(function () {
$('#extra_params').toggle();
});
$('#show_naming_key').click(function () {
$('#naming_key').toggle();
});