Skip to content

Commit

Permalink
Merge pull request jellyfin#2286 from Artiume/patch-6
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaboniface committed Dec 31, 2020
2 parents 51f9cd5 + fe33c52 commit b744fe4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/controllers/dashboard/playback.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ <h2 class="sectionTitle">${ButtonResume}</h2>
${LabelMaxResumePercentageHelp}
</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="number" id="txtMinAudiobookResume" name="txtMinAudiobookResume" pattern="[0-9]*" required min="0" max="100" label="${LabelMinAudiobookResume}"></input>
<div class="fieldDescription">
${LabelMinAudiobookResumeHelp}
</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="number" id="txtMaxAudiobookResume" name="txtMaxAudiobookResume" pattern="[0-9]*" required min="1" max="100" label="${LabelMaxAudiobookResume}"></input>
<div class="fieldDescription">
${LabelMaxAudiobookResumeHelp}
</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="number" id="txtMinResumeDuration" name="txtMinResumeDuration" pattern="[0-9]*" required min="0" label="${LabelMinResumeDuration}"></input>
<div class="fieldDescription">
Expand Down
4 changes: 4 additions & 0 deletions src/controllers/dashboard/playback.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Dashboard from '../../scripts/clientUtils';
function loadPage(page, config) {
$('#txtMinResumePct', page).val(config.MinResumePct);
$('#txtMaxResumePct', page).val(config.MaxResumePct);
$('#txtMinAudiobookResume', page).val(config.MinAudiobookResume);
$('#txtMaxAudiobookResume', page).val(config.MaxAudiobookResume);
$('#txtMinResumeDuration', page).val(config.MinResumeDurationSeconds);
loading.hide();
}
Expand All @@ -19,6 +21,8 @@ import Dashboard from '../../scripts/clientUtils';
ApiClient.getServerConfiguration().then(function (config) {
config.MinResumePct = $('#txtMinResumePct', form).val();
config.MaxResumePct = $('#txtMaxResumePct', form).val();
config.MinAudiobookResume = $('#txtMinAudiobookResume', form).val();
config.MaxAudiobookResume = $('#txtMaxAudiobookResume', form).val();
config.MinResumeDurationSeconds = $('#txtMinResumeDuration', form).val();

ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
Expand Down
4 changes: 4 additions & 0 deletions src/strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@
"LabelManufacturer": "Manufacturer:",
"LabelManufacturerUrl": "Manufacturer URL",
"LabelMatchType": "Match type:",
"LabelMaxAudiobookResume": "Maximum Audiobook resume in minutes:",
"LabelMaxAudiobookResumeHelp": "Titles are assumed fully played if stopped after this time.",
"LabelMaxBackdropsPerItem": "Maximum number of backdrops per item:",
"LabelMaxChromecastBitrate": "Chromecast streaming quality:",
"LabelMaxMuxingQueueSize": "Max muxing queue size:",
Expand All @@ -705,6 +707,8 @@
"LabelMetadataSavers": "Metadata savers:",
"LabelMetadataSaversHelp": "Choose the file formats to use when saving your metadata.",
"LabelMethod": "Method:",
"LabelMinAudiobookResume": "Minimum Audiobook resume in minutes:",
"LabelMinAudiobookResumeHelp": "Titles are assumed unplayed if stopped before this time.",
"LabelMinBackdropDownloadWidth": "Minimum backdrop download width:",
"LabelMinResumeDuration": "Minimum resume duration:",
"LabelMinResumeDurationHelp": "The shortest video length in seconds that will save playback location and let you resume.",
Expand Down

0 comments on commit b744fe4

Please sign in to comment.