mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
make chapter images a per-library setting
This commit is contained in:
parent
fc63d39e27
commit
0659c5bdc1
6 changed files with 41 additions and 61 deletions
|
@ -38,6 +38,14 @@
|
|||
} else {
|
||||
parent.querySelector('.chkEnablePhotosContainer').classList.add('hide');
|
||||
}
|
||||
|
||||
if (contentType == 'tvshows' || contentType == 'movies' || contentType == 'homevideos' || contentType == 'musicvideos' || contentType == 'mixed' || !contentType) {
|
||||
parent.querySelector('.fldExtractChaptersDuringLibraryScan').classList.remove('hide');
|
||||
parent.querySelector('.fldExtractChapterImages').classList.remove('hide');
|
||||
} else {
|
||||
parent.querySelector('.fldExtractChaptersDuringLibraryScan').classList.add('hide');
|
||||
parent.querySelector('.fldExtractChapterImages').classList.add('hide');
|
||||
}
|
||||
}
|
||||
|
||||
function getLibraryOptions(parent) {
|
||||
|
@ -45,7 +53,9 @@
|
|||
var options = {
|
||||
EnableArchiveMediaFiles: parent.querySelector('.chkArhiveAsMedia').checked,
|
||||
EnablePhotos: parent.querySelector('.chkEnablePhotos').checked,
|
||||
EnableRealtimeMonitor: parent.querySelector('.chkEnableRealtimeMonitor').checked
|
||||
EnableRealtimeMonitor: parent.querySelector('.chkEnableRealtimeMonitor').checked,
|
||||
ExtractChapterImagesDuringLibraryScan: parent.querySelector('.chkExtractChaptersDuringLibraryScan').checked,
|
||||
EnableChapterImageExtraction: parent.querySelector('.chkExtractChapterImages').checked
|
||||
};
|
||||
|
||||
return options;
|
||||
|
@ -56,6 +66,8 @@
|
|||
parent.querySelector('.chkArhiveAsMedia').checked = options.EnableArchiveMediaFiles;
|
||||
parent.querySelector('.chkEnablePhotos').checked = options.EnablePhotos;
|
||||
parent.querySelector('.chkEnableRealtimeMonitor').checked = options.EnableRealtimeMonitor;
|
||||
parent.querySelector('.chkExtractChaptersDuringLibraryScan').checked = options.ExtractChapterImagesDuringLibraryScan;
|
||||
parent.querySelector('.chkExtractChapterImages').checked = options.EnableChapterImageExtraction;
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -8,12 +8,28 @@
|
|||
</div>
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkEnableRealtimeMonitor" />
|
||||
<input type="checkbox" is="emby-checkbox" class="chkEnableRealtimeMonitor"/>
|
||||
<span>${LabelEnableRealtimeMonitor}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${LabelEnableRealtimeMonitorHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription fldExtractChapterImages hide">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkExtractChapterImages" />
|
||||
<span>${OptionExtractChapterImage}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${ExtractChapterImagesHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription fldExtractChaptersDuringLibraryScan hide">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkExtractChaptersDuringLibraryScan" />
|
||||
<span>${LabelExtractChaptersDuringLibraryScan}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${LabelExtractChaptersDuringLibraryScanHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription chkArhiveAsMediaContainer">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkArhiveAsMedia" />
|
||||
|
|
|
@ -35,17 +35,6 @@
|
|||
$('#txtFanartApiKey', page).val(config.UserApiKey || '');
|
||||
}
|
||||
|
||||
function loadChapters(page, config, providers) {
|
||||
|
||||
$('#chkChaptersMovies', page).checked(config.EnableMovieChapterImageExtraction);
|
||||
$('#chkChaptersEpisodes', page).checked(config.EnableEpisodeChapterImageExtraction);
|
||||
$('#chkChaptersOtherVideos', page).checked(config.EnableOtherVideoChapterImageExtraction);
|
||||
|
||||
$('#chkExtractChaptersDuringLibraryScan', page).checked(config.ExtractDuringLibraryScan);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function saveFanart(form) {
|
||||
|
||||
ApiClient.getNamedConfiguration("fanart").then(function (config) {
|
||||
|
@ -66,20 +55,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
function saveChapters(form) {
|
||||
|
||||
ApiClient.getNamedConfiguration("chapters").then(function (config) {
|
||||
|
||||
config.EnableMovieChapterImageExtraction = $('#chkChaptersMovies', form).checked();
|
||||
config.EnableEpisodeChapterImageExtraction = $('#chkChaptersEpisodes', form).checked();
|
||||
config.EnableOtherVideoChapterImageExtraction = $('#chkChaptersOtherVideos', form).checked();
|
||||
|
||||
config.ExtractDuringLibraryScan = $('#chkExtractChaptersDuringLibraryScan', form).checked();
|
||||
|
||||
ApiClient.updateNamedConfiguration("chapters", config);
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
|
@ -108,7 +83,6 @@
|
|||
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
saveChapters(form);
|
||||
saveMetadata(form);
|
||||
saveFanart(form);
|
||||
|
||||
|
@ -185,14 +159,6 @@
|
|||
|
||||
loadFanartConfig(page, metadata);
|
||||
});
|
||||
|
||||
var promise1 = ApiClient.getNamedConfiguration("chapters");
|
||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl("Providers/Chapters"));
|
||||
|
||||
Promise.all([promise1, promise2]).then(function (responses) {
|
||||
|
||||
loadChapters(page, responses[0], responses[1]);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -26,28 +26,6 @@
|
|||
<br />
|
||||
</div>
|
||||
<br />
|
||||
<div is="emby-collapse" title="${HeaderChapters}">
|
||||
<div class="collapseContent">
|
||||
<br />
|
||||
<div>
|
||||
<div class="paperListLabel">${HeaderExtractChapterImagesFor}</div>
|
||||
<div class="paperCheckboxList">
|
||||
<paper-checkbox id="chkChaptersMovies">${OptionMovies}</paper-checkbox>
|
||||
|
||||
<paper-checkbox id="chkChaptersEpisodes">${OptionEpisodes}</paper-checkbox>
|
||||
|
||||
<paper-checkbox id="chkChaptersOtherVideos">${OptionOtherVideos}</paper-checkbox>
|
||||
</div>
|
||||
<div class="fieldDescription paperCheckboxFieldDescription">${ExtractChapterImagesHelp}</div>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<paper-checkbox id="chkExtractChaptersDuringLibraryScan">${LabelExtractChaptersDuringLibraryScan}</paper-checkbox>
|
||||
<div class="fieldDescription paperCheckboxFieldDescription">${LabelExtractChaptersDuringLibraryScanHelp}</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div is="emby-collapse" title="${HeaderPeople}">
|
||||
<div class="collapseContent">
|
||||
|
|
|
@ -1250,10 +1250,16 @@
|
|||
var errorMsg = Globalize.translate('MessageErrorPlayingVideo');
|
||||
|
||||
var item = self.currentItem;
|
||||
var mediaSource = self.currentMediaSource;
|
||||
if (item && item.Type == "TvChannel") {
|
||||
errorMsg += '<p>';
|
||||
errorMsg += '<br/>';
|
||||
errorMsg += '<br/>';
|
||||
errorMsg += Globalize.translate('MessageEnsureOpenTuner');
|
||||
errorMsg += '</p>';
|
||||
}
|
||||
if (mediaSource && mediaSource.VideoType != "VideoFile") {
|
||||
errorMsg += '<br/>';
|
||||
errorMsg += '<br/>';
|
||||
errorMsg += Globalize.translate('MessageFolderRipPlaybackExperimental');
|
||||
}
|
||||
|
||||
Dashboard.alert({
|
||||
|
|
|
@ -2224,5 +2224,7 @@
|
|||
"LabelMaxAudioFileBitrateHelp": "Audio files with a higher bitrate will be converted by Emby Server. Select a higher value for better quality, or a lower value to conserve local storage space.",
|
||||
"LabelVaapiDevice": "VA API Device:",
|
||||
"LabelVaapiDeviceHelp": "This is the render node that is used for hardware acceleration.",
|
||||
"HowToConnectFromEmbyApps": "How to Connect from Emby apps"
|
||||
"HowToConnectFromEmbyApps": "How to Connect from Emby apps",
|
||||
"MessageFolderRipPlaybackExperimental": "Support for playback of folder rips and ISOs in this app is only expirimental. For best results, try an Emby app that supports these formats natively, or use plain video files.",
|
||||
"OptionExtractChapterImage": "Enable chapter image extraction"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue