1
0
Fork 0
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:
Luke Pulverenti 2016-12-06 03:24:29 -05:00
parent b162cf30c5
commit da237475f0
18 changed files with 34 additions and 217 deletions

View file

@ -16,12 +16,12 @@
}, },
"devDependencies": {}, "devDependencies": {},
"ignore": [], "ignore": [],
"version": "1.1.95", "version": "1.1.96",
"_release": "1.1.95", "_release": "1.1.96",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "1.1.95", "tag": "1.1.96",
"commit": "e8acc2b7fb936b9e8d54a1eda726a16806258639" "commit": "d510fead0ace4166990b22f3f6c9fa0deb537bed"
}, },
"_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
"_target": "^1.1.51", "_target": "^1.1.51",

View file

@ -216,7 +216,7 @@
return connectUser; return connectUser;
}; };
var minServerVersion = '3.0.7000'; var minServerVersion = '3.0.7300';
self.minServerVersion = function (val) { self.minServerVersion = function (val) {
if (val) { if (val) {

View file

@ -60,8 +60,10 @@
if (contentType == 'tvshows') { if (contentType == 'tvshows') {
parent.querySelector('.chkImportMissingEpisodesContainer').classList.remove('hide'); parent.querySelector('.chkImportMissingEpisodesContainer').classList.remove('hide');
parent.querySelector('.chkAutomaticallyGroupSeriesContainer').classList.remove('hide');
} else { } else {
parent.querySelector('.chkImportMissingEpisodesContainer').classList.add('hide'); parent.querySelector('.chkImportMissingEpisodesContainer').classList.add('hide');
parent.querySelector('.chkAutomaticallyGroupSeriesContainer').classList.add('hide');
} }
} }
@ -76,7 +78,8 @@
DownloadImagesInAdvance: parent.querySelector('#chkDownloadImagesInAdvance').checked, DownloadImagesInAdvance: parent.querySelector('#chkDownloadImagesInAdvance').checked,
EnableInternetProviders: parent.querySelector('#chkEnableInternetProviders').checked, EnableInternetProviders: parent.querySelector('#chkEnableInternetProviders').checked,
ImportMissingEpisodes: parent.querySelector('#chkImportMissingEpisodes').checked, ImportMissingEpisodes: parent.querySelector('#chkImportMissingEpisodes').checked,
SaveLocalMetadata: parent.querySelector('#chkSaveLocal').checked SaveLocalMetadata: parent.querySelector('#chkSaveLocal').checked,
EnableAutomaticSeriesGrouping: parent.querySelector('.chkAutomaticallyGroupSeries').checked
}; };
return options; return options;
@ -93,6 +96,7 @@
parent.querySelector('#chkEnableInternetProviders').checked = options.EnableInternetProviders; parent.querySelector('#chkEnableInternetProviders').checked = options.EnableInternetProviders;
parent.querySelector('#chkSaveLocal').checked = options.SaveLocalMetadata; parent.querySelector('#chkSaveLocal').checked = options.SaveLocalMetadata;
parent.querySelector('#chkImportMissingEpisodes').checked = options.ImportMissingEpisodes; parent.querySelector('#chkImportMissingEpisodes').checked = options.ImportMissingEpisodes;
parent.querySelector('.chkAutomaticallyGroupSeries').checked = options.EnableAutomaticSeriesGrouping;
} }
return { return {

View file

@ -68,3 +68,11 @@
</label> </label>
<div class="fieldDescription checkboxFieldDescription">${OptionDetectArchiveFilesAsMediaHelp}</div> <div class="fieldDescription checkboxFieldDescription">${OptionDetectArchiveFilesAsMediaHelp}</div>
</div> </div>
<div class="checkboxContainer checkboxContainer-withDescription chkAutomaticallyGroupSeriesContainer hide">
<label>
<input type="checkbox" is="emby-checkbox" class="chkAutomaticallyGroupSeries" />
<span>${OptionAutomaticallyGroupSeries}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${OptionAutomaticallyGroupSeriesHelp}</div>
</div>

View file

@ -107,7 +107,7 @@
}, function () { }, function () {
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
Dashboard.alert({ Dashboard.alert({
message: Globalize.translate('ErrorAddingListingsToSchedulesDirect') message: Globalize.translate('ErrorAddingXmlTvFile')
}); });
}); });

