mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
separate provider options
This commit is contained in:
parent
b1b6b26abc
commit
3c745ff362
89 changed files with 296 additions and 136 deletions
|
@ -28,6 +28,10 @@
|
|||
|
||||
$('#chkRunAtStartup', page).checked(config.RunAtStartup).checkboxradio("refresh");
|
||||
|
||||
$('#chkEnableDashboardResponseCache', page).checked(config.EnableDashboardResponseCaching).checkboxradio("refresh");
|
||||
$('#chkEnableMinification', page).checked(config.EnableDashboardResourceMinification).checkboxradio("refresh");
|
||||
$('#txtDashboardSourcePath', page).val(config.DashboardSourcePath).trigger('change');
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
|
@ -61,6 +65,22 @@
|
|||
|
||||
});
|
||||
|
||||
$('#btnSelectDashboardSourcePath', page).on("click.selectDirectory", function () {
|
||||
|
||||
var picker = new DirectoryBrowser(page);
|
||||
|
||||
picker.show({
|
||||
|
||||
callback: function (path) {
|
||||
|
||||
if (path) {
|
||||
$('#txtDashboardSourcePath', page).val(path);
|
||||
}
|
||||
picker.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function advancedConfigurationPage() {
|
||||
|
@ -80,6 +100,10 @@
|
|||
config.SystemUpdateLevel = $('#selectAutomaticUpdateLevel', form).val();
|
||||
config.EnableAutomaticRestart = $('#chkEnableAutomaticRestart', form).checked();
|
||||
|
||||
config.EnableDashboardResourceMinification = $('#chkEnableMinification', form).checked();
|
||||
config.EnableDashboardResponseCaching = $('#chkEnableDashboardResponseCache', form).checked();
|
||||
config.DashboardSourcePath = $('#txtDashboardSourcePath', form).val();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
|
|
|
@ -154,19 +154,22 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
if ($(page).hasClass('backdropPage')) {
|
||||
if (!$(page).hasClass('staticBackdropPage')) {
|
||||
|
||||
if (enabled()) {
|
||||
var type = page.getAttribute('data-backdroptype');
|
||||
if ($(page).hasClass('backdropPage')) {
|
||||
|
||||
showBackdrop(type);
|
||||
if (enabled()) {
|
||||
var type = page.getAttribute('data-backdroptype');
|
||||
|
||||
showBackdrop(type);
|
||||
|
||||
} else {
|
||||
$(page).removeClass('backdropPage');
|
||||
clearBackdrop();
|
||||
}
|
||||
} else {
|
||||
$(page).removeClass('backdropPage');
|
||||
clearBackdrop();
|
||||
}
|
||||
} else {
|
||||
clearBackdrop();
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
html += '<a class="viewMenuLink viewMenuTextLink lnkMediaFolder editorViewMenu iconViewMenu" data-itemid="editor" href="edititemmetadata.html"><span class="fa fa-edit"></span>' + Globalize.translate('ButtonMetadataManager') + '</a>';
|
||||
html += '<a class="viewMenuLink viewMenuTextLink lnkMediaFolder iconViewMenu" data-itemid="reports" href="reports.html"><span class="fa fa-bar-chart"></span>' + Globalize.translate('ButtonReports') + '</a>';
|
||||
html += '</div>';
|
||||
//html += '<a class="viewMenuLink viewMenuTextLink lnkMediaFolder iconViewMenu syncViewMenu" data-itemid="mysync" href="mysync.html"><span class="fa fa-cloud"></span>' + Globalize.translate('ButtonSync') + '</a>';
|
||||
html += '<a class="viewMenuLink viewMenuTextLink lnkMediaFolder iconViewMenu syncViewMenu" data-itemid="mysync" href="mysync.html"><span class="fa fa-cloud"></span>' + Globalize.translate('ButtonSync') + '</a>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
@ -198,6 +198,7 @@
|
|||
} else {
|
||||
$('.adminMenuOptions').hide();
|
||||
}
|
||||
|
||||
if (user.Policy.EnableSync) {
|
||||
$('.syncViewMenu').show();
|
||||
} else {
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
|
||||
$('#chkFindTrailers', page).checked(config.FindInternetTrailers).checkboxradio("refresh");
|
||||
|
||||
$('#chkEnableTmdbPersonUpdates', page).checked(config.EnableTmdbUpdates).checkboxradio("refresh");
|
||||
$('#chkEnableTvdbUpdates', page).checked(config.EnableTvDbUpdates).checkboxradio("refresh");
|
||||
$('#chkEnableFanartUpdates', page).checked(config.EnableFanArtUpdates).checkboxradio("refresh");
|
||||
$('#txtMetadataPath', page).val(config.MetadataPath || '');
|
||||
|
||||
$('#chkPeopleActors', page).checked(config.PeopleMetadataOptions.DownloadActorMetadata).checkboxradio("refresh");
|
||||
|
@ -19,16 +16,29 @@
|
|||
$('#chkPeopleOthers', page).checked(config.PeopleMetadataOptions.DownloadOtherPeopleMetadata).checkboxradio("refresh");
|
||||
$('#chkPeopleGuestStars', page).checked(config.PeopleMetadataOptions.DownloadGuestStarMetadata).checkboxradio("refresh");
|
||||
|
||||
$('#txtFanartApiKey', page).val(config.FanartApiKey || '');
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function loadMetadataConfig(page, config) {
|
||||
|
||||
|
||||
$('#selectDateAdded', page).val((config.UseFileCreationTimeForDateAdded ? '1' : '0')).selectmenu("refresh");
|
||||
}
|
||||
|
||||
function loadTmdbConfig(page, config) {
|
||||
|
||||
$('#chkEnableTmdbUpdates', page).checked(config.EnableAutomaticUpdates).checkboxradio("refresh");
|
||||
}
|
||||
|
||||
function loadTvdbConfig(page, config) {
|
||||
|
||||
$('#chkEnableTvdbUpdates', page).checked(config.EnableAutomaticUpdates).checkboxradio("refresh");
|
||||
}
|
||||
|
||||
function loadFanartConfig(page, config) {
|
||||
|
||||
$('#chkEnableFanartUpdates', page).checked(config.EnableAutomaticUpdates).checkboxradio("refresh");
|
||||
$('#txtFanartApiKey', page).val(config.UserApiKey || '');
|
||||
}
|
||||
|
||||
function loadChapters(page, config, providers) {
|
||||
|
@ -182,6 +192,21 @@
|
|||
|
||||
});
|
||||
|
||||
ApiClient.getNamedConfiguration("fanart").done(function (metadata) {
|
||||
|
||||
loadFanartConfig(page, metadata);
|
||||
});
|
||||
|
||||
ApiClient.getNamedConfiguration("themoviedb").done(function (metadata) {
|
||||
|
||||
loadTmdbConfig(page, metadata);
|
||||
});
|
||||
|
||||
ApiClient.getNamedConfiguration("tvdb").done(function (metadata) {
|
||||
|
||||
loadTvdbConfig(page, metadata);
|
||||
});
|
||||
|
||||
var promise1 = ApiClient.getNamedConfiguration("chapters");
|
||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl("Providers/Chapters"));
|
||||
|
||||
|
@ -191,6 +216,37 @@
|
|||
});
|
||||
});
|
||||
|
||||
function saveFanart(form) {
|
||||
|
||||
ApiClient.getNamedConfiguration("fanart").done(function (config) {
|
||||
|
||||
config.EnableAutomaticUpdates = $('#chkEnableFanartUpdates', form).checked();
|
||||
config.UserApiKey = $('#txtFanartApiKey', form).val();
|
||||
|
||||
ApiClient.updateNamedConfiguration("fanart", config);
|
||||
});
|
||||
}
|
||||
|
||||
function saveTvdb(form) {
|
||||
|
||||
ApiClient.getNamedConfiguration("tvdb").done(function (config) {
|
||||
|
||||
config.EnableAutomaticUpdates = $('#chkEnableTvdbUpdates', form).checked();
|
||||
|
||||
ApiClient.updateNamedConfiguration("tvdb", config);
|
||||
});
|
||||
}
|
||||
|
||||
function saveTmdb(form) {
|
||||
|
||||
ApiClient.getNamedConfiguration("themoviedb").done(function (config) {
|
||||
|
||||
config.EnableAutomaticUpdates = $('#chkEnableTmdbUpdates', form).checked();
|
||||
|
||||
ApiClient.updateNamedConfiguration("themoviedb", config);
|
||||
});
|
||||
}
|
||||
|
||||
function saveAdvancedConfig(form) {
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
@ -199,7 +255,7 @@
|
|||
|
||||
config.FindInternetTrailers = $('#chkFindTrailers', form).checked();
|
||||
config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked();
|
||||
config.EnableTmdbUpdates = $('#chkEnableTmdbPersonUpdates', form).checked();
|
||||
config.EnableTmdbUpdates = $('#chkEnableTmdbUpdates', form).checked();
|
||||
config.EnableFanArtUpdates = $('#chkEnableFanartUpdates', form).checked();
|
||||
config.MetadataPath = $('#txtMetadataPath', form).val();
|
||||
config.FanartApiKey = $('#txtFanartApiKey', form).val();
|
||||
|
@ -264,6 +320,9 @@
|
|||
saveAdvancedConfig(form);
|
||||
saveChapters(form);
|
||||
saveMetadata(form);
|
||||
saveTmdb(form);
|
||||
saveTvdb(form);
|
||||
saveFanart(form);
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
html += '<br/>';
|
||||
}
|
||||
|
||||
html += '<div class="ui-bar-a" style="padding: 0 1em;"><h3>' + category + '</h3></div>';
|
||||
html += '<div class="detailSectionHeader">' + category + '</div>';
|
||||
|
||||
currentCategory = category;
|
||||
}
|
||||
|
|
|
@ -1427,7 +1427,25 @@ $(function () {
|
|||
|
||||
Dashboard.jQueryMobileInit();
|
||||
|
||||
$(document).on('pagebeforeshow', ".page", function () {
|
||||
$(document).on('pagecreate', ".page", function () {
|
||||
|
||||
var page = $(this);
|
||||
|
||||
var newTheme;
|
||||
|
||||
if (page.hasClass('libraryPage')) {
|
||||
newTheme = 'b';
|
||||
} else {
|
||||
newTheme = 'a';
|
||||
}
|
||||
|
||||
var current = page.page("option", "theme");
|
||||
|
||||
if (current && current != newTheme) {
|
||||
page.page("option", "theme", newTheme);
|
||||
}
|
||||
|
||||
}).on('pagebeforeshow', ".page", function () {
|
||||
|
||||
var page = $(this);
|
||||
|
||||
|
|
|
@ -141,11 +141,7 @@
|
|||
var lastTargetName = '';
|
||||
|
||||
var cardBoxCssClass = 'cardBox visualCardBox';
|
||||
var barCssClass = 'ui-bar-a';
|
||||
|
||||
if ($(page).hasClass('libraryPage')) {
|
||||
barCssClass = 'detailSectionHeader';
|
||||
}
|
||||
var barCssClass = 'detailSectionHeader';
|
||||
|
||||
var syncJobPage = 'syncjob.html';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue