mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update series queries
This commit is contained in:
parent
b162cf30c5
commit
da237475f0
18 changed files with 34 additions and 217 deletions
|
@ -332,6 +332,10 @@
|
|||
return 'secondaryitems.html?type=' + type + '&artistId=' + item.Id;
|
||||
}
|
||||
|
||||
if (item.Type == 'Person') {
|
||||
return 'secondaryitems.html?type=' + type + '&personId=' + item.Id;
|
||||
}
|
||||
|
||||
return 'secondaryitems.html?type=' + type + '&parentId=' + item.Id;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
|
||||
if (dom.getWindowSize().innerWidth >= 800) {
|
||||
backdrop.setBackdrops([item], {
|
||||
blur: 30
|
||||
blur: 27
|
||||
}, false);
|
||||
} else {
|
||||
backdrop.clear();
|
||||
|
|
|
@ -1,160 +0,0 @@
|
|||
define(['jQuery', 'listViewStyle'], function ($) {
|
||||
'use strict';
|
||||
|
||||
var currentConfig;
|
||||
|
||||
function remove(page, index) {
|
||||
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
confirm(Globalize.translate('MessageConfirmPathSubstitutionDeletion'), Globalize.translate('HeaderConfirmDeletion')).then(function () {
|
||||
|
||||
ApiClient.getServerConfiguration().then(function (config) {
|
||||
|
||||
config.PathSubstitutions.splice(index, 1);
|
||||
|
||||
ApiClient.updateServerConfiguration(config).then(function () {
|
||||
|
||||
reload(page);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function addSubstitution(page, config) {
|
||||
|
||||
config.PathSubstitutions.push({
|
||||
From: $('#txtFrom', page).val(),
|
||||
To: $('#txtTo', page).val()
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function reloadPathMappings(page, config) {
|
||||
|
||||
var index = 0;
|
||||
|
||||
var html = config.PathSubstitutions.map(function (map) {
|
||||
|
||||
var mapHtml = '';
|
||||
mapHtml += '<div class="listItem">';
|
||||
|
||||
mapHtml += '<i class="listItemIcon md-icon">folder</i>';
|
||||
|
||||
mapHtml += '<div class="listItemBody three-line">';
|
||||
|
||||
mapHtml += "<h3 class='listItemBodyText'>" + map.From + "</h3>";
|
||||
mapHtml += "<div class='listItemBodyText secondary'>" + Globalize.translate('HeaderTo') + "</div>";
|
||||
mapHtml += "<div class='listItemBodyText secondary'>" + map.To + "</div>";
|
||||
|
||||
mapHtml += '</div>';
|
||||
|
||||
mapHtml += '<button type="button" is="paper-icon-button-light" data-index="' + index + '" class="btnDeletePath"><i class="md-icon">delete</i></button>';
|
||||
|
||||
mapHtml += '</div>';
|
||||
|
||||
index++;
|
||||
|
||||
return mapHtml;
|
||||
|
||||
}).join('');
|
||||
|
||||
if (config.PathSubstitutions.length) {
|
||||
html = '<div class="paperList">' + html + '</div>';
|
||||
}
|
||||
|
||||
var elem = $('.pathSubstitutions', page).html(html);
|
||||
|
||||
$('.btnDeletePath', elem).on('click', function () {
|
||||
|
||||
remove(page, parseInt(this.getAttribute('data-index')));
|
||||
});
|
||||
}
|
||||
|
||||
function loadPage(page, config) {
|
||||
|
||||
currentConfig = config;
|
||||
|
||||
reloadPathMappings(page, config);
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function reload(page) {
|
||||
|
||||
$('#txtFrom', page).val('');
|
||||
$('#txtTo', page).val('');
|
||||
|
||||
ApiClient.getServerConfiguration().then(function (config) {
|
||||
|
||||
loadPage(page, config);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var form = this;
|
||||
var page = $(form).parents('.page');
|
||||
|
||||
ApiClient.getServerConfiguration().then(function (config) {
|
||||
|
||||
addSubstitution(page, config);
|
||||
ApiClient.updateServerConfiguration(config).then(function () {
|
||||
|
||||
reload(page);
|
||||
});
|
||||
});
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
}
|
||||
|
||||
function getTabs() {
|
||||
return [
|
||||
{
|
||||
href: 'library.html',
|
||||
name: Globalize.translate('HeaderLibraries')
|
||||
},
|
||||
{
|
||||
href: 'librarydisplay.html',
|
||||
name: Globalize.translate('TabDisplay')
|
||||
},
|
||||
{
|
||||
href: 'librarypathmapping.html',
|
||||
name: Globalize.translate('TabPathSubstitution')
|
||||
},
|
||||
{
|
||||
href: 'librarysettings.html',
|
||||
name: Globalize.translate('TabAdvanced')
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
$(document).on('pageinit', "#libraryPathMappingPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.libraryPathMappingForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||
|
||||
}).on('pageshow', "#libraryPathMappingPage", function () {
|
||||
|
||||
LibraryMenu.setTabs('librarysetup', 2, getTabs);
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getServerConfiguration().then(function (config) {
|
||||
|
||||
loadPage(page, config);
|
||||
|
||||
});
|
||||
|
||||
}).on('pagebeforehide', "#libraryPathMappingPage", function () {
|
||||
|
||||
currentConfig = null;
|
||||
|
||||
});
|
||||
|
||||
});
|
|
@ -443,10 +443,6 @@
|
|||
href: 'librarydisplay.html',
|
||||
name: Globalize.translate('TabDisplay')
|
||||
},
|
||||
{
|
||||
href: 'librarypathmapping.html',
|
||||
name: Globalize.translate('TabPathSubstitution')
|
||||
},
|
||||
{
|
||||
href: 'librarysettings.html',
|
||||
name: Globalize.translate('TabAdvanced')
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
page.querySelector('.chkDisplayUnairedEpisodes').checked = user.Configuration.DisplayUnairedEpisodes || false;
|
||||
|
||||
page.querySelector('#chkThemeSong').checked = userSettings.enableThemeSongs();
|
||||
page.querySelector('#selectBackdrop').value = appStorage.getItem('enableBackdrops-' + user.Id) || '';
|
||||
page.querySelector('#selectBackdrop').value = appStorage.getItem('enableBackdrops-' + user.Id) || '0';
|
||||
|
||||
page.querySelector('#selectLanguage').value = userSettings.language() || '';
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@
|
|||
|
||||
function getItemPromise() {
|
||||
|
||||
var id = params.genreId || params.studioId || params.artistId || params.parentId;
|
||||
var id = params.genreId || params.studioId || params.artistId || params.personId || params.parentId;
|
||||
|
||||
if (id) {
|
||||
return ApiClient.getItem(Dashboard.getCurrentUserId(), id);
|
||||
|
|
|
@ -466,7 +466,7 @@ var Dashboard = {
|
|||
divider: true,
|
||||
name: Globalize.translate('TabLibrary'),
|
||||
href: "library.html",
|
||||
pageIds: ['mediaLibraryPage', 'libraryPathMappingPage', 'librarySettingsPage', 'libraryDisplayPage'],
|
||||
pageIds: ['mediaLibraryPage', 'librarySettingsPage', 'libraryDisplayPage'],
|
||||
icon: 'folder',
|
||||
color: '#38c'
|
||||
}, {
|
||||
|
@ -821,7 +821,7 @@ var Dashboard = {
|
|||
if (enableVlcAudio) {
|
||||
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus,flac",
|
||||
Container: "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus,flac,m4a",
|
||||
Type: 'Audio'
|
||||
});
|
||||
|
||||
|
@ -2130,13 +2130,6 @@ var AppInfo = {};
|
|||
controller: 'dashboard/librarydisplay'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/librarypathmapping.html',
|
||||
dependencies: [],
|
||||
autoFocus: false,
|
||||
roles: 'admin'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/librarysettings.html',
|
||||
dependencies: ['emby-collapse', 'emby-input', 'emby-button', 'emby-select'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue