mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #592 - Add options to import missing and future episodes
This commit is contained in:
parent
6d4e555bb8
commit
b23426bb93
13 changed files with 167 additions and 18 deletions
52
dashboard-ui/scripts/metadatatv.js
Normal file
52
dashboard-ui/scripts/metadatatv.js
Normal file
|
@ -0,0 +1,52 @@
|
|||
var MetadataTVPage = {
|
||||
|
||||
onPageShow: function () {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (result) {
|
||||
|
||||
MetadataTVPage.load(page, result);
|
||||
});
|
||||
},
|
||||
|
||||
load: function (page, config) {
|
||||
|
||||
var chkEnableTvdbUpdates = $('#chkEnableTvdbUpdates', page).checked(config.EnableTvDbUpdates).checkboxradio("refresh");
|
||||
var chkCreateMissingEpisodes = $('#chkCreateMissingEpisodes', page).checked(config.CreateVirtualMissingEpisodes).checkboxradio("refresh");
|
||||
var chkCreateFutureEpisodes = $('#chkCreateFutureEpisodes', page).checked(config.CreateVirtualFutureEpisodes).checkboxradio("refresh");
|
||||
|
||||
if (config.EnableInternetProviders) {
|
||||
chkEnableTvdbUpdates.checkboxradio("enable");
|
||||
chkCreateMissingEpisodes.checkboxradio("enable");
|
||||
chkCreateFutureEpisodes.checkboxradio("enable");
|
||||
} else {
|
||||
chkEnableTvdbUpdates.checkboxradio("disable");
|
||||
chkCreateMissingEpisodes.checkboxradio("disable");
|
||||
chkCreateFutureEpisodes.checkboxradio("disable");
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
},
|
||||
|
||||
onSubmit: function () {
|
||||
var form = this;
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked();
|
||||
config.CreateVirtualMissingEpisodes = $('#chkCreateMissingEpisodes', form).checked();
|
||||
config.CreateVirtualFutureEpisodes = $('#chkCreateFutureEpisodes', form).checked();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
$(document).on('pageshow', "#metadataTvPage", MetadataTVPage.onPageShow);
|
Loading…
Add table
Add a link
Reference in a new issue