1
0
Fork 0
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:
Luke Pulverenti 2013-10-16 19:35:11 -04:00
parent 6d4e555bb8
commit b23426bb93
13 changed files with 167 additions and 18 deletions

View 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);