View file

@ -11,10 +11,6 @@
href: 'librarydisplay.html', href: 'librarydisplay.html',
name: globalize.translate('TabDisplay') name: globalize.translate('TabDisplay')
}, },
{
href: 'librarypathmapping.html',
name: globalize.translate('TabPathSubstitution')
},
{ {
href: 'librarysettings.html', href: 'librarysettings.html',
name: globalize.translate('TabAdvanced') name: globalize.translate('TabAdvanced')

View file

@ -87,10 +87,6 @@
href: 'librarydisplay.html', href: 'librarydisplay.html',
name: Globalize.translate('TabDisplay') name: Globalize.translate('TabDisplay')
}, },
{
href: 'librarypathmapping.html',
name: Globalize.translate('TabPathSubstitution')
},
{ {
href: 'librarysettings.html', href: 'librarysettings.html',
name: Globalize.translate('TabAdvanced') name: Globalize.translate('TabAdvanced')

View file

@ -1,22 +0,0 @@
<div id="libraryPathMappingPage" data-role="page" class="page type-interior librarySectionPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Library%20setup" data-require="scripts/librarypathmapping">
<div data-role="content">
<div class="content-primary">
<div class="readOnlyContent">
<p>${PathSubstitutionHelp}</p>
<div class="pathSubstitutions"></div>
</div>
<br />
<p>
Path Substitutions can no longer be added. This feature is being replaced by the network share setup.
</p>
<p>
To configure network shares, edit an existing media library, then click on one of the existing folders. You'll then be able to map a network path to a library path.
</p>
</div>
</div>
</div>

View file

@ -32,7 +32,6 @@
</label> </label>
<div class="fieldDescription checkboxFieldDescription"> <div class="fieldDescription checkboxFieldDescription">
<div>${LabelKodiMetadataEnablePathSubstitutionHelp}</div> <div>${LabelKodiMetadataEnablePathSubstitutionHelp}</div>
<div style="margin-top: .5em;"><a href="librarypathmapping.html">${LabelKodiMetadataEnablePathSubstitutionHelp2}</a></div>
</div> </div>
</div> </div>
<div class="checkboxContainer checkboxContainer-withDescription"> <div class="checkboxContainer checkboxContainer-withDescription">

View file

@ -58,7 +58,7 @@
<div class="fldEnableBackdrops selectContainer"> <div class="fldEnableBackdrops selectContainer">
<select id="selectBackdrop" is="emby-select" label="${LabelEnableBackdrops}"> <select id="selectBackdrop" is="emby-select" label="${LabelEnableBackdrops}">
<option value="1">${OptionYes}</option> <option value="1">${OptionYes}</option>
<option value="">${OptionNo}</option> <option value="0">${OptionNo}</option>
</select> </select>
<div class="fieldDescription">${LabelEnableBackdropsHelp}</div> <div class="fieldDescription">${LabelEnableBackdropsHelp}</div>
</div> </div>

View file

@ -332,6 +332,10 @@
return 'secondaryitems.html?type=' + type + '&artistId=' + item.Id; 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; return 'secondaryitems.html?type=' + type + '&parentId=' + item.Id;
} }

View file

@ -119,7 +119,7 @@
if (dom.getWindowSize().innerWidth >= 800) { if (dom.getWindowSize().innerWidth >= 800) {
backdrop.setBackdrops([item], { backdrop.setBackdrops([item], {
blur: 30 blur: 27
}, false); }, false);
} else { } else {
backdrop.clear(); backdrop.clear();

View file

@ -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;
});
});

View file

