Skip to content

Commit

Permalink
Added 000x issue padding option
Browse files Browse the repository at this point in the history
  • Loading branch information
Casvt committed Nov 26, 2023
1 parent 9e3048f commit 0c1e0d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,16 @@ def set_settings(self, settings: dict) -> dict:
value = ('/' + value.lstrip('/')).rstrip('/')
settings['url_base'] = value

elif key in ('issue_padding', 'volume_padding'):
elif key == 'volume_padding':
try:
if not (1 <= value <= 3):
if not 1 <= value <= 3:
raise InvalidSettingValue(key, value)
except TypeError:
raise InvalidSettingValue(key, value)

elif key == 'issue_padding':
try:
if not 1 <= value <= 4:
raise InvalidSettingValue(key, value)
except TypeError:
raise InvalidSettingValue(key, value)
Expand Down
1 change: 1 addition & 0 deletions frontend/templates/settings_mediamanagement.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ <h2>File Naming</h2>
<th><label for="issue-padding-input">Issue Padding</label></th>
<td>
<select id="issue-padding-input">
<option value="4">000x</option>
<option value="3">00x</option>
<option value="2">0x</option>
<option value="1">x</option>
Expand Down

0 comments on commit 0c1e0d1

Please sign in to comment.