Chapter Images:

- chapter image extraction intervals, limit count and resolutions can be set by the user from the server general settings;
This commit is contained in:
Negulici-R. Barnabas 2022-07-18 17:54:10 +03:00 committed by Bill Thornton
parent 2ba0c22df0
commit 18ae1dc17f
3 changed files with 44 additions and 1 deletions

View File

@ -79,6 +79,24 @@
</label>
</div>
</div>
<div class="verticalSection">
<h2>${HeaderDummyChapter}</h2>
<div class="inputContainer">
<input is="emby-input" type="number" id="valDummyChapterDuration" label="${LabelDummyChapterDuration}" min="1"></input>
<div class="fieldDescription">${LabelDummyChapterDurationHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="number" id="valDummyChapterCount" label="${LabelDummyChapterCount}" min="1"></input>
<div class="fieldDescription">${LabelDummyChapterCountHelp}</div>
</div>
<div class="selectContainer">
<select is="emby-select" id="txtChapterImageResolution" label="${LabelChapterImageResolution}"></select>
<div class="fieldDescription">
<div>${LabelChapterImageResolutionHelp}</div>
</div>
</div>
</div>
<br />
<div>
<button is="emby-button" type="submit" class="raised button-submit block">

View File

@ -15,11 +15,26 @@ import alert from '../../components/alert';
page.querySelector('#txtServerName').value = systemInfo.ServerName;
page.querySelector('#txtCachePath').value = systemInfo.CachePath || '';
page.querySelector('#chkQuickConnectAvailable').checked = config.QuickConnectAvailable === true;
page.querySelector('#valDummyChapterDuration').value = config.DummyChapterDuration;
page.querySelector('#valDummyChapterCount').value = config.DummyChapterCount;
$('#txtMetadataPath', page).val(systemInfo.InternalMetadataPath || '');
$('#txtMetadataNetworkPath', page).val(systemInfo.MetadataNetworkPath || '');
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (language) {
return '<option value="' + language.Value + '">' + language.Name + '</option>';
})).val(config.UICulture);
page.querySelector('#txtChapterImageResolution').value = config.ChapterImageResolution;
$('#txtChapterImageResolution', page).html([
{name: "Match Source", value: "Match Source"},
{name: "2160p", value: "P2160"},
{name: "1440p", value: "P1440"},
{name: "1080p", value: "P1080"},
{name: "720p", value: "P720"},
{name: "480p", value: "P480"},
{name: "360p", value: "P360"},
{name: "240p", value: "P240"}
].map(function (resolution) {
return '<option value="' + resolution.value + '">' + resolution.name + '</option>';
})).val(config.ChapterImageResolution);
loading.hide();
}
@ -35,6 +50,9 @@ import alert from '../../components/alert';
config.MetadataPath = $('#txtMetadataPath', form).val();
config.MetadataNetworkPath = $('#txtMetadataNetworkPath', form).val();
config.QuickConnectAvailable = form.querySelector('#chkQuickConnectAvailable').checked;
config.DummyChapterDuration = $('#valDummyChapterDuration', form).val();
config.DummyChapterCount = $('#valDummyChapterCount', form).val();
config.ChapterImageResolution = $('#txtChapterImageResolution', form).val();
ApiClient.updateServerConfiguration(config).then(function() {
ApiClient.getNamedConfiguration(brandingConfigKey).then(function(brandingConfig) {
brandingConfig.LoginDisclaimer = form.querySelector('#txtLoginDisclaimer').value;

View File

@ -1679,5 +1679,12 @@
"MediaInfoElPresentFlag": "DV el preset flag",
"MediaInfoBlPresentFlag": "DV bl preset flag",
"MediaInfoDvBlSignalCompatibilityId": "DV bl signal compatibility id",
"Unreleased": "Not yet released"
"Unreleased": "Not yet released",
"HeaderDummyChapter": "Chapter Images",
"LabelDummyChapterDuration": "Interval:",
"LabelDummyChapterDurationHelp": "The chapter image extraction interval in seconds.",
"LabelDummyChapterCount": "Limit:",
"LabelDummyChapterCountHelp": "The maximum number of chapter images that will be extracted for each media file.",
"LabelChapterImageResolution": "Resolution:",
"LabelChapterImageResolutionHelp": "The resolution of the extracted chapter images."
}