mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Add validation when using Release Group token on page config Post Processing/Episode Naming/Name pattern/Custom.
This commit is contained in:
parent
f63ee33610
commit
9747778e28
3 changed files with 29 additions and 4 deletions
|
@ -31,6 +31,7 @@
|
|||
* Change naming of SEARCHQUEUE threads for shorter log lines
|
||||
* Fix Recent Search running status on Manage Searches page
|
||||
* Change to no longer require restart with the "Scan and post process" option on page config/Post Processing
|
||||
* Add validation when using Release Group token on page config Post Processing/Episode Naming/Name pattern/Custom
|
||||
|
||||
[develop changelog]
|
||||
* Fix traceback error when using the menu item Manage/Update Kodi
|
||||
|
|
|
@ -442,7 +442,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="align-right"><i class="icon-info-sign" title="'SickGear' is used in place of RLSGROUP if it could not be properly detected"></i> <b>Release Group:</b></td>
|
||||
<td>%RG</td>
|
||||
<td>-%RG</td>
|
||||
<td>RLSGROUP</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
|
@ -667,7 +667,7 @@
|
|||
</tr>
|
||||
<tr class="even">
|
||||
<td class="align-right"><i class="icon-info-sign" title="if RLSGROUP is not detected, 'SickGear' is used"></i> <b>Release Group:</b></td>
|
||||
<td>%RG</td>
|
||||
<td>-%RG</td>
|
||||
<td>RLSGROUP</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -865,7 +865,7 @@
|
|||
</tr>
|
||||
<tr class="even">
|
||||
<td class="align-right"><i class="icon-info-sign" title="If RLSGROUP is not detected, 'SickGear' is used"></i> <b>Release Group:</b></td>
|
||||
<td>%RG</td>
|
||||
<td>-%RG</td>
|
||||
<td>RLSGROUP</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -1063,7 +1063,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="align-right"><i class="icon-info-sign" title="If RLSGROUP is not detected, 'SickGear' is used"></i> <b>Release Group:</b></td>
|
||||
<td>%RG</td>
|
||||
<td>[%RG]</td>
|
||||
<td>RLSGROUP</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
|
|
|
@ -525,4 +525,28 @@ $(document).ready(function () {
|
|||
}
|
||||
});
|
||||
|
||||
$('.config_submitter').on('click', (function() {
|
||||
var save_config = true;
|
||||
$('#naming_pattern, #naming_abd_pattern, #naming_sports_pattern').each(function() {
|
||||
if (/^((?=.*%RG)(?:(?!-%RG).)*)$/.test($(this).val())
|
||||
|| /^((?=.*%rg)(?:(?!-%rg).)*)$/i.test($(this).val())) {
|
||||
$(this).focus();
|
||||
alert('You must insert a minus symbol before the %RG/%rg token i.e. -%RG, or -%rg');
|
||||
save_config = false;
|
||||
return save_config;
|
||||
}
|
||||
});
|
||||
if (save_config) {
|
||||
$('#naming_anime_pattern').each(function() {
|
||||
if (/^((?=.*%RG)(?:(?!\[%RG\]).)*)$/.test($(this).val())
|
||||
|| /^((?=.*%rg)(?:(?!\[%rg\]).)*)$/i.test($(this).val())) {
|
||||
$(this).focus();
|
||||
alert('You must insert a bracket around the %RG/%rg token i.e. [%RG], or [%rg]');
|
||||
save_config = false;
|
||||
return save_config;
|
||||
}
|
||||
});
|
||||
}
|
||||
return save_config;
|
||||
}))
|
||||
});
|
Loading…
Reference in a new issue