mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
Merge pull request #313 from dkanada/library
Improve the library page and dialog UX
This commit is contained in:
commit
0f075fe6c4
@ -3,146 +3,258 @@ define(["globalize", "dom", "emby-checkbox", "emby-select", "emby-input"], funct
|
||||
|
||||
function populateLanguages(parent) {
|
||||
return ApiClient.getCultures().then(function(languages) {
|
||||
populateLanguagesIntoSelect(parent.querySelector("#selectLanguage"), languages), populateLanguagesIntoList(parent.querySelector(".subtitleDownloadLanguages"), languages)
|
||||
})
|
||||
populateLanguagesIntoSelect(parent.querySelector("#selectLanguage"), languages);
|
||||
populateLanguagesIntoList(parent.querySelector(".subtitleDownloadLanguages"), languages);
|
||||
});
|
||||
}
|
||||
|
||||
function populateLanguagesIntoSelect(select, languages) {
|
||||
var html = "";
|
||||
html += "<option value=''></option>";
|
||||
for (var i = 0, length = languages.length; i < length; i++) {
|
||||
for (var i = 0; i < languages.length; i++) {
|
||||
var culture = languages[i];
|
||||
html += "<option value='" + culture.TwoLetterISOLanguageName + "'>" + culture.DisplayName + "</option>"
|
||||
html += "<option value='" + culture.TwoLetterISOLanguageName + "'>" + culture.DisplayName + "</option>";
|
||||
}
|
||||
select.innerHTML = html
|
||||
select.innerHTML = html;
|
||||
}
|
||||
|
||||
function populateLanguagesIntoList(element, languages) {
|
||||
for (var html = "", i = 0, length = languages.length; i < length; i++) {
|
||||
var html = "";
|
||||
for (var i = 0; i < languages.length; i++) {
|
||||
var culture = languages[i];
|
||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkSubtitleLanguage" data-lang="' + culture.ThreeLetterISOLanguageName.toLowerCase() + '" /><span>' + culture.DisplayName + "</span></label>"
|
||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkSubtitleLanguage" data-lang="' + culture.ThreeLetterISOLanguageName.toLowerCase() + '" /><span>' + culture.DisplayName + "</span></label>";
|
||||
}
|
||||
element.innerHTML = html
|
||||
element.innerHTML = html;
|
||||
}
|
||||
|
||||
function populateCountries(select) {
|
||||
return ApiClient.getCountries().then(function(allCountries) {
|
||||
var html = "";
|
||||
html += "<option value=''></option>";
|
||||
for (var i = 0, length = allCountries.length; i < length; i++) {
|
||||
for (var i = 0; i < allCountries.length; i++) {
|
||||
var culture = allCountries[i];
|
||||
html += "<option value='" + culture.TwoLetterISORegionName + "'>" + culture.DisplayName + "</option>"
|
||||
html += "<option value='" + culture.TwoLetterISORegionName + "'>" + culture.DisplayName + "</option>";
|
||||
}
|
||||
select.innerHTML = html
|
||||
select.innerHTML = html;
|
||||
})
|
||||
}
|
||||
|
||||
function populateRefreshInterval(select) {
|
||||
var html = "";
|
||||
html += "<option value='0'>" + globalize.translate("Never") + "</option>", html += [30, 60, 90].map(function(val) {
|
||||
return "<option value='" + val + "'>" + globalize.translate("EveryNDays", val) + "</option>"
|
||||
}).join(""), select.innerHTML = html
|
||||
html += "<option value='0'>" + globalize.translate("Never") + "</option>";
|
||||
html += [30, 60, 90].map(function(val) {
|
||||
return "<option value='" + val + "'>" + globalize.translate("EveryNDays", val) + "</option>";
|
||||
}).join("");
|
||||
select.innerHTML = html;
|
||||
}
|
||||
|
||||
function renderMetadataReaders(page, plugins) {
|
||||
var html = "",
|
||||
elem = page.querySelector(".metadataReaders");
|
||||
var html = "";
|
||||
var elem = page.querySelector(".metadataReaders");
|
||||
|
||||
if (plugins.length < 1) return elem.innerHTML = "", elem.classList.add("hide"), !1;
|
||||
html += '<h3 class="checkboxListLabel">' + globalize.translate("LabelMetadataReaders") + "</h3>", html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||
for (var i = 0, length = plugins.length; i < length; i++) {
|
||||
html += '<h3 class="checkboxListLabel">' + globalize.translate("LabelMetadataReaders") + "</h3>";
|
||||
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||
for (var i = 0; i < plugins.length; i++) {
|
||||
var plugin = plugins[i];
|
||||
html += '<div class="listItem localReaderOption sortableOption" data-pluginname="' + plugin.Name + '">', html += '<i class="listItemIcon md-icon">live_tv</i>', html += '<div class="listItemBody">', html += '<h3 class="listItemBodyText">', html += plugin.Name, html += "</h3>", html += "</div>", i > 0 ? html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonUp") + '" class="btnSortableMoveUp btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_up</i></button>' : plugins.length > 1 && (html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonDown") + '" class="btnSortableMoveDown btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_down</i></button>'), html += "</div>"
|
||||
html += '<div class="listItem localReaderOption sortableOption" data-pluginname="' + plugin.Name + '">';
|
||||
html += '<i class="listItemIcon md-icon">live_tv</i>';
|
||||
html += '<div class="listItemBody">';
|
||||
html += '<h3 class="listItemBodyText">';
|
||||
html += plugin.Name;
|
||||
html += "</h3>";
|
||||
html += "</div>";
|
||||
if (i > 0) {
|
||||
html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonUp") + '" class="btnSortableMoveUp btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_up</i></button>';
|
||||
} else if (plugins.length > 1) {
|
||||
html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonDown") + '" class="btnSortableMoveDown btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_down</i></button>';
|
||||
}
|
||||
html += "</div>";
|
||||
}
|
||||
return html += "</div>", html += '<div class="fieldDescription">' + globalize.translate("LabelMetadataReadersHelp") + "</div>", plugins.length < 2 ? elem.classList.add("hide") : elem.classList.remove("hide"), elem.innerHTML = html, !0
|
||||
html += "</div>";
|
||||
html += '<div class="fieldDescription">' + globalize.translate("LabelMetadataReadersHelp") + "</div>";
|
||||
if (plugins.length < 2) {
|
||||
elem.classList.add("hide");
|
||||
} else {
|
||||
elem.classList.remove("hide");
|
||||
}
|
||||
elem.innerHTML = html;
|
||||
return true;
|
||||
}
|
||||
|
||||
function renderMetadataSavers(page, metadataSavers) {
|
||||
var html = "",
|
||||
elem = page.querySelector(".metadataSavers");
|
||||
if (!metadataSavers.length) return elem.innerHTML = "", elem.classList.add("hide"), !1;
|
||||
html += '<h3 class="checkboxListLabel">' + globalize.translate("LabelMetadataSavers") + "</h3>", html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||
for (var i = 0, length = metadataSavers.length; i < length; i++) {
|
||||
var html = "";
|
||||
var elem = page.querySelector(".metadataSavers");
|
||||
if (!metadataSavers.length) return elem.innerHTML = "", elem.classList.add("hide"), false;
|
||||
html += '<h3 class="checkboxListLabel">' + globalize.translate("LabelMetadataSavers") + "</h3>";
|
||||
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||
for (var i = 0; i < metadataSavers.length; i++) {
|
||||
var plugin = metadataSavers[i];
|
||||
html += '<label><input type="checkbox" data-defaultenabled="' + plugin.DefaultEnabled + '" is="emby-checkbox" class="chkMetadataSaver" data-pluginname="' + plugin.Name + '" ' + !1 + "><span>" + plugin.Name + "</span></label>"
|
||||
html += '<label><input type="checkbox" data-defaultenabled="' + plugin.DefaultEnabled + '" is="emby-checkbox" class="chkMetadataSaver" data-pluginname="' + plugin.Name + '" ' + false + "><span>" + plugin.Name + "</span></label>";
|
||||
}
|
||||
return html += "</div>", html += '<div class="fieldDescription" style="margin-top:.25em;">' + globalize.translate("LabelMetadataSaversHelp") + "</div>", elem.innerHTML = html, elem.classList.remove("hide"), !0
|
||||
html += "</div>";
|
||||
html += '<div class="fieldDescription" style="margin-top:.25em;">' + globalize.translate("LabelMetadataSaversHelp") + "</div>";
|
||||
elem.innerHTML = html;
|
||||
elem.classList.remove("hide");
|
||||
return true;
|
||||
}
|
||||
|
||||
function getMetadataFetchersForTypeHtml(availableTypeOptions, libraryOptionsForType) {
|
||||
var html = "",
|
||||
plugins = availableTypeOptions.MetadataFetchers;
|
||||
if (plugins = getOrderedPlugins(plugins, libraryOptionsForType.MetadataFetcherOrder || []), !plugins.length) return html;
|
||||
html += '<div class="metadataFetcher" data-type="' + availableTypeOptions.Type + '">', html += '<h3 class="checkboxListLabel">' + globalize.translate("LabelTypeMetadataDownloaders", availableTypeOptions.Type) + "</h3>", html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||
for (var i = 0, length = plugins.length; i < length; i++) {
|
||||
var html = "";
|
||||
var plugins = availableTypeOptions.MetadataFetchers;
|
||||
|
||||
plugins = getOrderedPlugins(plugins, libraryOptionsForType.MetadataFetcherOrder || []);
|
||||
if (!plugins.length) return html;
|
||||
|
||||
html += '<div class="metadataFetcher" data-type="' + availableTypeOptions.Type + '">';
|
||||
html += '<h3 class="checkboxListLabel">' + globalize.translate("LabelTypeMetadataDownloaders", availableTypeOptions.Type) + "</h3>";
|
||||
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||
for (var i = 0; i < plugins.length; i++) {
|
||||
var plugin = plugins[i];
|
||||
html += '<div class="listItem metadataFetcherItem sortableOption" data-pluginname="' + plugin.Name + '">';
|
||||
var isChecked = libraryOptionsForType.MetadataFetchers ? -1 !== libraryOptionsForType.MetadataFetchers.indexOf(plugin.Name) : plugin.DefaultEnabled,
|
||||
checkedHtml = isChecked ? ' checked="checked"' : "";
|
||||
html += '<label class="listItemCheckboxContainer"><input type="checkbox" is="emby-checkbox" class="chkMetadataFetcher" data-pluginname="' + plugin.Name + '" ' + checkedHtml + "><span></span></label>", html += '<div class="listItemBody">', html += '<h3 class="listItemBodyText">', html += plugin.Name, html += "</h3>", html += "</div>", i > 0 ? html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonUp") + '" class="btnSortableMoveUp btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_up</i></button>' : plugins.length > 1 && (html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonDown") + '" class="btnSortableMoveDown btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_down</i></button>'), html += "</div>"
|
||||
var isChecked = libraryOptionsForType.MetadataFetchers ? -1 !== libraryOptionsForType.MetadataFetchers.indexOf(plugin.Name) : plugin.DefaultEnabled;
|
||||
var checkedHtml = isChecked ? ' checked="checked"' : "";
|
||||
html += '<label class="listItemCheckboxContainer"><input type="checkbox" is="emby-checkbox" class="chkMetadataFetcher" data-pluginname="' + plugin.Name + '" ' + checkedHtml + "><span></span></label>";
|
||||
html += '<div class="listItemBody">';
|
||||
html += '<h3 class="listItemBodyText">';
|
||||
html += plugin.Name;
|
||||
html += "</h3>";
|
||||
html += "</div>";
|
||||
i > 0 ? html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonUp") + '" class="btnSortableMoveUp btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_up</i></button>' : plugins.length > 1 && (html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonDown") + '" class="btnSortableMoveDown btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_down</i></button>'), html += "</div>"
|
||||
}
|
||||
return html += "</div>", html += '<div class="fieldDescription">' + globalize.translate("LabelMetadataDownloadersHelp") + "</div>", html += "</div>"
|
||||
html += "</div>";
|
||||
html += '<div class="fieldDescription">' + globalize.translate("LabelMetadataDownloadersHelp") + "</div>";
|
||||
html += "</div>";
|
||||
return html;
|
||||
}
|
||||
|
||||
function getTypeOptions(allOptions, type) {
|
||||
for (var allTypeOptions = allOptions.TypeOptions || [], i = 0, length = allTypeOptions.length; i < length; i++) {
|
||||
var allTypeOptions = allOptions.TypeOptions || [];
|
||||
for (var i = 0; i < allTypeOptions.length; i++) {
|
||||
var typeOptions = allTypeOptions[i];
|
||||
if (typeOptions.Type === type) return typeOptions
|
||||
if (typeOptions.Type === type) return typeOptions;
|
||||
}
|
||||
return null
|
||||
return null;
|
||||
}
|
||||
|
||||
function renderMetadataFetchers(page, availableOptions, libraryOptions) {
|
||||
for (var html = "", elem = page.querySelector(".metadataFetchers"), i = 0, length = availableOptions.TypeOptions.length; i < length; i++) {
|
||||
var html = "";
|
||||
var elem = page.querySelector(".metadataFetchers");
|
||||
for (var i = 0; i < availableOptions.TypeOptions.length; i++) {
|
||||
var availableTypeOptions = availableOptions.TypeOptions[i];
|
||||
html += getMetadataFetchersForTypeHtml(availableTypeOptions, getTypeOptions(libraryOptions, availableTypeOptions.Type) || {})
|
||||
html += getMetadataFetchersForTypeHtml(availableTypeOptions, getTypeOptions(libraryOptions, availableTypeOptions.Type) || {});
|
||||
}
|
||||
return elem.innerHTML = html, html ? (elem.classList.remove("hide"), page.querySelector(".fldAutoRefreshInterval").classList.remove("hide"), page.querySelector(".fldMetadataLanguage").classList.remove("hide"), page.querySelector(".fldMetadataCountry").classList.remove("hide")) : (elem.classList.add("hide"), page.querySelector(".fldAutoRefreshInterval").classList.add("hide"), page.querySelector(".fldMetadataLanguage").classList.add("hide"), page.querySelector(".fldMetadataCountry").classList.add("hide")), !0
|
||||
elem.innerHTML = html;
|
||||
if (html) {
|
||||
elem.classList.remove("hide");
|
||||
page.querySelector(".fldAutoRefreshInterval").classList.remove("hide");
|
||||
page.querySelector(".fldMetadataLanguage").classList.remove("hide");
|
||||
page.querySelector(".fldMetadataCountry").classList.remove("hide");
|
||||
} else {
|
||||
elem.classList.add("hide");
|
||||
page.querySelector(".fldAutoRefreshInterval").classList.add("hide");
|
||||
page.querySelector(".fldMetadataLanguage").classList.add("hide");
|
||||
page.querySelector(".fldMetadataCountry").classList.add("hide");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function renderSubtitleFetchers(page, availableOptions, libraryOptions) {
|
||||
try {
|
||||
var html = "",
|
||||
elem = page.querySelector(".subtitleFetchers"),
|
||||
html = "",
|
||||
plugins = availableOptions.SubtitleFetchers;
|
||||
if (plugins = getOrderedPlugins(plugins, libraryOptions.SubtitleFetcherOrder || []), !plugins.length) return html;
|
||||
html += '<h3 class="checkboxListLabel">' + globalize.translate("LabelSubtitleDownloaders") + "</h3>", html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||
for (var i = 0, length = plugins.length; i < length; i++) {
|
||||
var plugin = plugins[i];
|
||||
html += '<div class="listItem subtitleFetcherItem sortableOption" data-pluginname="' + plugin.Name + '">';
|
||||
var isChecked = libraryOptions.DisabledSubtitleFetchers ? -1 === libraryOptions.DisabledSubtitleFetchers.indexOf(plugin.Name) : plugin.DefaultEnabled,
|
||||
checkedHtml = isChecked ? ' checked="checked"' : "";
|
||||
html += '<label class="listItemCheckboxContainer"><input type="checkbox" is="emby-checkbox" class="chkSubtitleFetcher" data-pluginname="' + plugin.Name + '" ' + checkedHtml + "><span></span></label>", html += '<div class="listItemBody">', html += '<h3 class="listItemBodyText">', html += plugin.Name, html += "</h3>", "Open Subtitles" === plugin.Name && (html += '<div class="listItemBodyText secondary">', html += globalize.translate("OpenSubtitleInstructions"), html += "</div>"), html += "</div>", i > 0 ? html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonUp") + '" class="btnSortableMoveUp btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_up</i></button>' : plugins.length > 1 && (html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonDown") + '" class="btnSortableMoveDown btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_down</i></button>'), html += "</div>"
|
||||
var html = "";
|
||||
var elem = page.querySelector(".subtitleFetchers");
|
||||
|
||||
var plugins = availableOptions.SubtitleFetchers;
|
||||
plugins = getOrderedPlugins(plugins, libraryOptions.SubtitleFetcherOrder || []);
|
||||
if (!plugins.length) return html;
|
||||
|
||||
html += '<h3 class="checkboxListLabel">' + globalize.translate("LabelSubtitleDownloaders") + "</h3>";
|
||||
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||
for (var i = 0; i < plugins.length; i++) {
|
||||
var plugin = plugins[i];
|
||||
html += '<div class="listItem subtitleFetcherItem sortableOption" data-pluginname="' + plugin.Name + '">';
|
||||
var isChecked = libraryOptions.DisabledSubtitleFetchers ? -1 === libraryOptions.DisabledSubtitleFetchers.indexOf(plugin.Name) : plugin.DefaultEnabled;
|
||||
var checkedHtml = isChecked ? ' checked="checked"' : "";
|
||||
html += '<label class="listItemCheckboxContainer"><input type="checkbox" is="emby-checkbox" class="chkSubtitleFetcher" data-pluginname="' + plugin.Name + '" ' + checkedHtml + "><span></span></label>";
|
||||
html += '<div class="listItemBody">';
|
||||
html += '<h3 class="listItemBodyText">';
|
||||
html += plugin.Name;
|
||||
html += "</h3>";
|
||||
if (plugin.Name === "Open Subtitles") {
|
||||
html += '<div class="listItemBodyText secondary">';
|
||||
html += globalize.translate("OpenSubtitleInstructions");
|
||||
html += "</div>";
|
||||
}
|
||||
html += "</div>", html += '<div class="fieldDescription">' + globalize.translate("SubtitleDownloadersHelp") + "</div>", elem.innerHTML = html
|
||||
} catch (err) {
|
||||
alert(err)
|
||||
html += "</div>";
|
||||
if (i > 0) {
|
||||
html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonUp") + '" class="btnSortableMoveUp btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_up</i></button>';
|
||||
} else if (plugins.length > 1) {
|
||||
html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonDown") + '" class="btnSortableMoveDown btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_down</i></button>';
|
||||
}
|
||||
html += "</div>";
|
||||
}
|
||||
html += "</div>";
|
||||
html += '<div class="fieldDescription">' + globalize.translate("SubtitleDownloadersHelp") + "</div>";
|
||||
elem.innerHTML = html;
|
||||
}
|
||||
|
||||
function getImageFetchersForTypeHtml(availableTypeOptions, libraryOptionsForType) {
|
||||
var html = "",
|
||||
plugins = availableTypeOptions.ImageFetchers;
|
||||
if (plugins = getOrderedPlugins(plugins, libraryOptionsForType.ImageFetcherOrder || []), !plugins.length) return html;
|
||||
html += '<div class="imageFetcher" data-type="' + availableTypeOptions.Type + '">', html += '<div class="flex align-items-center" style="margin:1.5em 0 .5em;">', html += '<h3 class="checkboxListLabel" style="margin:0;">' + globalize.translate("HeaderTypeImageFetchers", availableTypeOptions.Type) + "</h3>";
|
||||
var html = "";
|
||||
var plugins = availableTypeOptions.ImageFetchers;
|
||||
|
||||
plugins = getOrderedPlugins(plugins, libraryOptionsForType.ImageFetcherOrder || []);
|
||||
if (!plugins.length) return html;
|
||||
|
||||
html += '<div class="imageFetcher" data-type="' + availableTypeOptions.Type + '">';
|
||||
html += '<div class="flex align-items-center" style="margin:1.5em 0 .5em;">';
|
||||
html += '<h3 class="checkboxListLabel" style="margin:0;">' + globalize.translate("HeaderTypeImageFetchers", availableTypeOptions.Type) + "</h3>";
|
||||
var supportedImageTypes = availableTypeOptions.SupportedImageTypes || [];
|
||||
(supportedImageTypes.length > 1 || 1 === supportedImageTypes.length && "Primary" !== supportedImageTypes[0]) && (html += '<button is="emby-button" class="raised btnImageOptionsForType" type="button" style="margin-left:1.5em;font-size:90%;"><span>' + globalize.translate("HeaderFetcherSettings") + "</span></button>"), html += "</div>", html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||
for (var i = 0, length = plugins.length; i < length; i++) {
|
||||
if (supportedImageTypes.length > 1 || 1 === supportedImageTypes.length && "Primary" !== supportedImageTypes[0]) {
|
||||
html += '<button is="emby-button" class="raised btnImageOptionsForType" type="button" style="margin-left:1.5em;font-size:90%;"><span>' + globalize.translate("HeaderFetcherSettings") + "</span></button>";
|
||||
}
|
||||
html += "</div>";
|
||||
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||
for (var i = 0; i < plugins.length; i++) {
|
||||
var plugin = plugins[i];
|
||||
html += '<div class="listItem imageFetcherItem sortableOption" data-pluginname="' + plugin.Name + '">';
|
||||
var isChecked = libraryOptionsForType.ImageFetchers ? -1 !== libraryOptionsForType.ImageFetchers.indexOf(plugin.Name) : plugin.DefaultEnabled,
|
||||
checkedHtml = isChecked ? ' checked="checked"' : "";
|
||||
html += '<label class="listItemCheckboxContainer"><input type="checkbox" is="emby-checkbox" class="chkImageFetcher" data-pluginname="' + plugin.Name + '" ' + checkedHtml + "><span></span></label>", html += '<div class="listItemBody">', html += '<h3 class="listItemBodyText">', html += plugin.Name, html += "</h3>", html += "</div>", i > 0 ? html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonUp") + '" class="btnSortableMoveUp btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_up</i></button>' : plugins.length > 1 && (html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonDown") + '" class="btnSortableMoveDown btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_down</i></button>'), html += "</div>"
|
||||
var isChecked = libraryOptionsForType.ImageFetchers ? -1 !== libraryOptionsForType.ImageFetchers.indexOf(plugin.Name) : plugin.DefaultEnabled;
|
||||
var checkedHtml = isChecked ? ' checked="checked"' : "";
|
||||
html += '<label class="listItemCheckboxContainer"><input type="checkbox" is="emby-checkbox" class="chkImageFetcher" data-pluginname="' + plugin.Name + '" ' + checkedHtml + "><span></span></label>";
|
||||
html += '<div class="listItemBody">';
|
||||
html += '<h3 class="listItemBodyText">';
|
||||
html += plugin.Name;
|
||||
html += "</h3>";
|
||||
html += "</div>";
|
||||
if (i > 0) {
|
||||
html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonUp") + '" class="btnSortableMoveUp btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_up</i></button>';
|
||||
} else if (plugins.length > 1) {
|
||||
html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonDown") + '" class="btnSortableMoveDown btnSortable" data-pluginindex="' + i + '"><i class="md-icon">keyboard_arrow_down</i></button>';
|
||||
}
|
||||
html += "</div>";
|
||||
}
|
||||
return html += "</div>", html += '<div class="fieldDescription">' + globalize.translate("LabelImageFetchersHelp") + "</div>", html += "</div>"
|
||||
html += "</div>";
|
||||
html += '<div class="fieldDescription">' + globalize.translate("LabelImageFetchersHelp") + "</div>";
|
||||
html += "</div>";
|
||||
return html;
|
||||
}
|
||||
|
||||
function renderImageFetchers(page, availableOptions, libraryOptions) {
|
||||
for (var html = "", elem = page.querySelector(".imageFetchers"), i = 0, length = availableOptions.TypeOptions.length; i < length; i++) {
|
||||
var html = "";
|
||||
var elem = page.querySelector(".imageFetchers");
|
||||
for (var i = 0; i < availableOptions.TypeOptions.length; i++) {
|
||||
var availableTypeOptions = availableOptions.TypeOptions[i];
|
||||
html += getImageFetchersForTypeHtml(availableTypeOptions, getTypeOptions(libraryOptions, availableTypeOptions.Type) || {})
|
||||
html += getImageFetchersForTypeHtml(availableTypeOptions, getTypeOptions(libraryOptions, availableTypeOptions.Type) || {});
|
||||
}
|
||||
return elem.innerHTML = html, html ? (elem.classList.remove("hide"), page.querySelector(".chkDownloadImagesInAdvanceContainer").classList.remove("hide"), page.querySelector(".chkSaveLocalContainer").classList.remove("hide")) : (elem.classList.add("hide"), page.querySelector(".chkDownloadImagesInAdvanceContainer").classList.add("hide"), page.querySelector(".chkSaveLocalContainer").classList.add("hide")), !0
|
||||
elem.innerHTML = html;
|
||||
if (html) {
|
||||
elem.classList.remove("hide");
|
||||
page.querySelector(".chkDownloadImagesInAdvanceContainer").classList.remove("hide");
|
||||
page.querySelector(".chkSaveLocalContainer").classList.remove("hide");
|
||||
} else {
|
||||
elem.classList.add("hide");
|
||||
page.querySelector(".chkDownloadImagesInAdvanceContainer").classList.add("hide");
|
||||
page.querySelector(".chkSaveLocalContainer").classList.add("hide");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function populateMetadataSettings(parent, contentType, isNewLibrary) {
|
||||
@ -151,15 +263,30 @@ define(["globalize", "dom", "emby-checkbox", "emby-select", "emby-input"], funct
|
||||
LibraryContentType: contentType,
|
||||
IsNewLibrary: isNewLibrary
|
||||
})).then(function(availableOptions) {
|
||||
currentAvailableOptions = availableOptions, parent.availableOptions = availableOptions, renderMetadataSavers(parent, availableOptions.MetadataSavers), renderMetadataReaders(parent, availableOptions.MetadataReaders), renderMetadataFetchers(parent, availableOptions, {}), renderSubtitleFetchers(parent, availableOptions, {}), renderImageFetchers(parent, availableOptions, {}), availableOptions.SubtitleFetchers.length ? parent.querySelector(".subtitleDownloadSettings").classList.remove("hide") : parent.querySelector(".subtitleDownloadSettings").classList.add("hide")
|
||||
currentAvailableOptions = availableOptions;
|
||||
parent.availableOptions = availableOptions;
|
||||
renderMetadataSavers(parent, availableOptions.MetadataSavers);
|
||||
renderMetadataReaders(parent, availableOptions.MetadataReaders);
|
||||
renderMetadataFetchers(parent, availableOptions, {});
|
||||
renderSubtitleFetchers(parent, availableOptions, {});
|
||||
renderImageFetchers(parent, availableOptions, {});
|
||||
availableOptions.SubtitleFetchers.length ? parent.querySelector(".subtitleDownloadSettings").classList.remove("hide") : parent.querySelector(".subtitleDownloadSettings").classList.add("hide")
|
||||
}).catch(function() {
|
||||
return Promise.resolve()
|
||||
return Promise.resolve();
|
||||
})
|
||||
}
|
||||
|
||||
function adjustSortableListElement(elem) {
|
||||
var btnSortable = elem.querySelector(".btnSortable");
|
||||
elem.previousSibling ? (btnSortable.classList.add("btnSortableMoveUp"), btnSortable.classList.remove("btnSortableMoveDown"), btnSortable.querySelector("i").innerHTML = "keyboard_arrow_up") : (btnSortable.classList.remove("btnSortableMoveUp"), btnSortable.classList.add("btnSortableMoveDown"), btnSortable.querySelector("i").innerHTML = "keyboard_arrow_down")
|
||||
if (elem.previousSibling) {
|
||||
btnSortable.classList.add("btnSortableMoveUp");
|
||||
btnSortable.classList.remove("btnSortableMoveDown");
|
||||
btnSortable.querySelector("i").innerHTML = "keyboard_arrow_up";
|
||||
} else {
|
||||
btnSortable.classList.remove("btnSortableMoveUp");
|
||||
btnSortable.classList.add("btnSortableMoveDown");
|
||||
btnSortable.querySelector("i").innerHTML = "keyboard_arrow_down";
|
||||
}
|
||||
}
|
||||
|
||||
function showImageOptionsForType(type) {
|
||||
@ -176,16 +303,16 @@ define(["globalize", "dom", "emby-checkbox", "emby-select", "emby-input"], funct
|
||||
function onImageFetchersContainerClick(e) {
|
||||
var btnImageOptionsForType = dom.parentWithClass(e.target, "btnImageOptionsForType");
|
||||
if (btnImageOptionsForType) {
|
||||
return void showImageOptionsForType(dom.parentWithClass(btnImageOptionsForType, "imageFetcher").getAttribute("data-type"))
|
||||
return void showImageOptionsForType(dom.parentWithClass(btnImageOptionsForType, "imageFetcher").getAttribute("data-type"));
|
||||
}
|
||||
onSortableContainerClick.call(this, e)
|
||||
onSortableContainerClick.call(this, e);
|
||||
}
|
||||
|
||||
function onSortableContainerClick(e) {
|
||||
var btnSortable = dom.parentWithClass(e.target, "btnSortable");
|
||||
if (btnSortable) {
|
||||
var li = dom.parentWithClass(btnSortable, "sortableOption"),
|
||||
list = dom.parentWithClass(li, "paperList");
|
||||
var li = dom.parentWithClass(btnSortable, "sortableOption");
|
||||
var list = dom.parentWithClass(li, "paperList");
|
||||
if (btnSortable.classList.contains("btnSortableMoveDown")) {
|
||||
var next = li.nextSibling;
|
||||
next && (li.parentNode.removeChild(li), next.parentNode.insertBefore(li, next.nextSibling))
|
||||
@ -198,35 +325,78 @@ define(["globalize", "dom", "emby-checkbox", "emby-select", "emby-input"], funct
|
||||
}
|
||||
|
||||
function bindEvents(parent) {
|
||||
parent.querySelector(".metadataReaders").addEventListener("click", onSortableContainerClick), parent.querySelector(".subtitleFetchers").addEventListener("click", onSortableContainerClick), parent.querySelector(".metadataFetchers").addEventListener("click", onSortableContainerClick), parent.querySelector(".imageFetchers").addEventListener("click", onImageFetchersContainerClick)
|
||||
parent.querySelector(".metadataReaders").addEventListener("click", onSortableContainerClick);
|
||||
parent.querySelector(".subtitleFetchers").addEventListener("click", onSortableContainerClick);
|
||||
parent.querySelector(".metadataFetchers").addEventListener("click", onSortableContainerClick);
|
||||
parent.querySelector(".imageFetchers").addEventListener("click", onImageFetchersContainerClick);
|
||||
}
|
||||
|
||||
function embed(parent, contentType, libraryOptions) {
|
||||
currentLibraryOptions = {
|
||||
TypeOptions: []
|
||||
}, currentAvailableOptions = null;
|
||||
var isNewLibrary = null == libraryOptions;
|
||||
return isNewLibrary && parent.classList.add("newlibrary"), new Promise(function(resolve, reject) {
|
||||
};
|
||||
currentAvailableOptions = null;
|
||||
var isNewLibrary = null === libraryOptions;
|
||||
isNewLibrary && parent.classList.add("newlibrary");
|
||||
return new Promise(function(resolve, reject) {
|
||||
var xhr = new XMLHttpRequest;
|
||||
xhr.open("GET", "components/libraryoptionseditor/libraryoptionseditor.template.html", !0), xhr.onload = function(e) {
|
||||
xhr.open("GET", "components/libraryoptionseditor/libraryoptionseditor.template.html", true);
|
||||
xhr.onload = function(e) {
|
||||
var template = this.response;
|
||||
parent.innerHTML = globalize.translateDocument(template), populateRefreshInterval(parent.querySelector("#selectAutoRefreshInterval"));
|
||||
parent.innerHTML = globalize.translateDocument(template);
|
||||
populateRefreshInterval(parent.querySelector("#selectAutoRefreshInterval"));
|
||||
var promises = [populateLanguages(parent), populateCountries(parent.querySelector("#selectCountry"))];
|
||||
Promise.all(promises).then(function() {
|
||||
return setContentType(parent, contentType).then(function() {
|
||||
libraryOptions && setLibraryOptions(parent, libraryOptions), bindEvents(parent), resolve()
|
||||
})
|
||||
})
|
||||
}, xhr.send()
|
||||
})
|
||||
libraryOptions && setLibraryOptions(parent, libraryOptions);
|
||||
bindEvents(parent);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
};
|
||||
xhr.send();
|
||||
});
|
||||
}
|
||||
|
||||
function setAdvancedVisible(parent, visible) {
|
||||
for (var elems = parent.querySelectorAll(".advanced"), i = 0, length = elems.length; i < length; i++) visible ? elems[i].classList.remove("advancedHide") : elems[i].classList.add("advancedHide")
|
||||
var elems = parent.querySelectorAll(".advanced");
|
||||
for (var i = 0; i < elems.length; i++) {
|
||||
visible ? elems[i].classList.remove("advancedHide") : elems[i].classList.add("advancedHide");
|
||||
}
|
||||
}
|
||||
|
||||
function setContentType(parent, contentType) {
|
||||
return "homevideos" === contentType || "photos" === contentType ? parent.querySelector(".chkEnablePhotosContainer").classList.remove("hide") : parent.querySelector(".chkEnablePhotosContainer").classList.add("hide"), "tvshows" !== contentType && "movies" !== contentType && "homevideos" !== contentType && "musicvideos" !== contentType && "mixed" !== contentType && contentType ? parent.querySelector(".chapterSettingsSection").classList.add("hide") : parent.querySelector(".chapterSettingsSection").classList.remove("hide"), "tvshows" === contentType ? (parent.querySelector(".chkImportMissingEpisodesContainer").classList.remove("hide"), parent.querySelector(".chkAutomaticallyGroupSeriesContainer").classList.remove("hide"), parent.querySelector(".fldSeasonZeroDisplayName").classList.remove("hide"), parent.querySelector("#txtSeasonZeroName").setAttribute("required", "required")) : (parent.querySelector(".chkImportMissingEpisodesContainer").classList.add("hide"), parent.querySelector(".chkAutomaticallyGroupSeriesContainer").classList.add("hide"), parent.querySelector(".fldSeasonZeroDisplayName").classList.add("hide"), parent.querySelector("#txtSeasonZeroName").removeAttribute("required")), "books" === contentType || "boxsets" === contentType || "playlists" === contentType || "music" === contentType ? parent.querySelector(".chkEnableEmbeddedTitlesContainer").classList.add("hide") : parent.querySelector(".chkEnableEmbeddedTitlesContainer").classList.remove("hide"), populateMetadataSettings(parent, contentType)
|
||||
if (contentType === "homevideos" || contentType === "photos") {
|
||||
parent.querySelector(".chkEnablePhotosContainer").classList.remove("hide");
|
||||
} else {
|
||||
parent.querySelector(".chkEnablePhotosContainer").classList.add("hide");
|
||||
}
|
||||
|
||||
if (contentType !== "tvshows" && contentType !== "movies" && contentType !== "homevideos" && contentType !== "musicvideos" && contentType !== "mixed") {
|
||||
parent.querySelector(".chapterSettingsSection").classList.add("hide");
|
||||
} else {
|
||||
parent.querySelector(".chapterSettingsSection").classList.remove("hide");
|
||||
}
|
||||
|
||||
if (contentType === "tvshows") {
|
||||
parent.querySelector(".chkImportMissingEpisodesContainer").classList.remove("hide");
|
||||
parent.querySelector(".chkAutomaticallyGroupSeriesContainer").classList.remove("hide");
|
||||
parent.querySelector(".fldSeasonZeroDisplayName").classList.remove("hide");
|
||||
parent.querySelector("#txtSeasonZeroName").setAttribute("required", "required");
|
||||
} else {
|
||||
parent.querySelector(".chkImportMissingEpisodesContainer").classList.add("hide");
|
||||
parent.querySelector(".chkAutomaticallyGroupSeriesContainer").classList.add("hide");
|
||||
parent.querySelector(".fldSeasonZeroDisplayName").classList.add("hide");
|
||||
parent.querySelector("#txtSeasonZeroName").removeAttribute("required");
|
||||
}
|
||||
|
||||
if (contentType === "books" || contentType === "boxsets" || contentType === "playlists" || contentType === "music") {
|
||||
parent.querySelector(".chkEnableEmbeddedTitlesContainer").classList.add("hide");
|
||||
} else {
|
||||
parent.querySelector(".chkEnableEmbeddedTitlesContainer").classList.remove("hide");
|
||||
}
|
||||
|
||||
return populateMetadataSettings(parent, contentType);
|
||||
}
|
||||
|
||||
function setSubtitleFetchersIntoOptions(parent, options) {
|
||||
@ -234,64 +404,87 @@ define(["globalize", "dom", "emby-checkbox", "emby-select", "emby-input"], funct
|
||||
return !elem.checked
|
||||
}), function(elem) {
|
||||
return elem.getAttribute("data-pluginname")
|
||||
}), options.SubtitleFetcherOrder = Array.prototype.map.call(parent.querySelectorAll(".subtitleFetcherItem"), function(elem) {
|
||||
});
|
||||
|
||||
options.SubtitleFetcherOrder = Array.prototype.map.call(parent.querySelectorAll(".subtitleFetcherItem"), function(elem) {
|
||||
return elem.getAttribute("data-pluginname")
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function setMetadataFetchersIntoOptions(parent, options) {
|
||||
for (var sections = parent.querySelectorAll(".metadataFetcher"), i = 0, length = sections.length; i < length; i++) {
|
||||
var section = sections[i],
|
||||
type = section.getAttribute("data-type"),
|
||||
typeOptions = getTypeOptions(options, type);
|
||||
typeOptions || (typeOptions = {
|
||||
Type: type
|
||||
}, options.TypeOptions.push(typeOptions)), typeOptions.MetadataFetchers = Array.prototype.map.call(Array.prototype.filter.call(section.querySelectorAll(".chkMetadataFetcher"), function(elem) {
|
||||
return elem.checked
|
||||
var sections = parent.querySelectorAll(".metadataFetcher");
|
||||
for (var i = 0; i < sections.length; i++) {
|
||||
var section = sections[i];
|
||||
var type = section.getAttribute("data-type");
|
||||
var typeOptions = getTypeOptions(options, type);
|
||||
if (!typeOptions) {
|
||||
typeOptions = {
|
||||
Type: type
|
||||
};
|
||||
options.TypeOptions.push(typeOptions);
|
||||
}
|
||||
typeOptions.MetadataFetchers = Array.prototype.map.call(Array.prototype.filter.call(section.querySelectorAll(".chkMetadataFetcher"), function(elem) {
|
||||
return elem.checked;
|
||||
}), function(elem) {
|
||||
return elem.getAttribute("data-pluginname")
|
||||
}), typeOptions.MetadataFetcherOrder = Array.prototype.map.call(section.querySelectorAll(".metadataFetcherItem"), function(elem) {
|
||||
return elem.getAttribute("data-pluginname")
|
||||
})
|
||||
return elem.getAttribute("data-pluginname");
|
||||
});
|
||||
|
||||
typeOptions.MetadataFetcherOrder = Array.prototype.map.call(section.querySelectorAll(".metadataFetcherItem"), function(elem) {
|
||||
return elem.getAttribute("data-pluginname");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function setImageFetchersIntoOptions(parent, options) {
|
||||
for (var sections = parent.querySelectorAll(".imageFetcher"), i = 0, length = sections.length; i < length; i++) {
|
||||
var section = sections[i],
|
||||
type = section.getAttribute("data-type"),
|
||||
typeOptions = getTypeOptions(options, type);
|
||||
typeOptions || (typeOptions = {
|
||||
Type: type
|
||||
}, options.TypeOptions.push(typeOptions)), typeOptions.ImageFetchers = Array.prototype.map.call(Array.prototype.filter.call(section.querySelectorAll(".chkImageFetcher"), function(elem) {
|
||||
var sections = parent.querySelectorAll(".imageFetcher");
|
||||
for (var i = 0; i < sections.length; i++) {
|
||||
var section = sections[i];
|
||||
var type = section.getAttribute("data-type");
|
||||
var typeOptions = getTypeOptions(options, type);
|
||||
if (!typeOptions) {
|
||||
typeOptions = {
|
||||
Type: type
|
||||
};
|
||||
options.TypeOptions.push(typeOptions);
|
||||
}
|
||||
|
||||
typeOptions.ImageFetchers = Array.prototype.map.call(Array.prototype.filter.call(section.querySelectorAll(".chkImageFetcher"), function(elem) {
|
||||
return elem.checked
|
||||
}), function(elem) {
|
||||
return elem.getAttribute("data-pluginname")
|
||||
}), typeOptions.ImageFetcherOrder = Array.prototype.map.call(section.querySelectorAll(".imageFetcherItem"), function(elem) {
|
||||
});
|
||||
|
||||
typeOptions.ImageFetcherOrder = Array.prototype.map.call(section.querySelectorAll(".imageFetcherItem"), function(elem) {
|
||||
return elem.getAttribute("data-pluginname")
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function setImageOptionsIntoOptions(parent, options) {
|
||||
for (var originalTypeOptions = (currentLibraryOptions || {}).TypeOptions || [], i = 0, length = originalTypeOptions.length; i < length; i++) {
|
||||
var originalTypeOption = originalTypeOptions[i],
|
||||
typeOptions = getTypeOptions(options, originalTypeOption.Type);
|
||||
typeOptions || (typeOptions = {
|
||||
Type: type
|
||||
}, options.TypeOptions.push(typeOptions)), originalTypeOption.ImageOptions && (typeOptions.ImageOptions = originalTypeOption.ImageOptions)
|
||||
var originalTypeOptions = (currentLibraryOptions || {}).TypeOptions || [];
|
||||
for (var i = 0; i < originalTypeOptions.length; i++) {
|
||||
var originalTypeOption = originalTypeOptions[i];
|
||||
var typeOptions = getTypeOptions(options, originalTypeOption.Type);
|
||||
|
||||
if (!typeOptions) {
|
||||
typeOptions = {
|
||||
Type: type
|
||||
};
|
||||
options.TypeOptions.push(typeOptions);
|
||||
}
|
||||
originalTypeOption.ImageOptions && (typeOptions.ImageOptions = originalTypeOption.ImageOptions);
|
||||
}
|
||||
}
|
||||
|
||||
function getLibraryOptions(parent) {
|
||||
var options = {
|
||||
EnableArchiveMediaFiles: !1,
|
||||
EnableArchiveMediaFiles: false,
|
||||
EnablePhotos: parent.querySelector(".chkEnablePhotos").checked,
|
||||
EnableRealtimeMonitor: parent.querySelector(".chkEnableRealtimeMonitor").checked,
|
||||
ExtractChapterImagesDuringLibraryScan: parent.querySelector(".chkExtractChaptersDuringLibraryScan").checked,
|
||||
EnableChapterImageExtraction: parent.querySelector(".chkExtractChapterImages").checked,
|
||||
DownloadImagesInAdvance: parent.querySelector("#chkDownloadImagesInAdvance").checked,
|
||||
EnableInternetProviders: !0,
|
||||
EnableInternetProviders: true,
|
||||
ImportMissingEpisodes: parent.querySelector("#chkImportMissingEpisodes").checked,
|
||||
SaveLocalMetadata: parent.querySelector("#chkSaveLocal").checked,
|
||||
EnableAutomaticSeriesGrouping: parent.querySelector(".chkAutomaticallyGroupSeries").checked,
|
||||
@ -311,29 +504,66 @@ define(["globalize", "dom", "emby-checkbox", "emby-select", "emby-input"], funct
|
||||
}),
|
||||
TypeOptions: []
|
||||
};
|
||||
return options.LocalMetadataReaderOrder = Array.prototype.map.call(parent.querySelectorAll(".localReaderOption"), function(elem) {
|
||||
|
||||
options.LocalMetadataReaderOrder = Array.prototype.map.call(parent.querySelectorAll(".localReaderOption"), function(elem) {
|
||||
return elem.getAttribute("data-pluginname")
|
||||
}), options.SubtitleDownloadLanguages = Array.prototype.map.call(Array.prototype.filter.call(parent.querySelectorAll(".chkSubtitleLanguage"), function(elem) {
|
||||
});
|
||||
options.SubtitleDownloadLanguages = Array.prototype.map.call(Array.prototype.filter.call(parent.querySelectorAll(".chkSubtitleLanguage"), function(elem) {
|
||||
return elem.checked
|
||||
}), function(elem) {
|
||||
return elem.getAttribute("data-lang")
|
||||
}), setSubtitleFetchersIntoOptions(parent, options), setMetadataFetchersIntoOptions(parent, options), setImageFetchersIntoOptions(parent, options), setImageOptionsIntoOptions(parent, options), options
|
||||
});
|
||||
setSubtitleFetchersIntoOptions(parent, options);
|
||||
setMetadataFetchersIntoOptions(parent, options);
|
||||
setImageFetchersIntoOptions(parent, options);
|
||||
setImageOptionsIntoOptions(parent, options);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
function getOrderedPlugins(plugins, configuredOrder) {
|
||||
return plugins = plugins.slice(0), plugins.sort(function(a, b) {
|
||||
plugins = plugins.slice(0);
|
||||
plugins.sort(function(a, b) {
|
||||
return a = configuredOrder.indexOf(a.Name), b = configuredOrder.indexOf(b.Name), a < b ? -1 : a > b ? 1 : 0
|
||||
}), plugins
|
||||
});
|
||||
return plugins;
|
||||
}
|
||||
|
||||
function setLibraryOptions(parent, options) {
|
||||
currentLibraryOptions = options, currentAvailableOptions = parent.availableOptions, parent.querySelector("#selectLanguage").value = options.PreferredMetadataLanguage || "", parent.querySelector("#selectCountry").value = options.MetadataCountryCode || "", parent.querySelector("#selectAutoRefreshInterval").value = options.AutomaticRefreshIntervalDays || "0", parent.querySelector("#txtSeasonZeroName").value = options.SeasonZeroDisplayName || "Specials", parent.querySelector(".chkEnablePhotos").checked = options.EnablePhotos, parent.querySelector(".chkEnableRealtimeMonitor").checked = options.EnableRealtimeMonitor, parent.querySelector(".chkExtractChaptersDuringLibraryScan").checked = options.ExtractChapterImagesDuringLibraryScan, parent.querySelector(".chkExtractChapterImages").checked = options.EnableChapterImageExtraction, parent.querySelector("#chkDownloadImagesInAdvance").checked = options.DownloadImagesInAdvance, parent.querySelector("#chkSaveLocal").checked = options.SaveLocalMetadata, parent.querySelector("#chkImportMissingEpisodes").checked = options.ImportMissingEpisodes, parent.querySelector(".chkAutomaticallyGroupSeries").checked = options.EnableAutomaticSeriesGrouping, parent.querySelector("#chkEnableEmbeddedTitles").checked = options.EnableEmbeddedTitles, parent.querySelector("#chkSkipIfGraphicalSubsPresent").checked = options.SkipSubtitlesIfEmbeddedSubtitlesPresent, parent.querySelector("#chkSaveSubtitlesLocally").checked = options.SaveSubtitlesWithMedia, parent.querySelector("#chkSkipIfAudioTrackPresent").checked = options.SkipSubtitlesIfAudioTrackMatches, parent.querySelector("#chkRequirePerfectMatch").checked = options.RequirePerfectSubtitleMatch, Array.prototype.forEach.call(parent.querySelectorAll(".chkMetadataSaver"), function(elem) {
|
||||
currentLibraryOptions = options;
|
||||
currentAvailableOptions = parent.availableOptions;
|
||||
parent.querySelector("#selectLanguage").value = options.PreferredMetadataLanguage || "";
|
||||
parent.querySelector("#selectCountry").value = options.MetadataCountryCode || "";
|
||||
parent.querySelector("#selectAutoRefreshInterval").value = options.AutomaticRefreshIntervalDays || "0";
|
||||
parent.querySelector("#txtSeasonZeroName").value = options.SeasonZeroDisplayName || "Specials";
|
||||
parent.querySelector(".chkEnablePhotos").checked = options.EnablePhotos;
|
||||
parent.querySelector(".chkEnableRealtimeMonitor").checked = options.EnableRealtimeMonitor;
|
||||
parent.querySelector(".chkExtractChaptersDuringLibraryScan").checked = options.ExtractChapterImagesDuringLibraryScan;
|
||||
parent.querySelector(".chkExtractChapterImages").checked = options.EnableChapterImageExtraction;
|
||||
parent.querySelector("#chkDownloadImagesInAdvance").checked = options.DownloadImagesInAdvance;
|
||||
parent.querySelector("#chkSaveLocal").checked = options.SaveLocalMetadata;
|
||||
parent.querySelector("#chkImportMissingEpisodes").checked = options.ImportMissingEpisodes;
|
||||
parent.querySelector(".chkAutomaticallyGroupSeries").checked = options.EnableAutomaticSeriesGrouping;
|
||||
parent.querySelector("#chkEnableEmbeddedTitles").checked = options.EnableEmbeddedTitles;
|
||||
parent.querySelector("#chkSkipIfGraphicalSubsPresent").checked = options.SkipSubtitlesIfEmbeddedSubtitlesPresent;
|
||||
parent.querySelector("#chkSaveSubtitlesLocally").checked = options.SaveSubtitlesWithMedia;
|
||||
parent.querySelector("#chkSkipIfAudioTrackPresent").checked = options.SkipSubtitlesIfAudioTrackMatches;
|
||||
parent.querySelector("#chkRequirePerfectMatch").checked = options.RequirePerfectSubtitleMatch;
|
||||
Array.prototype.forEach.call(parent.querySelectorAll(".chkMetadataSaver"), function(elem) {
|
||||
elem.checked = options.MetadataSavers ? -1 !== options.MetadataSavers.indexOf(elem.getAttribute("data-pluginname")) : "true" === elem.getAttribute("data-defaultenabled")
|
||||
}), Array.prototype.forEach.call(parent.querySelectorAll(".chkSubtitleLanguage"), function(elem) {
|
||||
});
|
||||
Array.prototype.forEach.call(parent.querySelectorAll(".chkSubtitleLanguage"), function(elem) {
|
||||
elem.checked = !!options.SubtitleDownloadLanguages && -1 !== options.SubtitleDownloadLanguages.indexOf(elem.getAttribute("data-lang"))
|
||||
}), renderMetadataReaders(parent, getOrderedPlugins(parent.availableOptions.MetadataReaders, options.LocalMetadataReaderOrder || [])), renderMetadataFetchers(parent, parent.availableOptions, options), renderImageFetchers(parent, parent.availableOptions, options), renderSubtitleFetchers(parent, parent.availableOptions, options)
|
||||
});
|
||||
renderMetadataReaders(parent, getOrderedPlugins(parent.availableOptions.MetadataReaders, options.LocalMetadataReaderOrder || []));
|
||||
renderMetadataFetchers(parent, parent.availableOptions, options);
|
||||
renderImageFetchers(parent, parent.availableOptions, options);
|
||||
renderSubtitleFetchers(parent, parent.availableOptions, options);
|
||||
}
|
||||
var currentLibraryOptions, currentAvailableOptions;
|
||||
|
||||
var currentLibraryOptions;
|
||||
var currentAvailableOptions;
|
||||
|
||||
return {
|
||||
embed: embed,
|
||||
setContentType: setContentType,
|
||||
|
@ -39,16 +39,21 @@
|
||||
|
||||
<div class="metadataReaders hide advanced" style="margin-bottom: 2em;">
|
||||
</div>
|
||||
|
||||
<div class="metadataFetchers hide" style="margin-bottom: 2em;">
|
||||
</div>
|
||||
|
||||
<div class="selectContainer fldAutoRefreshInterval hide advanced" style="margin: 2em 0;">
|
||||
<select is="emby-select" id="selectAutoRefreshInterval" label="${LabelAutomaticallyRefreshInternetMetadataEvery}"></select>
|
||||
<div class="fieldDescription">${MessageEnablingOptionLongerScans}</div>
|
||||
</div>
|
||||
|
||||
<div class="metadataSavers hide" style="margin-bottom: 2em;">
|
||||
</div>
|
||||
|
||||
<div class="imageFetchers hide advanced" style="margin-bottom: 2em;">
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription chkSaveLocalContainer hide">
|
||||
<label>
|
||||
<input is="emby-checkbox" type="checkbox" id="chkSaveLocal" />
|
||||
|
@ -1,10 +1,7 @@
|
||||
define(["loading", "dialogHelper", "dom", "jQuery", "components/libraryoptionseditor/libraryoptionseditor", "emby-toggle", "emby-input", "emby-select", "paper-icon-button-light", "listViewStyle", "formDialogStyle", "emby-button", "flexStyles"], function(loading, dialogHelper, dom, $, libraryoptionseditor) {
|
||||
"use strict";
|
||||
|
||||
function onSubmit(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
function onAddLibrary() {
|
||||
if (isCreating) return false;
|
||||
|
||||
if (pathInfos.length == 0) {
|
||||
@ -14,30 +11,30 @@ define(["loading", "dialogHelper", "dom", "jQuery", "components/libraryoptionsed
|
||||
type: "error"
|
||||
})
|
||||
});
|
||||
} else {
|
||||
isCreating = true;
|
||||
loading.show();
|
||||
|
||||
var form = this,
|
||||
dlg = $(form).parents(".dialog")[0],
|
||||
name = $("#txtValue", form).val(),
|
||||
type = $("#selectCollectionType", form).val();
|
||||
if (type == "mixed") type = null;
|
||||
var libraryOptions = libraryoptionseditor.getLibraryOptions(dlg.querySelector(".libraryOptions"));
|
||||
libraryOptions.PathInfos = pathInfos;
|
||||
ApiClient.addVirtualFolder(name, type, currentOptions.refresh, libraryOptions).then(function() {
|
||||
hasChanges = true;
|
||||
isCreating = false;
|
||||
loading.hide();
|
||||
dialogHelper.close(dlg);
|
||||
}, function() {
|
||||
require(["toast"], function(toast) {
|
||||
toast(Globalize.translate("ErrorAddingMediaPathToVirtualFolder"))
|
||||
})
|
||||
isCreating = false;
|
||||
loading.hide();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
isCreating = true;
|
||||
loading.show();
|
||||
|
||||
var dlg = dom.parentWithClass(this, "dlg-librarycreator");
|
||||
var name = $("#txtValue", dlg).val();
|
||||
var type = $("#selectCollectionType", dlg).val();
|
||||
if (type == "mixed") type = null;
|
||||
var libraryOptions = libraryoptionseditor.getLibraryOptions(dlg.querySelector(".libraryOptions"));
|
||||
libraryOptions.PathInfos = pathInfos;
|
||||
ApiClient.addVirtualFolder(name, type, currentOptions.refresh, libraryOptions).then(function() {
|
||||
hasChanges = true;
|
||||
isCreating = false;
|
||||
loading.hide();
|
||||
dialogHelper.close(dlg);
|
||||
}, function() {
|
||||
require(["toast"], function(toast) {
|
||||
toast(Globalize.translate("ErrorAddingMediaPathToVirtualFolder"));
|
||||
});
|
||||
isCreating = false;
|
||||
loading.hide();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -49,13 +46,14 @@ define(["loading", "dialogHelper", "dom", "jQuery", "components/libraryoptionsed
|
||||
|
||||
function initEditor(page, collectionTypeOptions) {
|
||||
$("#selectCollectionType", page).html(getCollectionTypeOptionsHtml(collectionTypeOptions)).val("").on("change", function() {
|
||||
var value = this.value,
|
||||
dlg = $(this).parents(".dialog")[0];
|
||||
var value = this.value;
|
||||
var dlg = $(this).parents(".dialog")[0];
|
||||
libraryoptionseditor.setContentType(dlg.querySelector(".libraryOptions"), value == "mixed" ? "" : value);
|
||||
if (value)
|
||||
if (value) {
|
||||
dlg.querySelector(".libraryOptions").classList.remove("hide");
|
||||
else
|
||||
} else {
|
||||
dlg.querySelector(".libraryOptions").classList.add("hide");
|
||||
}
|
||||
|
||||
if (value != "mixed") {
|
||||
var index = this.selectedIndex;
|
||||
@ -68,12 +66,17 @@ define(["loading", "dialogHelper", "dom", "jQuery", "components/libraryoptionsed
|
||||
$(".collectionTypeFieldDescription", dlg).html(folderOption.message || "")
|
||||
}
|
||||
}
|
||||
}), page.querySelector(".btnAddFolder").addEventListener("click", onAddButtonClick), page.querySelector("form").addEventListener("submit", onSubmit), page.querySelector(".folderList").addEventListener("click", onRemoveClick), page.querySelector(".chkAdvanced").addEventListener("change", onToggleAdvancedChange)
|
||||
});
|
||||
|
||||
page.querySelector(".btnAddFolder").addEventListener("click", onAddButtonClick);
|
||||
page.querySelector(".btnSubmit").addEventListener("click", onAddLibrary);
|
||||
page.querySelector(".folderList").addEventListener("click", onRemoveClick);
|
||||
page.querySelector(".chkAdvanced").addEventListener("change", onToggleAdvancedChange);
|
||||
}
|
||||
|
||||
function onToggleAdvancedChange() {
|
||||
var dlg = dom.parentWithClass(this, "dlg-librarycreator");
|
||||
libraryoptionseditor.setAdvancedVisible(dlg.querySelector(".libraryOptions"), this.checked)
|
||||
libraryoptionseditor.setAdvancedVisible(dlg.querySelector(".libraryOptions"), this.checked);
|
||||
}
|
||||
|
||||
function onAddButtonClick() {
|
||||
@ -83,7 +86,8 @@ define(["loading", "dialogHelper", "dom", "jQuery", "components/libraryoptionsed
|
||||
picker.show({
|
||||
enableNetworkSharePath: true,
|
||||
callback: function(path, networkSharePath) {
|
||||
path && addMediaLocation(page, path, networkSharePath), picker.close()
|
||||
path && addMediaLocation(page, path, networkSharePath);
|
||||
picker.close();
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -95,50 +99,55 @@ define(["loading", "dialogHelper", "dom", "jQuery", "components/libraryoptionsed
|
||||
}
|
||||
|
||||
function renderPaths(page) {
|
||||
var foldersHtml = pathInfos.map(getFolderHtml).join(""),
|
||||
folderList = page.querySelector(".folderList");
|
||||
folderList.innerHTML = foldersHtml, foldersHtml ? folderList.classList.remove("hide") : folderList.classList.add("hide")
|
||||
var foldersHtml = pathInfos.map(getFolderHtml).join("");
|
||||
var folderList = page.querySelector(".folderList");
|
||||
folderList.innerHTML = foldersHtml;
|
||||
foldersHtml ? folderList.classList.remove("hide") : folderList.classList.add("hide");
|
||||
}
|
||||
|
||||
function addMediaLocation(page, path, networkSharePath) {
|
||||
var pathLower = path.toLowerCase();
|
||||
if (0 == pathInfos.filter(function(p) {
|
||||
return p.Path.toLowerCase() == pathLower
|
||||
}).length) {
|
||||
var pathFilter = pathInfos.filter(function(p) {
|
||||
return p.Path.toLowerCase() == pathLower;
|
||||
});
|
||||
if (!pathFilter.length) {
|
||||
var pathInfo = {
|
||||
Path: path
|
||||
};
|
||||
networkSharePath && (pathInfo.NetworkPath = networkSharePath), pathInfos.push(pathInfo), renderPaths(page)
|
||||
networkSharePath && (pathInfo.NetworkPath = networkSharePath);
|
||||
pathInfos.push(pathInfo);
|
||||
renderPaths(page);
|
||||
}
|
||||
}
|
||||
|
||||
function onRemoveClick(e) {
|
||||
var button = dom.parentWithClass(e.target, "btnRemovePath"),
|
||||
index = parseInt(button.getAttribute("data-index")),
|
||||
location = pathInfos[index].Path,
|
||||
locationLower = location.toLowerCase();
|
||||
var button = dom.parentWithClass(e.target, "btnRemovePath");
|
||||
var index = parseInt(button.getAttribute("data-index"));
|
||||
var location = pathInfos[index].Path;
|
||||
var locationLower = location.toLowerCase();
|
||||
pathInfos = pathInfos.filter(function(p) {
|
||||
return p.Path.toLowerCase() != locationLower
|
||||
}), renderPaths(dom.parentWithClass(button, "dlg-librarycreator"))
|
||||
return p.Path.toLowerCase() != locationLower;
|
||||
});
|
||||
renderPaths(dom.parentWithClass(button, "dlg-librarycreator"));
|
||||
}
|
||||
|
||||
function onDialogClosed() {
|
||||
// I can't see any corresponding call to loading.show,
|
||||
// so I think this is not supposed to be here.
|
||||
loading.hide();
|
||||
currentResolve(hasChanges);
|
||||
}
|
||||
|
||||
function initLibraryOptions(dlg) {
|
||||
libraryoptionseditor.embed(dlg.querySelector(".libraryOptions")).then(function() {
|
||||
$("#selectCollectionType", dlg).trigger("change"), onToggleAdvancedChange.call(dlg.querySelector(".chkAdvanced"))
|
||||
$("#selectCollectionType", dlg).trigger("change");
|
||||
onToggleAdvancedChange.call(dlg.querySelector(".chkAdvanced"));
|
||||
})
|
||||
}
|
||||
|
||||
function editor() {
|
||||
this.show = function(options) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
currentOptions = options, currentResolve = resolve, hasChanges = false;
|
||||
currentOptions = options;
|
||||
currentResolve = resolve;
|
||||
hasChanges = false;
|
||||
var xhr = new XMLHttpRequest;
|
||||
xhr.open("GET", "components/medialibrarycreator/medialibrarycreator.template.html", true);
|
||||
xhr.onload = function(e) {
|
||||
@ -165,9 +174,16 @@ define(["loading", "dialogHelper", "dom", "jQuery", "components/libraryoptionsed
|
||||
initLibraryOptions(dlg);
|
||||
};
|
||||
xhr.send();
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
var currentResolve, hasChanges, currentOptions, pathInfos = [], isCreating = false;
|
||||
|
||||
var pathInfos = [];
|
||||
var currentResolve;
|
||||
var currentOptions;
|
||||
|
||||
var hasChanges = false;
|
||||
var isCreating = false;
|
||||
|
||||
return editor
|
||||
});
|
||||
|
@ -1,29 +1,28 @@
|
||||
<div class="formDialogHeader">
|
||||
<button type="button" is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1"><i class="md-icon"></i></button>
|
||||
<h3 class="formDialogHeaderTitle">
|
||||
${ButtonAddMediaLibrary}
|
||||
</h3>
|
||||
<h3 class="formDialogHeaderTitle">${ButtonAddMediaLibrary}</h3>
|
||||
</div>
|
||||
|
||||
<div class="formDialogContent scrollY" style="padding-top:2em;">
|
||||
<div class="dialogContentInner dialog-content-centered">
|
||||
<form style="margin:auto;">
|
||||
<div class="inputContainer" style="text-align:right;">
|
||||
<label style="width:auto;">
|
||||
<input is="emby-toggle" type="checkbox" class="chkAdvanced noautofocus" />
|
||||
<span>${ShowAdvancedSettings}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="inputContainer" style="text-align:right;">
|
||||
<label style="width:auto;">
|
||||
<input is="emby-toggle" type="checkbox" class="chkAdvanced noautofocus" />
|
||||
<span>${ShowAdvancedSettings}</span>
|
||||
</label>
|
||||
<div id="fldCollectionType" class="selectContainer">
|
||||
<select is="emby-select" id="selectCollectionType" data-mini="true" required="required" label="${LabelContentType}"></select>
|
||||
<div class="collectionTypeFieldDescription fieldDescription">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="fldCollectionType" class="selectContainer">
|
||||
<select is="emby-select" id="selectCollectionType" data-mini="true" required="required" label="${LabelContentType}"></select>
|
||||
<div class="collectionTypeFieldDescription fieldDescription">
|
||||
</div>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" type="text" id="txtValue" required="required" label="${LabelDisplayName}" />
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" type="text" id="txtValue" required="required" label="${LabelDisplayName}" />
|
||||
</div>
|
||||
|
||||
<div class="folders">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<h1 style="margin: .5em 0;">${HeadersFolders}</h1>
|
||||
<button is="emby-button" type="button" class="fab btnAddFolder submit" style="margin-left:1em;" title="${ButtonAdd}">
|
||||
@ -31,15 +30,14 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="paperList folderList hide" style="margin-bottom:2em;"></div>
|
||||
</div>
|
||||
|
||||
<div class="libraryOptions"></div>
|
||||
<br />
|
||||
|
||||
<div class="formDialogFooter">
|
||||
<button is="emby-button" type="submit" class="raised button-submit block formDialogFooterItem">
|
||||
<span>${ButtonOk}</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="libraryOptions"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="formDialogFooter">
|
||||
<button is="emby-button" type="button" class="raised btnSubmit button-submit block formDialogFooterItem">
|
||||
<span>${ButtonOk}</span>
|
||||
</button>
|
||||
</div>
|
@ -1,16 +1,39 @@
|
||||
define(["loading", "dialogHelper", "dom", "components/libraryoptionseditor/libraryoptionseditor", "emby-button", "listViewStyle", "paper-icon-button-light", "formDialogStyle", "emby-toggle", "flexStyles"], function(loading, dialogHelper, dom, libraryoptionseditor) {
|
||||
"use strict";
|
||||
|
||||
function onEditLibrary() {
|
||||
if (isCreating) return false;
|
||||
|
||||
isCreating = true;
|
||||
loading.show();
|
||||
|
||||
var dlg = dom.parentWithClass(this, "dlg-libraryeditor");
|
||||
var libraryOptions = libraryoptionseditor.getLibraryOptions(dlg.querySelector(".libraryOptions"));
|
||||
libraryOptions = Object.assign(currentOptions.library.LibraryOptions || {}, libraryOptions);
|
||||
|
||||
ApiClient.updateVirtualFolderOptions(currentOptions.library.ItemId, libraryOptions).then(function() {
|
||||
hasChanges = true;
|
||||
isCreating = false;
|
||||
loading.hide();
|
||||
dialogHelper.close(dlg);
|
||||
}, function() {
|
||||
isCreating = false;
|
||||
loading.hide();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function addMediaLocation(page, path, networkSharePath) {
|
||||
var virtualFolder = currentOptions.library,
|
||||
refreshAfterChange = currentOptions.refresh;
|
||||
var virtualFolder = currentOptions.library;
|
||||
var refreshAfterChange = currentOptions.refresh;
|
||||
ApiClient.addMediaPath(virtualFolder.Name, path, networkSharePath, refreshAfterChange).then(function() {
|
||||
hasChanges = !0, refreshLibraryFromServer(page)
|
||||
hasChanges = true;
|
||||
refreshLibraryFromServer(page);
|
||||
}, function() {
|
||||
require(["toast"], function(toast) {
|
||||
toast(Globalize.translate("ErrorAddingMediaPathToVirtualFolder"))
|
||||
})
|
||||
})
|
||||
toast(Globalize.translate("ErrorAddingMediaPathToVirtualFolder"));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function updateMediaLocation(page, path, networkSharePath) {
|
||||
@ -19,17 +42,18 @@ define(["loading", "dialogHelper", "dom", "components/libraryoptionseditor/libra
|
||||
Path: path,
|
||||
NetworkPath: networkSharePath
|
||||
}).then(function() {
|
||||
hasChanges = !0, refreshLibraryFromServer(page)
|
||||
hasChanges = true;
|
||||
refreshLibraryFromServer(page);
|
||||
}, function() {
|
||||
require(["toast"], function(toast) {
|
||||
toast(Globalize.translate("ErrorAddingMediaPathToVirtualFolder"))
|
||||
})
|
||||
})
|
||||
toast(Globalize.translate("ErrorAddingMediaPathToVirtualFolder"));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function onRemoveClick(btnRemovePath, location) {
|
||||
var button = btnRemovePath,
|
||||
virtualFolder = currentOptions.library;
|
||||
var button = btnRemovePath;
|
||||
var virtualFolder = currentOptions.library;
|
||||
require(["confirm"], function(confirm) {
|
||||
confirm({
|
||||
title: Globalize.translate("HeaderRemoveMediaLocation"),
|
||||
@ -39,32 +63,44 @@ define(["loading", "dialogHelper", "dom", "components/libraryoptionseditor/libra
|
||||
}).then(function() {
|
||||
var refreshAfterChange = currentOptions.refresh;
|
||||
ApiClient.removeMediaPath(virtualFolder.Name, location, refreshAfterChange).then(function() {
|
||||
hasChanges = !0, refreshLibraryFromServer(dom.parentWithClass(button, "dlg-libraryeditor"))
|
||||
hasChanges = true;
|
||||
refreshLibraryFromServer(dom.parentWithClass(button, "dlg-libraryeditor"));
|
||||
}, function() {
|
||||
require(["toast"], function(toast) {
|
||||
toast(Globalize.translate("DefaultErrorMessage"))
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
toast(Globalize.translate("DefaultErrorMessage"));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function onListItemClick(e) {
|
||||
var listItem = dom.parentWithClass(e.target, "listItem");
|
||||
if (listItem) {
|
||||
var index = parseInt(listItem.getAttribute("data-index")),
|
||||
pathInfos = (currentOptions.library.LibraryOptions || {}).PathInfos || [],
|
||||
pathInfo = null == index ? {} : pathInfos[index] || {},
|
||||
originalPath = pathInfo.Path || (null == index ? null : currentOptions.library.Locations[index]),
|
||||
btnRemovePath = dom.parentWithClass(e.target, "btnRemovePath");
|
||||
var index = parseInt(listItem.getAttribute("data-index"));
|
||||
var pathInfos = (currentOptions.library.LibraryOptions || {}).PathInfos || [];
|
||||
var pathInfo = null == index ? {} : pathInfos[index] || {};
|
||||
var originalPath = pathInfo.Path || (null == index ? null : currentOptions.library.Locations[index]);
|
||||
var btnRemovePath = dom.parentWithClass(e.target, "btnRemovePath");
|
||||
if (btnRemovePath) return void onRemoveClick(btnRemovePath, originalPath);
|
||||
showDirectoryBrowser(dom.parentWithClass(listItem, "dlg-libraryeditor"), originalPath, pathInfo.NetworkPath)
|
||||
showDirectoryBrowser(dom.parentWithClass(listItem, "dlg-libraryeditor"), originalPath, pathInfo.NetworkPath);
|
||||
}
|
||||
}
|
||||
|
||||
function getFolderHtml(pathInfo, index) {
|
||||
var html = "";
|
||||
return html += '<div class="listItem listItem-border lnkPath" data-index="' + index + '" style="padding-left:.5em;">', html += '<div class="' + (pathInfo.NetworkPath ? "listItemBody two-line" : "listItemBody") + '">', html += '<h3 class="listItemBodyText">', html += pathInfo.Path, html += "</h3>", pathInfo.NetworkPath && (html += '<div class="listItemBodyText secondary">' + pathInfo.NetworkPath + "</div>"), html += "</div>", html += '<button type="button" is="paper-icon-button-light" class="listItemButton btnRemovePath" data-index="' + index + '"><i class="md-icon">remove_circle</i></button>', html += "</div>"
|
||||
html += '<div class="listItem listItem-border lnkPath" data-index="' + index + '" style="padding-left:.5em;">';
|
||||
html += '<div class="' + (pathInfo.NetworkPath ? "listItemBody two-line" : "listItemBody") + '">';
|
||||
html += '<h3 class="listItemBodyText">';
|
||||
html += pathInfo.Path;
|
||||
html += "</h3>";
|
||||
if (pathInfo.NetworkPath) {
|
||||
html += '<div class="listItemBodyText secondary">' + pathInfo.NetworkPath + "</div>";
|
||||
}
|
||||
html += "</div>";
|
||||
html += '<button type="button" is="paper-icon-button-light" class="listItemButton btnRemovePath" data-index="' + index + '"><i class="md-icon">remove_circle</i></button>';
|
||||
html += "</div>";
|
||||
return html;
|
||||
}
|
||||
|
||||
function refreshLibraryFromServer(page) {
|
||||
@ -72,8 +108,11 @@ define(["loading", "dialogHelper", "dom", "components/libraryoptionseditor/libra
|
||||
var library = result.filter(function(f) {
|
||||
return f.Name === currentOptions.library.Name
|
||||
})[0];
|
||||
library && (currentOptions.library = library, renderLibrary(page, currentOptions))
|
||||
})
|
||||
if (library) {
|
||||
currentOptions.library = library;
|
||||
renderLibrary(page, currentOptions);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function renderLibrary(page, options) {
|
||||
@ -82,11 +121,17 @@ define(["loading", "dialogHelper", "dom", "components/libraryoptionseditor/libra
|
||||
return {
|
||||
Path: p
|
||||
}
|
||||
})), "boxsets" === options.library.CollectionType ? page.querySelector(".folders").classList.add("hide") : page.querySelector(".folders").classList.remove("hide"), page.querySelector(".folderList").innerHTML = pathInfos.map(getFolderHtml).join("")
|
||||
}));
|
||||
if (options.library.CollectionType === 'boxsets') {
|
||||
page.querySelector(".folders").classList.add("hide");
|
||||
} else {
|
||||
page.querySelector(".folders").classList.remove("hide");
|
||||
}
|
||||
page.querySelector(".folderList").innerHTML = pathInfos.map(getFolderHtml).join("");
|
||||
}
|
||||
|
||||
function onAddButtonClick() {
|
||||
showDirectoryBrowser(dom.parentWithClass(this, "dlg-libraryeditor"))
|
||||
showDirectoryBrowser(dom.parentWithClass(this, "dlg-libraryeditor"));
|
||||
}
|
||||
|
||||
function showDirectoryBrowser(context, originalPath, networkPath) {
|
||||
@ -98,7 +143,8 @@ define(["loading", "dialogHelper", "dom", "components/libraryoptionseditor/libra
|
||||
path: originalPath,
|
||||
networkSharePath: networkPath,
|
||||
callback: function(path, networkSharePath) {
|
||||
path && (originalPath ? updateMediaLocation(context, originalPath, networkSharePath) : addMediaLocation(context, path, networkSharePath)), picker.close()
|
||||
path && (originalPath ? updateMediaLocation(context, originalPath, networkSharePath) : addMediaLocation(context, path, networkSharePath));
|
||||
picker.close();
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -110,40 +156,60 @@ define(["loading", "dialogHelper", "dom", "components/libraryoptionseditor/libra
|
||||
}
|
||||
|
||||
function initEditor(dlg, options) {
|
||||
renderLibrary(dlg, options), dlg.querySelector(".btnAddFolder").addEventListener("click", onAddButtonClick), dlg.querySelector(".folderList").addEventListener("click", onListItemClick), dlg.querySelector(".chkAdvanced").addEventListener("change", onToggleAdvancedChange), libraryoptionseditor.embed(dlg.querySelector(".libraryOptions"), options.library.CollectionType, options.library.LibraryOptions).then(function() {
|
||||
onToggleAdvancedChange.call(dlg.querySelector(".chkAdvanced"))
|
||||
})
|
||||
}
|
||||
|
||||
function onDialogClosing() {
|
||||
var dlg = this,
|
||||
libraryOptions = libraryoptionseditor.getLibraryOptions(dlg.querySelector(".libraryOptions"));
|
||||
libraryOptions = Object.assign(currentOptions.library.LibraryOptions || {}, libraryOptions), ApiClient.updateVirtualFolderOptions(currentOptions.library.ItemId, libraryOptions)
|
||||
renderLibrary(dlg, options);
|
||||
dlg.querySelector(".btnAddFolder").addEventListener("click", onAddButtonClick);
|
||||
dlg.querySelector(".folderList").addEventListener("click", onListItemClick);
|
||||
dlg.querySelector(".chkAdvanced").addEventListener("change", onToggleAdvancedChange);
|
||||
dlg.querySelector(".btnSubmit").addEventListener("click", onEditLibrary);
|
||||
libraryoptionseditor.embed(dlg.querySelector(".libraryOptions"), options.library.CollectionType, options.library.LibraryOptions).then(function() {
|
||||
onToggleAdvancedChange.call(dlg.querySelector(".chkAdvanced"));
|
||||
});
|
||||
}
|
||||
|
||||
function onDialogClosed() {
|
||||
loading.hide(), hasChanges = !0, currentDeferred.resolveWith(null, [hasChanges])
|
||||
currentDeferred.resolveWith(null, [hasChanges]);
|
||||
}
|
||||
|
||||
function editor() {
|
||||
this.show = function(options) {
|
||||
var deferred = jQuery.Deferred();
|
||||
currentOptions = options, currentDeferred = deferred, hasChanges = !1;
|
||||
currentOptions = options;
|
||||
currentDeferred = deferred;
|
||||
hasChanges = false;
|
||||
var xhr = new XMLHttpRequest;
|
||||
return xhr.open("GET", "components/medialibraryeditor/medialibraryeditor.template.html", !0), xhr.onload = function(e) {
|
||||
var template = this.response,
|
||||
dlg = dialogHelper.createDialog({
|
||||
size: "medium-tall",
|
||||
modal: !1,
|
||||
removeOnClose: !0,
|
||||
scrollY: !1
|
||||
});
|
||||
dlg.classList.add("dlg-libraryeditor"), dlg.classList.add("ui-body-a"), dlg.classList.add("background-theme-a"), dlg.classList.add("formDialog"), dlg.innerHTML = Globalize.translateDocument(template), dlg.querySelector(".formDialogHeaderTitle").innerHTML = options.library.Name, initEditor(dlg, options), dlg.addEventListener("closing", onDialogClosing), dlg.addEventListener("close", onDialogClosed), dialogHelper.open(dlg), dlg.querySelector(".btnCancel").addEventListener("click", function() {
|
||||
dialogHelper.close(dlg)
|
||||
}), refreshLibraryFromServer(dlg)
|
||||
}, xhr.send(), deferred.promise()
|
||||
xhr.open("GET", "components/medialibraryeditor/medialibraryeditor.template.html", true);
|
||||
xhr.onload = function(e) {
|
||||
var template = this.response;
|
||||
var dlg = dialogHelper.createDialog({
|
||||
size: "medium-tall",
|
||||
modal: false,
|
||||
removeOnClose: true,
|
||||
scrollY: false
|
||||
});
|
||||
dlg.classList.add("dlg-libraryeditor");
|
||||
dlg.classList.add("ui-body-a");
|
||||
dlg.classList.add("background-theme-a");
|
||||
dlg.classList.add("formDialog");
|
||||
dlg.innerHTML = Globalize.translateDocument(template);
|
||||
dlg.querySelector(".formDialogHeaderTitle").innerHTML = options.library.Name;
|
||||
initEditor(dlg, options);
|
||||
dlg.addEventListener("close", onDialogClosed);
|
||||
dialogHelper.open(dlg);
|
||||
dlg.querySelector(".btnCancel").addEventListener("click", function() {
|
||||
dialogHelper.close(dlg);
|
||||
});
|
||||
refreshLibraryFromServer(dlg);
|
||||
};
|
||||
xhr.send();
|
||||
return deferred.promise();
|
||||
}
|
||||
}
|
||||
var currentDeferred, hasChanges, currentOptions;
|
||||
return editor
|
||||
|
||||
var currentDeferred;
|
||||
var currentOptions;
|
||||
|
||||
var hasChanges = false;
|
||||
var isCreating = false;
|
||||
|
||||
return editor;
|
||||
});
|
@ -5,7 +5,6 @@
|
||||
|
||||
<div class="formDialogContent scrollY" style="padding-top:2em;">
|
||||
<div class="dialogContentInner dialog-content-centered">
|
||||
|
||||
<div class="infoBanner" style="margin-bottom:1.8em;">
|
||||
${ChangingMetadataImageSettingsNewContent}
|
||||
</div>
|
||||
@ -26,6 +25,13 @@
|
||||
</div>
|
||||
<div class="paperList folderList" style="margin-bottom:2em;"></div>
|
||||
</div>
|
||||
|
||||
<div class="libraryOptions"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="formDialogFooter">
|
||||
<button is="emby-button" type="button" class="raised btnSubmit button-submit block formDialogFooterItem">
|
||||
<span>${ButtonOk}</span>
|
||||
</button>
|
||||
</div>
|
@ -1,24 +1,15 @@
|
||||
define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "globalize", "dom", "indicators", "cardStyle", "emby-itemrefreshindicator"], function($, appHost, taskButton, loading, libraryMenu, globalize, dom, indicators) {
|
||||
"use strict";
|
||||
|
||||
function changeCollectionType(page, virtualFolder) {
|
||||
require(["alert"], function(alert) {
|
||||
alert({
|
||||
title: globalize.translate("HeaderChangeFolderType"),
|
||||
text: globalize.translate("HeaderChangeFolderTypeHelp")
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function addVirtualFolder(page) {
|
||||
require(["medialibrarycreator"], function(medialibrarycreator) {
|
||||
(new medialibrarycreator).show({
|
||||
collectionTypeOptions: getCollectionTypeOptions().filter(function(f) {
|
||||
return !f.hidden
|
||||
return !f.hidden;
|
||||
}),
|
||||
refresh: shouldRefreshLibraryAfterChanges(page)
|
||||
}).then(function(hasChanges) {
|
||||
hasChanges && reloadLibrary(page)
|
||||
hasChanges && reloadLibrary(page);
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -29,18 +20,22 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||
refresh: shouldRefreshLibraryAfterChanges(page),
|
||||
library: virtualFolder
|
||||
}).then(function(hasChanges) {
|
||||
hasChanges && reloadLibrary(page)
|
||||
hasChanges && reloadLibrary(page);
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function deleteVirtualFolder(page, virtualFolder) {
|
||||
var msg = globalize.translate("MessageAreYouSureYouWishToRemoveMediaFolder");
|
||||
virtualFolder.Locations.length && (msg += "<br/><br/>" + globalize.translate("MessageTheFollowingLocationWillBeRemovedFromLibrary") + "<br/><br/>", msg += virtualFolder.Locations.join("<br/>")), require(["confirm"], function(confirm) {
|
||||
if (virtualFolder.Locations.length) {
|
||||
msg += "<br/><br/>" + globalize.translate("MessageTheFollowingLocationWillBeRemovedFromLibrary") + "<br/><br/>";
|
||||
msg += virtualFolder.Locations.join("<br/>");
|
||||
}
|
||||
require(["confirm"], function(confirm) {
|
||||
confirm(msg, globalize.translate("HeaderRemoveMediaFolder")).then(function() {
|
||||
var refreshAfterChange = shouldRefreshLibraryAfterChanges(page);
|
||||
ApiClient.removeVirtualFolder(virtualFolder.Name, refreshAfterChange).then(function() {
|
||||
reloadLibrary(page)
|
||||
reloadLibrary(page);
|
||||
})
|
||||
})
|
||||
})
|
||||
@ -52,8 +47,8 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||
itemIds: [virtualFolder.ItemId],
|
||||
serverId: ApiClient.serverId(),
|
||||
mode: "scan"
|
||||
}).show()
|
||||
})
|
||||
}).show();
|
||||
});
|
||||
}
|
||||
|
||||
function renameVirtualFolder(page, virtualFolder) {
|
||||
@ -65,51 +60,49 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||
if (newName && newName != virtualFolder.Name) {
|
||||
var refreshAfterChange = shouldRefreshLibraryAfterChanges(page);
|
||||
ApiClient.renameVirtualFolder(virtualFolder.Name, newName, refreshAfterChange).then(function() {
|
||||
reloadLibrary(page)
|
||||
})
|
||||
reloadLibrary(page);
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function showCardMenu(page, elem, virtualFolders) {
|
||||
var card = dom.parentWithClass(elem, "card"),
|
||||
index = parseInt(card.getAttribute("data-index")),
|
||||
virtualFolder = virtualFolders[index],
|
||||
menuItems = [];
|
||||
var card = dom.parentWithClass(elem, "card");
|
||||
var index = parseInt(card.getAttribute("data-index"));
|
||||
var virtualFolder = virtualFolders[index];
|
||||
var menuItems = [];
|
||||
menuItems.push({
|
||||
name: globalize.translate("ButtonChangeContentType"),
|
||||
id: "changetype",
|
||||
ironIcon: "videocam"
|
||||
}), menuItems.push({
|
||||
name: globalize.translate("ButtonEditImages"),
|
||||
id: "editimages",
|
||||
ironIcon: "photo"
|
||||
}), menuItems.push({
|
||||
});
|
||||
menuItems.push({
|
||||
name: globalize.translate("ManageLibrary"),
|
||||
id: "edit",
|
||||
ironIcon: "folder_open"
|
||||
}), menuItems.push({
|
||||
});
|
||||
menuItems.push({
|
||||
name: globalize.translate("ButtonRemove"),
|
||||
id: "delete",
|
||||
ironIcon: "remove"
|
||||
}), menuItems.push({
|
||||
});
|
||||
menuItems.push({
|
||||
name: globalize.translate("ButtonRename"),
|
||||
id: "rename",
|
||||
ironIcon: "mode_edit"
|
||||
}), menuItems.push({
|
||||
});
|
||||
menuItems.push({
|
||||
name: globalize.translate("ScanLibrary"),
|
||||
id: "refresh",
|
||||
ironIcon: "refresh"
|
||||
}), require(["actionsheet"], function(actionsheet) {
|
||||
});
|
||||
require(["actionsheet"], function(actionsheet) {
|
||||
actionsheet.show({
|
||||
items: menuItems,
|
||||
positionTo: elem,
|
||||
callback: function(resultId) {
|
||||
switch (resultId) {
|
||||
case "changetype":
|
||||
changeCollectionType(page, virtualFolder);
|
||||
break;
|
||||
case "edit":
|
||||
editVirtualFolder(page, virtualFolder);
|
||||
break;
|
||||
@ -123,21 +116,22 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||
deleteVirtualFolder(page, virtualFolder);
|
||||
break;
|
||||
case "refresh":
|
||||
refreshVirtualFolder(page, virtualFolder)
|
||||
refreshVirtualFolder(page, virtualFolder);
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function reloadLibrary(page) {
|
||||
loading.show(), ApiClient.getVirtualFolders().then(function(result) {
|
||||
reloadVirtualFolders(page, result)
|
||||
})
|
||||
loading.show();
|
||||
ApiClient.getVirtualFolders().then(function(result) {
|
||||
reloadVirtualFolders(page, result);
|
||||
});
|
||||
}
|
||||
|
||||
function shouldRefreshLibraryAfterChanges(page) {
|
||||
return "mediaLibraryPage" === page.id
|
||||
return "mediaLibraryPage" === page.id;
|
||||
}
|
||||
|
||||
function reloadVirtualFolders(page, virtualFolders) {
|
||||
@ -146,26 +140,33 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||
Name: globalize.translate("ButtonAddMediaLibrary"),
|
||||
icon: "add_circle",
|
||||
Locations: [],
|
||||
showType: !1,
|
||||
showLocations: !1,
|
||||
showMenu: !1,
|
||||
showNameWithIcon: !0
|
||||
showType: false,
|
||||
showLocations: false,
|
||||
showMenu: false,
|
||||
showNameWithIcon: true
|
||||
});
|
||||
for (var i = 0, length = virtualFolders.length; i < length; i++) {
|
||||
|
||||
for (var i = 0; i < virtualFolders.length; i++) {
|
||||
var virtualFolder = virtualFolders[i];
|
||||
html += getVirtualFolderHtml(page, virtualFolder, i)
|
||||
}
|
||||
var divVirtualFolders = page.querySelector("#divVirtualFolders");
|
||||
divVirtualFolders.innerHTML = html, divVirtualFolders.classList.add("itemsContainer"), divVirtualFolders.classList.add("vertical-wrap"), $(".btnCardMenu", divVirtualFolders).on("click", function() {
|
||||
showCardMenu(page, this, virtualFolders)
|
||||
}), divVirtualFolders.querySelector(".addLibrary").addEventListener("click", function() {
|
||||
addVirtualFolder(page)
|
||||
}), $(".editLibrary", divVirtualFolders).on("click", function() {
|
||||
var card = $(this).parents(".card")[0],
|
||||
index = parseInt(card.getAttribute("data-index")),
|
||||
virtualFolder = virtualFolders[index];
|
||||
virtualFolder.ItemId && editVirtualFolder(page, virtualFolder)
|
||||
}), loading.hide()
|
||||
divVirtualFolders.innerHTML = html;
|
||||
divVirtualFolders.classList.add("itemsContainer");
|
||||
divVirtualFolders.classList.add("vertical-wrap");
|
||||
$(".btnCardMenu", divVirtualFolders).on("click", function() {
|
||||
showCardMenu(page, this, virtualFolders);
|
||||
});
|
||||
divVirtualFolders.querySelector(".addLibrary").addEventListener("click", function() {
|
||||
addVirtualFolder(page);
|
||||
});
|
||||
$(".editLibrary", divVirtualFolders).on("click", function() {
|
||||
var card = $(this).parents(".card")[0];
|
||||
var index = parseInt(card.getAttribute("data-index"));
|
||||
var virtualFolder = virtualFolders[index];
|
||||
virtualFolder.ItemId && editVirtualFolder(page, virtualFolder);
|
||||
});
|
||||
loading.hide();
|
||||
}
|
||||
|
||||
function editImages(page, virtualFolder) {
|
||||
@ -174,13 +175,13 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||
itemId: virtualFolder.ItemId,
|
||||
serverId: ApiClient.serverId()
|
||||
}).then(function() {
|
||||
reloadLibrary(page)
|
||||
})
|
||||
reloadLibrary(page);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function getLink(text, url) {
|
||||
return globalize.translate(text, '<a is="emby-linkbutton" class="button-link" href="' + url + '" target="_blank" data-autohide="true">', "</a>")
|
||||
return globalize.translate(text, '<a is="emby-linkbutton" class="button-link" href="' + url + '" target="_blank" data-autohide="true">', "</a>");
|
||||
}
|
||||
|
||||
function getCollectionTypeOptions() {
|
||||
@ -236,31 +237,83 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||
case "channels":
|
||||
case "playlists":
|
||||
default:
|
||||
return "folder"
|
||||
return "folder";
|
||||
}
|
||||
}
|
||||
|
||||
function getVirtualFolderHtml(page, virtualFolder, index) {
|
||||
var html = "",
|
||||
style = "";
|
||||
page.classList.contains("wizardPage") && (style += "min-width:33.3%;"), html += '<div class="card backdropCard scalableCard backdropCard-scalable" style="' + style + '" data-index="' + index + '" data-id="' + virtualFolder.ItemId + '">', html += '<div class="cardBox visualCardBox">', html += '<div class="cardScalable visualCardBox-cardScalable">', html += '<div class="cardPadder cardPadder-backdrop"></div>', html += '<div class="cardContent">';
|
||||
var html = "";
|
||||
var style = "";
|
||||
page.classList.contains("wizardPage") && (style += "min-width:33.3%;");
|
||||
html += '<div class="card backdropCard scalableCard backdropCard-scalable" style="' + style + '" data-index="' + index + '" data-id="' + virtualFolder.ItemId + '">';
|
||||
html += '<div class="cardBox visualCardBox">';
|
||||
html += '<div class="cardScalable visualCardBox-cardScalable">';
|
||||
html += '<div class="cardPadder cardPadder-backdrop"></div>';
|
||||
html += '<div class="cardContent">';
|
||||
var imgUrl = "";
|
||||
virtualFolder.PrimaryImageItemId && (imgUrl = ApiClient.getScaledImageUrl(virtualFolder.PrimaryImageItemId, {
|
||||
type: "Primary"
|
||||
}));
|
||||
if (virtualFolder.PrimaryImageItemId) {
|
||||
imgUrl = ApiClient.getScaledImageUrl(virtualFolder.PrimaryImageItemId, {
|
||||
type: "Primary"
|
||||
});
|
||||
}
|
||||
var hasCardImageContainer;
|
||||
if (imgUrl ? (html += '<div class="cardImageContainer editLibrary" style="cursor:pointer;background-image:url(\'' + imgUrl + "');\">", hasCardImageContainer = !0) : virtualFolder.showNameWithIcon || (html += '<div class="cardImageContainer editLibrary" style="cursor:pointer;">', html += '<i class="cardImageIcon-small md-icon">' + (virtualFolder.icon || getIcon(virtualFolder.CollectionType)) + "</i>", hasCardImageContainer = !0), hasCardImageContainer) {
|
||||
if (imgUrl) {
|
||||
html += '<div class="cardImageContainer editLibrary" style="cursor:pointer;background-image:url(\'' + imgUrl + "');\">";
|
||||
hasCardImageContainer = true;
|
||||
} else if (!virtualFolder.showNameWithIcon) {
|
||||
html += '<div class="cardImageContainer editLibrary" style="cursor:pointer;">';
|
||||
html += '<i class="cardImageIcon-small md-icon">' + (virtualFolder.icon || getIcon(virtualFolder.CollectionType)) + "</i>";
|
||||
hasCardImageContainer = true;
|
||||
}
|
||||
if (hasCardImageContainer) {
|
||||
html += '<div class="cardIndicators backdropCardIndicators">';
|
||||
html += '<div is="emby-itemrefreshindicator"' + (virtualFolder.RefreshProgress || virtualFolder.RefreshStatus && "Idle" !== virtualFolder.RefreshStatus ? "" : ' class="hide"') + ' data-progress="' + (virtualFolder.RefreshProgress || 0) + '" data-status="' + virtualFolder.RefreshStatus + '"></div>', html += "</div>", html += "</div>"
|
||||
html += '<div is="emby-itemrefreshindicator"' + (virtualFolder.RefreshProgress || virtualFolder.RefreshStatus && "Idle" !== virtualFolder.RefreshStatus ? "" : ' class="hide"') + ' data-progress="' + (virtualFolder.RefreshProgress || 0) + '" data-status="' + virtualFolder.RefreshStatus + '"></div>';
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
}
|
||||
if (!imgUrl && virtualFolder.showNameWithIcon && (html += '<h3 class="cardImageContainer addLibrary" style="position:absolute;top:0;left:0;right:0;bottom:0;cursor:pointer;flex-direction:column;">', html += '<i class="cardImageIcon-small md-icon">' + (virtualFolder.icon || getIcon(virtualFolder.CollectionType)) + "</i>", virtualFolder.showNameWithIcon && (html += '<div style="margin:1em 0;position:width:100%;">', html += virtualFolder.Name, html += "</div>"), html += "</h3>"), html += "</div>", html += "</div>", html += '<div class="cardFooter visualCardBox-cardFooter">', !1 !== virtualFolder.showMenu) {
|
||||
html += '<div style="text-align:right; float:right;padding-top:5px;">', html += '<button type="button" is="paper-icon-button-light" class="btnCardMenu autoSize"><i class="md-icon"></i></button>', html += "</div>"
|
||||
if (!imgUrl && virtualFolder.showNameWithIcon) {
|
||||
html += '<h3 class="cardImageContainer addLibrary" style="position:absolute;top:0;left:0;right:0;bottom:0;cursor:pointer;flex-direction:column;">';
|
||||
html += '<i class="cardImageIcon-small md-icon">' + (virtualFolder.icon || getIcon(virtualFolder.CollectionType)) + "</i>";
|
||||
virtualFolder.showNameWithIcon && (html += '<div style="margin:1em 0;position:width:100%;">', html += virtualFolder.Name, html += "</div>");
|
||||
html += "</h3>";
|
||||
}
|
||||
html += "<div class='cardText'>", virtualFolder.showNameWithIcon ? html += " " : html += virtualFolder.Name, html += "</div>";
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
html += '<div class="cardFooter visualCardBox-cardFooter">';
|
||||
|
||||
// always show menu unless explicitly hidden
|
||||
if (virtualFolder.showMenu !== false) {
|
||||
html += '<div style="text-align:right; float:right;padding-top:5px;">';
|
||||
html += '<button type="button" is="paper-icon-button-light" class="btnCardMenu autoSize"><i class="md-icon"></i></button>';
|
||||
html += "</div>";
|
||||
}
|
||||
html += "<div class='cardText'>";
|
||||
virtualFolder.showNameWithIcon ? html += " " : html += virtualFolder.Name;
|
||||
html += "</div>";
|
||||
var typeName = getCollectionTypeOptions().filter(function(t) {
|
||||
return t.value == virtualFolder.CollectionType
|
||||
})[0];
|
||||
return typeName = typeName ? typeName.name : globalize.translate("FolderTypeUnset"), html += "<div class='cardText cardText-secondary'>", !1 === virtualFolder.showType ? html += " " : html += typeName, html += "</div>", !1 === virtualFolder.showLocations ? (html += "<div class='cardText cardText-secondary'>", html += " ", html += "</div>") : virtualFolder.Locations.length && 1 == virtualFolder.Locations.length ? (html += "<div class='cardText cardText-secondary'>", html += virtualFolder.Locations[0], html += "</div>") : (html += "<div class='cardText cardText-secondary'>", html += globalize.translate("NumLocationsValue", virtualFolder.Locations.length), html += "</div>"), html += "</div>", html += "</div>", html += "</div>"
|
||||
typeName = typeName ? typeName.name : globalize.translate("FolderTypeUnset");
|
||||
html += "<div class='cardText cardText-secondary'>";
|
||||
virtualFolder.showType === false ? html += " " : html += typeName;
|
||||
html += "</div>";
|
||||
if (virtualFolder.showLocations === false) {
|
||||
html += "<div class='cardText cardText-secondary'>";
|
||||
html += " ";
|
||||
html += "</div>";
|
||||
} else if (virtualFolder.Locations.length && virtualFolder.Locations.length === 1) {
|
||||
html += "<div class='cardText cardText-secondary'>";
|
||||
html += virtualFolder.Locations[0];
|
||||
html += "</div>";
|
||||
} else {
|
||||
html += "<div class='cardText cardText-secondary'>";
|
||||
html += globalize.translate("NumLocationsValue", virtualFolder.Locations.length);
|
||||
html += "</div>";
|
||||
}
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
return html;
|
||||
}
|
||||
|
||||
function getTabs() {
|
||||
@ -285,9 +338,11 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||
next: function() {
|
||||
Dashboard.navigate("wizardsettings.html")
|
||||
}
|
||||
}, pageClassOn("pageshow", "mediaLibraryPage", function() {
|
||||
reloadLibrary(this)
|
||||
}), pageIdOn("pageshow", "mediaLibraryPage", function() {
|
||||
};
|
||||
pageClassOn("pageshow", "mediaLibraryPage", function() {
|
||||
reloadLibrary(this);
|
||||
});
|
||||
pageIdOn("pageshow", "mediaLibraryPage", function() {
|
||||
libraryMenu.setTabs("librarysetup", 0, getTabs);
|
||||
var page = this;
|
||||
taskButton({
|
||||
@ -295,14 +350,15 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||
progressElem: page.querySelector(".refreshProgress"),
|
||||
taskKey: "RefreshLibrary",
|
||||
button: page.querySelector(".btnRefresh")
|
||||
})
|
||||
}), pageIdOn("pagebeforehide", "mediaLibraryPage", function() {
|
||||
});
|
||||
});
|
||||
pageIdOn("pagebeforehide", "mediaLibraryPage", function() {
|
||||
var page = this;
|
||||
taskButton({
|
||||
mode: "off",
|
||||
progressElem: page.querySelector(".refreshProgress"),
|
||||
taskKey: "RefreshLibrary",
|
||||
button: page.querySelector(".btnRefresh")
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,16 +1,14 @@
|
||||
<div id="mediaLibraryPage" data-role="page" class="page type-interior mediaLibraryPage librarySectionPage withTabs fullWidthContent">
|
||||
|
||||
<div>
|
||||
<div class="content-primary">
|
||||
<div class="padded-top padded-bottom">
|
||||
|
||||
<button is="emby-button" type="button" class="raised btnRefresh">
|
||||
<span>${ButtonScanAllLibraries}</span>
|
||||
</button>
|
||||
<progress max="100" min="0" style="display: inline-block; vertical-align: middle;" class="refreshProgress"></progress>
|
||||
|
||||
<a is="emby-linkbutton" class="raised button-alt" target="_blank" href="https://jellyfin.readthedocs.io/en/latest/server/libraries/">${Help}</a>
|
||||
</div>
|
||||
|
||||
<div id="divVirtualFolders"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,7 +25,6 @@
|
||||
"ButtonAudioTracks": "المقاطع الصوتية",
|
||||
"ButtonBack": "خلف",
|
||||
"ButtonCancel": "الغاء",
|
||||
"ButtonChangeContentType": "غيّر نوع المحتوى",
|
||||
"ButtonChangeServer": "غير الخادم",
|
||||
"ButtonConnect": "اتصل",
|
||||
"ButtonDelete": "حذف",
|
||||
@ -161,8 +160,6 @@
|
||||
"HeaderBranding": "وسومات البرنامج",
|
||||
"HeaderCastAndCrew": "الممثلين وطاقم العمل",
|
||||
"HeaderCastCrew": "الممثلين والطاقم",
|
||||
"HeaderChangeFolderType": "غيّر نوع المحتوى",
|
||||
"HeaderChangeFolderTypeHelp": "لتغيير نوع المحتوى، الرجاء إزالة المكتبة وبناءها مرة أخرى بنوع جديد.",
|
||||
"HeaderChannelAccess": "صلاحيات القنوات",
|
||||
"HeaderChannels": "القنوات",
|
||||
"HeaderCodecProfile": "عريضة الكودك",
|
||||
|
@ -34,7 +34,6 @@
|
||||
"ButtonAudioTracks": "Звукови пътеки",
|
||||
"ButtonBack": "Назад",
|
||||
"ButtonCancel": "Отмяна",
|
||||
"ButtonChangeContentType": "Промяна на типа съдържание",
|
||||
"ButtonDelete": "Изтриване",
|
||||
"ButtonDeleteImage": "Изтриване на изобр.",
|
||||
"ButtonDownload": "Изтегляне",
|
||||
@ -169,8 +168,6 @@
|
||||
"HeaderBooks": "Книги",
|
||||
"HeaderCastAndCrew": "Артисти и изпълнители",
|
||||
"HeaderCastCrew": "Артисти и изпълнители",
|
||||
"HeaderChangeFolderType": "Промяна на типа съдържание",
|
||||
"HeaderChangeFolderTypeHelp": "За да промените вида на съдържанието, моля, премахнете и създайте наново библиотеката с правилния тип.",
|
||||
"HeaderChannels": "Канали",
|
||||
"HeaderCodecProfile": "Профил на кодека",
|
||||
"HeaderContainerProfile": "Профил на контейнера",
|
||||
|
@ -48,7 +48,6 @@
|
||||
"ButtonAudioTracks": "Audio stopy",
|
||||
"ButtonBack": "Zpět",
|
||||
"ButtonCancel": "Zrušit",
|
||||
"ButtonChangeContentType": "Změnit typ obsahu",
|
||||
"ButtonChangeServer": "Změna serveru",
|
||||
"ButtonConnect": "Připojit",
|
||||
"ButtonDelete": "Odstranit",
|
||||
@ -263,8 +262,6 @@
|
||||
"HeaderCancelSeries": "Ukončit Seriál",
|
||||
"HeaderCastAndCrew": "Herci a obsazení",
|
||||
"HeaderCastCrew": "Herci a obsazení",
|
||||
"HeaderChangeFolderType": "Změna typu obsahu",
|
||||
"HeaderChangeFolderTypeHelp": "Chcete-li změnit typ, vyjměte a znovu prohledejte knihovny s nově přiřazeným typem.",
|
||||
"HeaderChannelAccess": "Přístup ke kanálu",
|
||||
"HeaderChannels": "Kanály",
|
||||
"HeaderCodecProfile": "Profil kodeků",
|
||||
|
@ -45,7 +45,6 @@
|
||||
"ButtonAudioTracks": "Lysspor",
|
||||
"ButtonBack": "Tilbage",
|
||||
"ButtonCancel": "Annuller",
|
||||
"ButtonChangeContentType": "Skift indholdstype",
|
||||
"ButtonChangeServer": "Skift server",
|
||||
"ButtonConnect": "Forbind",
|
||||
"ButtonDelete": "Slet",
|
||||
@ -213,8 +212,6 @@
|
||||
"HeaderCancelSeries": "Annuller Serie",
|
||||
"HeaderCastAndCrew": "Medvirkende",
|
||||
"HeaderCastCrew": "Medvirkende",
|
||||
"HeaderChangeFolderType": "Ændre indholdstype",
|
||||
"HeaderChangeFolderTypeHelp": "For at ændre type, skal du venligst fjerne og genopbygge biblioteket med den nye type.",
|
||||
"HeaderChannelAccess": "Adgang til kanaler",
|
||||
"HeaderChannels": "Kanaler",
|
||||
"HeaderChapterImages": "Kapitel Billeder",
|
||||
|
@ -74,7 +74,6 @@
|
||||
"ButtonAudioTracks": "Audiospuren",
|
||||
"ButtonBack": "Zurück",
|
||||
"ButtonCancel": "Abbrechen",
|
||||
"ButtonChangeContentType": "Ändere Inhalte-Typ",
|
||||
"ButtonChangeServer": "Wechsel Server",
|
||||
"ButtonConnect": "Verbinde",
|
||||
"ButtonDelete": "Löschen",
|
||||
@ -296,8 +295,6 @@
|
||||
"HeaderCancelSeries": "Serie abbrechen",
|
||||
"HeaderCastAndCrew": "Besetzung & Mitwirkende",
|
||||
"HeaderCastCrew": "Besetzung & Crew",
|
||||
"HeaderChangeFolderType": "Ändere Inhalte Typ",
|
||||
"HeaderChangeFolderTypeHelp": "Um den Typ zu ändern, bitte entferne die Bibliothek und erstelle sie mit dem neuen Medientyp erneut.",
|
||||
"HeaderChannelAccess": "Channelzugriff",
|
||||
"HeaderChannels": "Kanäle",
|
||||
"HeaderChapterImages": "Kapitel Bilder",
|
||||
|
@ -58,7 +58,6 @@
|
||||
"ButtonAudioTracks": "Ηχητικά κομμάτια",
|
||||
"ButtonBack": "Πίσω",
|
||||
"ButtonCancel": "Ακύρωση ",
|
||||
"ButtonChangeContentType": "Αλλαγή τύπου περιεχομένου",
|
||||
"ButtonChangeServer": "Αλλαγή Διακομιστή",
|
||||
"ButtonConnect": "Σύνδεση",
|
||||
"ButtonDelete": "Διαγραφή",
|
||||
@ -273,8 +272,6 @@
|
||||
"HeaderCancelSeries": "Ακύρωση Σειράς",
|
||||
"HeaderCastAndCrew": "Ηθοποιοί και Συνεργείο",
|
||||
"HeaderCastCrew": "Ηθοποιοί και συνεργείο",
|
||||
"HeaderChangeFolderType": "Αλλαγή τύπου περιεχομένου",
|
||||
"HeaderChangeFolderTypeHelp": "Για να αλλάξετε τον τύπο, καταργήστε και δημιουργήστε ξανά τη βιβλιοθήκη με το νέο τύπο.",
|
||||
"HeaderChannels": "Κανάλια",
|
||||
"HeaderCodecProfileHelp": "Τα προφίλ κωδικοποιητή υποδεικνύουν τους περιορισμούς μιας συσκευής κατά την αναπαραγωγή συγκεκριμένων κωδικοποιητών. Εάν ισχύει περιορισμός, τότε τα μέσα θα κωδικοποιηθούν, ακόμα και αν ο κωδικοποιητής έχει ρυθμιστεί για άμεση αναπαραγωγή.",
|
||||
"HeaderConfigureRemoteAccess": "Ρύθμιση απομακρυσμένης πρόσβασης",
|
||||
|
@ -69,7 +69,6 @@
|
||||
"ButtonAudioTracks": "Audio Tracks",
|
||||
"ButtonBack": "Back",
|
||||
"ButtonCancel": "Cancel",
|
||||
"ButtonChangeContentType": "Change content type",
|
||||
"ButtonChangeServer": "Change Server",
|
||||
"ButtonConnect": "Connect",
|
||||
"ButtonDelete": "Delete",
|
||||
@ -314,8 +313,6 @@
|
||||
"HeaderCancelSeries": "Cancel Series",
|
||||
"HeaderCastAndCrew": "Cast & Crew",
|
||||
"HeaderCastCrew": "Cast & Crew",
|
||||
"HeaderChangeFolderType": "Change Content Type",
|
||||
"HeaderChangeFolderTypeHelp": "To change the type, please remove and rebuild the library with the new type.",
|
||||
"HeaderChannelAccess": "Channel Access",
|
||||
"HeaderChannels": "Channels",
|
||||
"HeaderChapterImages": "Chapter Images",
|
||||
|
@ -123,7 +123,6 @@
|
||||
"ButtonBack": "Atrás",
|
||||
"ButtonCancel": "Cancelar",
|
||||
"ButtonCancelSeries": "Cancelar serie",
|
||||
"ButtonChangeContentType": "Cambiar tipo de contenido",
|
||||
"ButtonChangeServer": "Cambiar servidor",
|
||||
"ButtonClear": "Limpiar",
|
||||
"ButtonClose": "Cerrar",
|
||||
|
@ -69,7 +69,6 @@
|
||||
"ButtonAudioTracks": "Pistas de Audio",
|
||||
"ButtonBack": "Atrás",
|
||||
"ButtonCancel": "Cancelar",
|
||||
"ButtonChangeContentType": "Cambiar tipo de contenido",
|
||||
"ButtonChangeServer": "Cambiar Servidor",
|
||||
"ButtonConnect": "Conectar",
|
||||
"ButtonDelete": "Eliminar",
|
||||
@ -304,8 +303,6 @@
|
||||
"HeaderCancelSeries": "Cancelar Serie",
|
||||
"HeaderCastAndCrew": "Reparto & Personal:",
|
||||
"HeaderCastCrew": "Reparto y Personal",
|
||||
"HeaderChangeFolderType": "Cambiar Tipo de Contenido",
|
||||
"HeaderChangeFolderTypeHelp": "Para cambiar el tipo, por favor elimine y reconstruya la biblioteca con el nuevo tipo.",
|
||||
"HeaderChannelAccess": "Acceso a los Canales",
|
||||
"HeaderChannels": "Canales",
|
||||
"HeaderChapterImages": "Imagenes de Capitulo",
|
||||
|
@ -54,7 +54,6 @@
|
||||
"ButtonAudioTracks": "Pistas de audio",
|
||||
"ButtonBack": "Atrás",
|
||||
"ButtonCancel": "Cancelar",
|
||||
"ButtonChangeContentType": "Cambiar el tipo de contenido",
|
||||
"ButtonChangeServer": "Cambiar servidor",
|
||||
"ButtonConnect": "Conectar",
|
||||
"ButtonDelete": "Borrar",
|
||||
@ -251,8 +250,6 @@
|
||||
"HeaderCancelSeries": "Cancelar Series",
|
||||
"HeaderCastAndCrew": "Reparto y equipo",
|
||||
"HeaderCastCrew": "Reparto y equipo técnico",
|
||||
"HeaderChangeFolderType": "Cambiar tipo de contenido",
|
||||
"HeaderChangeFolderTypeHelp": "Para cambiar el tipo de contenido por favor elimina y reconstruye la biblioteca con el nuevo tipo.",
|
||||
"HeaderChannelAccess": "Acceso a los canales",
|
||||
"HeaderChannels": "Canales",
|
||||
"HeaderChapterImages": "Imágenes de capítulos",
|
||||
|
@ -155,7 +155,6 @@
|
||||
"ButtonAudioTracks": "Pistes Audio",
|
||||
"ButtonBack": "Retour arrière",
|
||||
"ButtonCancelSeries": "Annuler séries",
|
||||
"ButtonChangeContentType": "Changer le type de contenu",
|
||||
"ButtonChangeServer": "Changer de serveur",
|
||||
"ButtonClear": "Effacer",
|
||||
"ButtonClose": "Fermer",
|
||||
|
@ -65,7 +65,6 @@
|
||||
"ButtonAudioTracks": "Pistes Audio",
|
||||
"ButtonBack": "Retour arrière",
|
||||
"ButtonCancel": "Annuler",
|
||||
"ButtonChangeContentType": "Changer le type de contenu",
|
||||
"ButtonChangeServer": "Changer de serveur",
|
||||
"ButtonConnect": "Connexion",
|
||||
"ButtonDelete": "Supprimer",
|
||||
@ -300,8 +299,6 @@
|
||||
"HeaderCancelSeries": "Annuler la série",
|
||||
"HeaderCastAndCrew": "Distribution & équipe",
|
||||
"HeaderCastCrew": "Distribution & équipe",
|
||||
"HeaderChangeFolderType": "Modifier le type de contenu",
|
||||
"HeaderChangeFolderTypeHelp": "Pour modifier le type, veuillez supprimer et recréer la médiathèque avec le nouveau type.",
|
||||
"HeaderChannelAccess": "Accès aux chaînes",
|
||||
"HeaderChannels": "Chaînes",
|
||||
"HeaderChapterImages": "Images des chapitres",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"ButtonAudioTracks": "Audio pjesme",
|
||||
"ButtonBack": "Nazad",
|
||||
"ButtonCancel": "Odustani",
|
||||
"ButtonChangeContentType": "Promijeni tip sadržaja",
|
||||
"ButtonChangeServer": "Promijeni Server",
|
||||
"ButtonConnect": "Spoji",
|
||||
"ButtonDelete": "Izbriši",
|
||||
@ -188,8 +187,6 @@
|
||||
"HeaderCancelSeries": "Otkaži serije",
|
||||
"HeaderCastAndCrew": "Glumci i ekipa",
|
||||
"HeaderCastCrew": "Glumci i ekipa",
|
||||
"HeaderChangeFolderType": "Promijeni tip sadržaja",
|
||||
"HeaderChangeFolderTypeHelp": "Za promjenu tipa, uklonite i ponovno izgraditi biblioteku s novim tipom.",
|
||||
"HeaderChannelAccess": "Pristup kanalima",
|
||||
"HeaderChannels": "Kanali",
|
||||
"HeaderCodecProfile": "Profil kodeka",
|
||||
|
@ -26,7 +26,6 @@
|
||||
"ButtonArrowUp": "Fel",
|
||||
"ButtonAudioTracks": "Audió Sávok",
|
||||
"ButtonCancel": "Mégsem",
|
||||
"ButtonChangeContentType": "Tartalom típusának megváltoztatása",
|
||||
"ButtonChangeServer": "Szerver váltás",
|
||||
"ButtonConnect": "Kapcsolódás",
|
||||
"ButtonDelete": "Törlés",
|
||||
@ -139,8 +138,6 @@
|
||||
"HeaderAutomaticUpdates": "Automatikus frissitések",
|
||||
"HeaderCastAndCrew": "Szereplők és Stáb",
|
||||
"HeaderCastCrew": "Szereplők és Stáb",
|
||||
"HeaderChangeFolderType": "Tartalom típusának megváltoztatása",
|
||||
"HeaderChangeFolderTypeHelp": "A típus megváltoztatásához távolítsd el és építsd fel újra a könyvtárat az új típussal.",
|
||||
"HeaderChannels": "Csatornák",
|
||||
"HeaderConnectToServer": "Kapcsolódás a Szerverhez",
|
||||
"HeaderContinueWatching": "Folyamatban lévő filmek",
|
||||
|
@ -59,7 +59,6 @@
|
||||
"ButtonAudioTracks": "Tracce Audio",
|
||||
"ButtonBack": "Indietro",
|
||||
"ButtonCancel": "Annulla",
|
||||
"ButtonChangeContentType": "Cambia tipo del contenuto",
|
||||
"ButtonChangeServer": "Cambia Server",
|
||||
"ButtonConnect": "Connetti",
|
||||
"ButtonDelete": "Elimina",
|
||||
@ -287,8 +286,6 @@
|
||||
"HeaderBranding": "Personalizza",
|
||||
"HeaderCancelRecording": "Annulla la Registrazione",
|
||||
"HeaderCancelSeries": "Annulla Serie TV",
|
||||
"HeaderChangeFolderType": "Cambia il tipo di contenuto",
|
||||
"HeaderChangeFolderTypeHelp": "Per modificare il tipo, rimuovere e ricostruire la raccolta con il nuovo tipo.",
|
||||
"HeaderChannelAccess": "Accesso canali",
|
||||
"HeaderChannels": "Canali",
|
||||
"HeaderChapterImages": "Immagini Capitolo",
|
||||
|
@ -70,7 +70,6 @@
|
||||
"ButtonAudioTracks": "Dybys jolshyqtaryna",
|
||||
"ButtonBack": "Artqa",
|
||||
"ButtonCancel": "Boldyrmaý",
|
||||
"ButtonChangeContentType": "Mazmun túrin ózgertý",
|
||||
"ButtonChangeServer": "Serverdi aýystyrý",
|
||||
"ButtonConnect": "Qosylý",
|
||||
"ButtonDelete": "Joıý",
|
||||
@ -321,8 +320,6 @@
|
||||
"HeaderCancelSeries": "Telehıkaıany boldyrmaý",
|
||||
"HeaderCastAndCrew": "Somdaýshylar men túsirýshiler",
|
||||
"HeaderCastCrew": "Somdaýshylar men túsirýshiler",
|
||||
"HeaderChangeFolderType": "Mazmun túrin ózgertý",
|
||||
"HeaderChangeFolderTypeHelp": "Túrdi ózgertý úshin, tasyǵyshhanany alastańyz da, jańa túr arqyly qaıta quryńyz.",
|
||||
"HeaderChannelAccess": "Arnaǵa qatynaý",
|
||||
"HeaderChannels": "Arnalar",
|
||||
"HeaderChapterImages": "Sahna sýretteri",
|
||||
|
@ -24,7 +24,6 @@
|
||||
"ButtonArrowUp": "위",
|
||||
"ButtonBack": "뒤로",
|
||||
"ButtonCancel": "취소",
|
||||
"ButtonChangeContentType": "콘텐트 종류 변경",
|
||||
"ButtonChangeServer": "서버 변경",
|
||||
"ButtonConnect": "접속",
|
||||
"ButtonDelete": "삭제",
|
||||
@ -142,7 +141,6 @@
|
||||
"HeaderBooks": "책",
|
||||
"HeaderBranding": "브랜딩",
|
||||
"HeaderCastCrew": "배역 및 제작진",
|
||||
"HeaderChangeFolderType": "콘텐트 종류 변경",
|
||||
"HeaderChannelAccess": "채널 접속",
|
||||
"HeaderChannels": "채널",
|
||||
"HeaderCodecProfile": "코덱 프로파일",
|
||||
|
@ -71,7 +71,6 @@
|
||||
"ButtonAudioTracks": "Trek Audio",
|
||||
"ButtonBack": "Kembali",
|
||||
"ButtonCancel": "Batalkan",
|
||||
"ButtonChangeContentType": "Tukar pilihan isi kandungan",
|
||||
"ButtonChangeServer": "Tukar pelayan",
|
||||
"ButtonConnect": "Sambung"
|
||||
}
|
||||
|
@ -47,7 +47,6 @@
|
||||
"ButtonAudioTracks": "Lydspor",
|
||||
"ButtonBack": "Tilbake",
|
||||
"ButtonCancel": "Avbryt",
|
||||
"ButtonChangeContentType": "Velg innholdtype",
|
||||
"ButtonChangeServer": "Endre server",
|
||||
"ButtonConnect": "Koble til",
|
||||
"ButtonDelete": "Slett",
|
||||
@ -223,8 +222,6 @@
|
||||
"HeaderCancelSeries": "Avbryt serie",
|
||||
"HeaderCastAndCrew": "Skuespillere & Crew",
|
||||
"HeaderCastCrew": "Mannskap",
|
||||
"HeaderChangeFolderType": "Endre innholdstype",
|
||||
"HeaderChangeFolderTypeHelp": "For å endre type, må du fjerne og gjenoppbygge biblioteket med den nye typen.",
|
||||
"HeaderChannelAccess": "Kanal tilgang",
|
||||
"HeaderChannels": "Kanaler",
|
||||
"HeaderCodecProfile": "Kodek Profil",
|
||||
|
@ -63,7 +63,6 @@
|
||||
"ButtonAudioTracks": "Audio track",
|
||||
"ButtonBack": "Terug",
|
||||
"ButtonCancel": "Annuleren",
|
||||
"ButtonChangeContentType": "Verander content type",
|
||||
"ButtonChangeServer": "Wijzig server",
|
||||
"ButtonConnect": "Verbind",
|
||||
"ButtonDelete": "Verwijderen",
|
||||
@ -290,8 +289,6 @@
|
||||
"HeaderBranding": "Huisstijl",
|
||||
"HeaderCancelRecording": "Opname Annuleren",
|
||||
"HeaderCancelSeries": "Annuleren Series",
|
||||
"HeaderChangeFolderType": "Verander Content Type",
|
||||
"HeaderChangeFolderTypeHelp": "Als u het type wilt wijzigen, verwijder het dan en maak dan een nieuwe bibliotheek met het nieuwe type.",
|
||||
"HeaderChannelAccess": "Kanaal toegang",
|
||||
"HeaderChannels": "Kanalen",
|
||||
"HeaderChapterImages": "Hoofdstukafbeeldingen",
|
||||
|
@ -68,7 +68,6 @@
|
||||
"ButtonAudioTracks": "Ścieżki dźwiękowe",
|
||||
"ButtonBack": "Wstecz",
|
||||
"ButtonCancel": "Anuluj",
|
||||
"ButtonChangeContentType": "Zmień typ zawartości",
|
||||
"ButtonChangeServer": "Zmień Serwer",
|
||||
"ButtonConnect": "Połacz",
|
||||
"ButtonDelete": "Usuń",
|
||||
@ -309,8 +308,6 @@
|
||||
"HeaderCancelSeries": "Anuluj nagrywanie serialu",
|
||||
"HeaderCastAndCrew": "Obsada i ekipa",
|
||||
"HeaderCastCrew": "Obsada i ekipa",
|
||||
"HeaderChangeFolderType": "Zmień typ zawartości",
|
||||
"HeaderChangeFolderTypeHelp": "W celu zmiany typu, usuń bibliotekę, a następnie dodaj ją określając nowy typ.",
|
||||
"HeaderChannelAccess": "Dostęp do Kanałów",
|
||||
"HeaderChannels": "Kanały",
|
||||
"HeaderChapterImages": "Obrazy rozdziałów",
|
||||
|
@ -64,7 +64,6 @@
|
||||
"ButtonAudioTracks": "Faixas de Áudio",
|
||||
"ButtonBack": "Voltar",
|
||||
"ButtonCancel": "Cancelar",
|
||||
"ButtonChangeContentType": "Alterar o tipo de conteúdo",
|
||||
"ButtonChangeServer": "Alterar Servidor",
|
||||
"ButtonConnect": "Conectar",
|
||||
"ButtonDelete": "Excluir",
|
||||
@ -296,8 +295,6 @@
|
||||
"HeaderCancelSeries": "Cancelar Série",
|
||||
"HeaderCastAndCrew": "Elenco & Equipe",
|
||||
"HeaderCastCrew": "Elenco & Equipe",
|
||||
"HeaderChangeFolderType": "Alterar Tipo do Conteúdo",
|
||||
"HeaderChangeFolderTypeHelp": "Para alterar o tipo, por favor remova e reconstrua a biblioteca com o novo tipo.",
|
||||
"HeaderChannelAccess": "Acesso ao Canal",
|
||||
"HeaderChannels": "Canais",
|
||||
"HeaderChapterImages": "Imagens do Capítulo",
|
||||
|
@ -68,7 +68,6 @@
|
||||
"ButtonAudioTracks": "Аудиодорожки",
|
||||
"ButtonBack": "Назад",
|
||||
"ButtonCancel": "Отменить",
|
||||
"ButtonChangeContentType": "Сменить тип содержания",
|
||||
"ButtonChangeServer": "Сменить сервер",
|
||||
"ButtonConnect": "Подсоединиться",
|
||||
"ButtonDelete": "Удалить",
|
||||
@ -311,8 +310,6 @@
|
||||
"HeaderCancelSeries": "Отмена сериала",
|
||||
"HeaderCastAndCrew": "Снимались и снимали",
|
||||
"HeaderCastCrew": "Снимались и снимали",
|
||||
"HeaderChangeFolderType": "Изменение типа содержания",
|
||||
"HeaderChangeFolderTypeHelp": "Для изменения типа, надо изъять медиатеку и заново построить её с новым типом.",
|
||||
"HeaderChannelAccess": "Доступ ко каналам",
|
||||
"HeaderChannels": "Каналы",
|
||||
"HeaderChapterImages": "Рисунки сцен",
|
||||
|
@ -40,7 +40,6 @@
|
||||
"ButtonAudioTracks": "Audio stopy",
|
||||
"ButtonBack": "Späť",
|
||||
"ButtonCancel": "Zrušiť",
|
||||
"ButtonChangeContentType": "Zmeniť typ obsahu",
|
||||
"ButtonChangeServer": "Zmeniť server",
|
||||
"ButtonConnect": "Pripojiť",
|
||||
"ButtonDelete": "Zmazať",
|
||||
@ -192,7 +191,6 @@
|
||||
"HeaderAutomaticUpdates": "Automatické aktualizácie",
|
||||
"HeaderBooks": "Knihy",
|
||||
"HeaderCastAndCrew": "Obsadenie",
|
||||
"HeaderChangeFolderType": "Zmeniť typ obsahu",
|
||||
"HeaderChannels": "Kanály",
|
||||
"HeaderChapterImages": "Obrázky kapitol",
|
||||
"HeaderConfigureRemoteAccess": "Nastaviť vzdialený prístup",
|
||||
|
@ -60,7 +60,6 @@
|
||||
"ButtonAudioTracks": "Ljudspår",
|
||||
"ButtonBack": "Föregående",
|
||||
"ButtonCancel": "Avbryt",
|
||||
"ButtonChangeContentType": "Ändra innehållstyp",
|
||||
"ButtonChangeServer": "Byt server",
|
||||
"ButtonConnect": "Anslut",
|
||||
"ButtonDelete": "Ta bort",
|
||||
@ -278,8 +277,6 @@
|
||||
"HeaderCancelSeries": "Avbryt serie",
|
||||
"HeaderCastAndCrew": "Medverkande",
|
||||
"HeaderCastCrew": "Rollista & besättning",
|
||||
"HeaderChangeFolderType": "Ändra innehållstyp",
|
||||
"HeaderChangeFolderTypeHelp": "För att ändra typ, ta bort och bygg om biblioteket med den nya typen.",
|
||||
"HeaderChannelAccess": "Kanalåtkomst",
|
||||
"HeaderChannels": "Kanaler",
|
||||
"HeaderChapterImages": "Kapitelbilder",
|
||||
|
@ -62,7 +62,6 @@
|
||||
"ButtonAudioTracks": "音轨",
|
||||
"ButtonBack": "返回",
|
||||
"ButtonCancel": "取消",
|
||||
"ButtonChangeContentType": "更改内容类型",
|
||||
"ButtonChangeServer": "更改服务器",
|
||||
"ButtonConnect": "连接",
|
||||
"ButtonDelete": "删除",
|
||||
@ -281,8 +280,6 @@
|
||||
"HeaderBranding": "品牌",
|
||||
"HeaderCastAndCrew": "演员表",
|
||||
"HeaderCastCrew": "演职人员",
|
||||
"HeaderChangeFolderType": "更改内容类型",
|
||||
"HeaderChangeFolderTypeHelp": "为了改变类型,请移除这个媒体库并以你需要的新类型重新建立一个媒体库。",
|
||||
"HeaderChannelAccess": "频道访问",
|
||||
"HeaderChannels": "频道",
|
||||
"HeaderChapterImages": "章节图片",
|
||||
|
@ -368,7 +368,6 @@
|
||||
"BoxRear": "盒子(背面)",
|
||||
"BurnSubtitlesHelp": "根據字幕格式決定服務器在轉換視頻時是否燒錄字幕。避免燒錄字幕會提高服務器性能。選擇“自動”以燒錄基於圖像的字幕格式(如 VOBSUB, PGS, SUB/IDX 等)和一些複雜的 ASS/SSA 字幕",
|
||||
"ButtonArrowDown": "下",
|
||||
"ButtonChangeContentType": "更改內容類型",
|
||||
"ButtonConnect": "連結",
|
||||
"ButtonDown": "下",
|
||||
"ButtonDownload": "下載",
|
||||
@ -599,8 +598,6 @@
|
||||
"HeaderCancelSeries": "取消系列",
|
||||
"HeaderCancelSyncJob": "取消同步",
|
||||
"HeaderCastAndCrew": "演員與工作人員",
|
||||
"HeaderChangeFolderType": "更改內容類型",
|
||||
"HeaderChangeFolderTypeHelp": "以更改類型,請移除這個媒體庫並以你需要的新類型重新建立一個媒體庫。",
|
||||
"HeaderChannelAccess": "節目存取",
|
||||
"HeaderChapterImages": "章節圖片",
|
||||
"HeaderChapters": "章節",
|
||||
|
Loading…
Reference in New Issue
Block a user