@ -443,10 +443,6 @@
href: 'librarydisplay.html', href: 'librarydisplay.html',
name: Globalize.translate('TabDisplay') name: Globalize.translate('TabDisplay')
}, },
{
href: 'librarypathmapping.html',
name: Globalize.translate('TabPathSubstitution')
},
{ {
href: 'librarysettings.html', href: 'librarysettings.html',
name: Globalize.translate('TabAdvanced') name: Globalize.translate('TabAdvanced')

View file

@ -15,7 +15,7 @@
page.querySelector('.chkDisplayUnairedEpisodes').checked = user.Configuration.DisplayUnairedEpisodes || false; page.querySelector('.chkDisplayUnairedEpisodes').checked = user.Configuration.DisplayUnairedEpisodes || false;
page.querySelector('#chkThemeSong').checked = userSettings.enableThemeSongs(); 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() || ''; page.querySelector('#selectLanguage').value = userSettings.language() || '';

View file

@ -223,7 +223,7 @@
function getItemPromise() { 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) { if (id) {
return ApiClient.getItem(Dashboard.getCurrentUserId(), id); return ApiClient.getItem(Dashboard.getCurrentUserId(), id);

View file

@ -466,7 +466,7 @@ var Dashboard = {
divider: true, divider: true,
name: Globalize.translate('TabLibrary'), name: Globalize.translate('TabLibrary'),
href: "library.html", href: "library.html",
pageIds: ['mediaLibraryPage', 'libraryPathMappingPage', 'librarySettingsPage', 'libraryDisplayPage'], pageIds: ['mediaLibraryPage', 'librarySettingsPage', 'libraryDisplayPage'],
icon: 'folder', icon: 'folder',
color: '#38c' color: '#38c'
}, { }, {
@ -821,7 +821,7 @@ var Dashboard = {
if (enableVlcAudio) { if (enableVlcAudio) {
profile.DirectPlayProfiles.push({ 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' Type: 'Audio'
}); });
@ -2130,13 +2130,6 @@ var AppInfo = {};
controller: 'dashboard/librarydisplay' controller: 'dashboard/librarydisplay'
}); });
defineRoute({
path: '/librarypathmapping.html',
dependencies: [],
autoFocus: false,
roles: 'admin'
});
defineRoute({ defineRoute({
path: '/librarysettings.html', path: '/librarysettings.html',
dependencies: ['emby-collapse', 'emby-input', 'emby-button', 'emby-select'], dependencies: ['emby-collapse', 'emby-input', 'emby-button', 'emby-select'],

View file

@ -1208,7 +1208,7 @@
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically", "OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
"OptionDownloadImagesInAdvance": "Download images in advance", "OptionDownloadImagesInAdvance": "Download images in advance",
"SettingsSaved": "Settings saved.", "SettingsSaved": "Settings saved.",
"OptionDownloadImagesInAdvanceHelp": "By default, most images are only downloaded when requested by an Emby app. Enable this option to download all images in advance, as new media is imported.", "OptionDownloadImagesInAdvanceHelp": "By default, most images are only downloaded when requested by an Emby app. Enable this option to download all images in advance, as new media is imported. This may cause significantly longer library scans.",
"Users": "Users", "Users": "Users",
"Delete": "Delete", "Delete": "Delete",
"Password": "Password", "Password": "Password",
@ -1942,5 +1942,8 @@
"HeaderRecordingPostProcessing": "Recording Post Processing", "HeaderRecordingPostProcessing": "Recording Post Processing",
"LabelPostProcessorArguments": "Post-processor command line arguments:", "LabelPostProcessorArguments": "Post-processor command line arguments:",
"LabelPostProcessorArgumentsHelp": "Use {path} as the path to the recording file.", "LabelPostProcessorArgumentsHelp": "Use {path} as the path to the recording file.",
"LabelPostProcessor": "Post-processing application:" "LabelPostProcessor": "Post-processing application:",
"ErrorAddingXmlTvFile": "There was an error accessing the XmlTV file. Please ensure the file exists and try again.",
"OptionAutomaticallyGroupSeries": "Automatically merge series that are spread across multiple folders",
"OptionAutomaticallyGroupSeriesHelp": "If enabled, series that are spread across multiple folders within this library will be automatically merged into a single series."
} }