mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
merge from upstream
This commit is contained in:
commit
093a9b1ebd
68 changed files with 20499 additions and 19536 deletions
|
@ -1,56 +0,0 @@
|
|||
define(["loading", "libraryMenu"], function(loading, libraryMenu) {
|
||||
"use strict";
|
||||
|
||||
function reloadList(page) {
|
||||
loading.show();
|
||||
var promise1 = ApiClient.getAvailablePlugins({
|
||||
TargetSystems: "Server"
|
||||
}),
|
||||
promise2 = ApiClient.getInstalledPlugins();
|
||||
Promise.all([promise1, promise2]).then(function(responses) {
|
||||
renderInstalled(page, responses[0], responses[1]), renderCatalog(page, responses[0], responses[1])
|
||||
})
|
||||
}
|
||||
|
||||
function getCategories() {
|
||||
var context = getParameterByName("context"),
|
||||
categories = [];
|
||||
return "sync" == context ? categories.push("Sync") : "livetv" == context ? categories.push("Live TV") : "notifications" == context && categories.push("Notifications"), categories
|
||||
}
|
||||
|
||||
function renderInstalled(page, availablePlugins, installedPlugins) {
|
||||
requirejs(["scripts/pluginspage"], function() {
|
||||
var category = getCategories()[0];
|
||||
installedPlugins = installedPlugins.filter(function(i) {
|
||||
var catalogEntry = availablePlugins.filter(function(a) {
|
||||
return (a.guid || "").toLowerCase() == (i.Id || "").toLowerCase()
|
||||
})[0];
|
||||
return !!catalogEntry && catalogEntry.category == category
|
||||
}), PluginsPage.renderPlugins(page, installedPlugins)
|
||||
})
|
||||
}
|
||||
|
||||
function renderCatalog(page, availablePlugins, installedPlugins) {
|
||||
requirejs(["scripts/plugincatalogpage"], function() {
|
||||
var categories = getCategories();
|
||||
PluginCatalog.renderCatalog({
|
||||
catalogElement: page.querySelector(".catalog"),
|
||||
availablePlugins: availablePlugins,
|
||||
installedPlugins: installedPlugins,
|
||||
categories: categories,
|
||||
showCategory: !1,
|
||||
context: getParameterByName("context"),
|
||||
targetSystem: "Server"
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function onPageShow() {
|
||||
var page = this,
|
||||
context = getParameterByName("context");
|
||||
"sync" == context ? (libraryMenu.setTitle(Globalize.translate("TitleSync")), page.querySelector(".headerHelpButton").setAttribute("href", "https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Sync")) : "livetv" == context ? (libraryMenu.setTitle(Globalize.translate("TitleLiveTV")), page.querySelector(".headerHelpButton").setAttribute("href", "https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Live-TV")) : "notifications" == context && (libraryMenu.setTitle(Globalize.translate("TitleNotifications")), page.querySelector(".headerHelpButton").setAttribute("href", "https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Notifications"))
|
||||
}
|
||||
pageIdOn("pagebeforeshow", "appServicesPage", onPageShow), pageIdOn("pageshow", "appServicesPage", onPageShow), pageIdOn("pageshow", "appServicesPage", function() {
|
||||
reloadList(this)
|
||||
})
|
||||
});
|
|
@ -4,8 +4,19 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
|
|||
function loadPage(page, config, systemInfo) {
|
||||
Array.prototype.forEach.call(page.querySelectorAll(".chkDecodeCodec"), function(c) {
|
||||
c.checked = -1 !== (config.HardwareDecodingCodecs || []).indexOf(c.getAttribute("data-codec"))
|
||||
}), page.querySelector("#chkHardwareEncoding").checked = config.EnableHardwareEncoding, $("#selectVideoDecoder", page).val(config.HardwareAccelerationType), $("#selectThreadCount", page).val(config.EncodingThreadCount), $("#txtDownMixAudioBoost", page).val(config.DownMixAudioBoost), page.querySelector(".txtEncoderPath").value = config.EncoderAppPath || "", $("#txtTranscodingTempPath", page).val(config.TranscodingTempPath || ""), $("#txtVaapiDevice", page).val(config.VaapiDevice || ""), page.querySelector("#selectH264Preset").value = config.H264Preset || "", page.querySelector("#txtH264Crf").value = config.H264Crf || "", page.querySelector("#chkEnableSubtitleExtraction").checked = config.EnableSubtitleExtraction || !1, page.querySelector("#selectVideoDecoder").dispatchEvent(new CustomEvent("change", {
|
||||
bubbles: !0
|
||||
});
|
||||
page.querySelector("#chkHardwareEncoding").checked = config.EnableHardwareEncoding;
|
||||
$("#selectVideoDecoder", page).val(config.HardwareAccelerationType);
|
||||
$("#selectThreadCount", page).val(config.EncodingThreadCount);
|
||||
$("#txtDownMixAudioBoost", page).val(config.DownMixAudioBoost);
|
||||
page.querySelector(".txtEncoderPath").value = config.EncoderAppPathDisplay || "";
|
||||
$("#txtTranscodingTempPath", page).val(config.TranscodingTempPath || "");
|
||||
$("#txtVaapiDevice", page).val(config.VaapiDevice || "");
|
||||
page.querySelector("#selectH264Preset").value = config.H264Preset || "";
|
||||
page.querySelector("#txtH264Crf").value = config.H264Crf || "";
|
||||
page.querySelector("#chkEnableSubtitleExtraction").checked = config.EnableSubtitleExtraction || false;
|
||||
page.querySelector("#selectVideoDecoder").dispatchEvent(new CustomEvent("change", {
|
||||
bubbles: true
|
||||
})), loading.hide()
|
||||
}
|
||||
|
||||
|
@ -90,8 +101,8 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
|
|||
var page = this;
|
||||
ApiClient.getNamedConfiguration("encoding").then(function(config) {
|
||||
ApiClient.getSystemInfo().then(function(systemInfo) {
|
||||
"External" == systemInfo.EncoderLocationType ? (page.querySelector(".fldEncoderPath").classList.add("hide"), page.querySelector(".txtEncoderPath").removeAttribute("required")) : (page.querySelector(".fldEncoderPath").classList.remove("hide"), page.querySelector(".txtEncoderPath").setAttribute("required", "required")), loadPage(page, config, systemInfo)
|
||||
loadPage(page, config, systemInfo);
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
|
|
@ -189,6 +189,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
|||
html += globalize.translate("HeaderAdmin");
|
||||
html += "</h3>";
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder lnkManageServer" data-itemid="dashboard" href="dashboard.html"><i class="md-icon navMenuOptionIcon">dashboard</i><span class="navMenuOptionText">' + globalize.translate("TabDashboard") + "</span></a>";
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder editorViewMenu" data-itemid="editor" href="edititemmetadata.html"><i class="md-icon navMenuOptionIcon">mode_edit</i><span class="navMenuOptionText">' + globalize.translate("Metadata") + "</span></a>";
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
|
@ -198,7 +199,9 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
|||
html += "</h3>";
|
||||
if (user.localUser) {
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder lnkMySettings" href="mypreferencesmenu.html"><i class="md-icon navMenuOptionIcon">settings</i><span class="navMenuOptionText">' + globalize.translate("ButtonSettings") + "</span></a>";
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder" data-itemid="selectserver" href="selectserver.html?showuser=1"><i class="md-icon navMenuOptionIcon">wifi</i><span class="navMenuOptionText">' + globalize.translate("ButtonSelectServer") + "</span></a>";
|
||||
if (appHost.supports("multiserver")) {
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder" data-itemid="selectserver" href="selectserver.html?showuser=1"><i class="md-icon navMenuOptionIcon">wifi</i><span class="navMenuOptionText">' + globalize.translate("ButtonSelectServer") + "</span></a>";
|
||||
}
|
||||
if (!user.localUser.EnableAutoLogin) {
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder btnLogout" data-itemid="logout" href="#"><i class="md-icon navMenuOptionIcon">exit_to_app</i><span class="navMenuOptionText">' + globalize.translate("ButtonSignOut") + "</span></a>";
|
||||
}
|
||||
|
@ -271,7 +274,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
|||
pageIds: ["dashboardPage", "serverActivityPage"],
|
||||
icon: "dashboard"
|
||||
}, {
|
||||
name: globalize.translate("TabSettings"),
|
||||
name: globalize.translate("General"),
|
||||
href: "dashboardgeneral.html",
|
||||
pageIds: ["dashboardGeneralPage"],
|
||||
icon: "settings"
|
||||
|
@ -297,11 +300,6 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
|||
icon: "swap_horiz",
|
||||
href: "encodingsettings.html",
|
||||
pageIds: ["encodingSettingsPage"]
|
||||
}, {
|
||||
name: "Open Subtitles",
|
||||
href: "opensubtitles.html",
|
||||
pageIds: ["openSubtitlesPage"],
|
||||
icon: "closed_caption"
|
||||
}];
|
||||
addPluginPagesToMainMenu(links, pluginItems, "server");
|
||||
links.push({
|
||||
|
@ -373,12 +371,6 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
|||
pageIds: ["scheduledTasksPage", "scheduledTaskPage"],
|
||||
icon: "schedule"
|
||||
});
|
||||
links.push({
|
||||
name: globalize.translate("MetadataManager"),
|
||||
href: "edititemmetadata.html",
|
||||
pageIds: [],
|
||||
icon: "mode_edit"
|
||||
});
|
||||
addPluginPagesToMainMenu(links, pluginItems);
|
||||
return links;
|
||||
}
|
||||
|
@ -386,16 +378,13 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
|||
function addPluginPagesToMainMenu(links, pluginItems, section) {
|
||||
for (var i = 0, length = pluginItems.length; i < length; i++) {
|
||||
var pluginItem = pluginItems[i];
|
||||
|
||||
if (Dashboard.allowPluginPages(pluginItem.PluginId)) {
|
||||
if (pluginItem.EnableInMainMenu && pluginItem.MenuSection === section) {
|
||||
links.push({
|
||||
name: pluginItem.DisplayName,
|
||||
icon: pluginItem.MenuIcon || "folder",
|
||||
href: Dashboard.getConfigurationPageUrl(pluginItem.Name),
|
||||
pageUrls: [Dashboard.getConfigurationPageUrl(pluginItem.Name)]
|
||||
});
|
||||
}
|
||||
if (pluginItem.EnableInMainMenu && pluginItem.MenuSection === section) {
|
||||
links.push({
|
||||
name: pluginItem.DisplayName,
|
||||
icon: pluginItem.MenuIcon || "folder",
|
||||
href: Dashboard.getConfigurationPageUrl(pluginItem.Name),
|
||||
pageUrls: [Dashboard.getConfigurationPageUrl(pluginItem.Name)]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,16 +188,6 @@ define(["jQuery", "globalize", "scripts/taskbutton", "dom", "libraryMenu", "layo
|
|||
Dashboard.navigate("livetvtuner.html")
|
||||
}
|
||||
|
||||
function getTabs() {
|
||||
return [{
|
||||
href: "livetvstatus.html",
|
||||
name: globalize.translate("TabDevices")
|
||||
}, {
|
||||
href: "appservices.html?context=livetv",
|
||||
name: globalize.translate("TabServices")
|
||||
}]
|
||||
}
|
||||
|
||||
function showDeviceMenu(button, tunerDeviceId) {
|
||||
var items = [];
|
||||
items.push({
|
||||
|
@ -240,7 +230,6 @@ define(["jQuery", "globalize", "scripts/taskbutton", "dom", "libraryMenu", "layo
|
|||
addProvider(this)
|
||||
}), page.querySelector(".devicesList").addEventListener("click", onDevicesListClick)
|
||||
}).on("pageshow", "#liveTvStatusPage", function() {
|
||||
libraryMenu.setTabs("livetvadmin", 0, getTabs);
|
||||
var page = this;
|
||||
reload(page), taskButton({
|
||||
mode: "on",
|
||||
|
|
|
@ -2,29 +2,59 @@ define(["loading", "libraryMenu", "globalize", "listViewStyle", "emby-linkbutton
|
|||
"use strict";
|
||||
|
||||
function reload(page) {
|
||||
loading.show(), ApiClient.getJSON(ApiClient.getUrl("Notifications/Types")).then(function(list) {
|
||||
var html = "",
|
||||
lastCategory = "",
|
||||
showHelp = !0;
|
||||
html += list.map(function(i) {
|
||||
loading.show();
|
||||
ApiClient.getJSON(ApiClient.getUrl("Notifications/Types")).then(function(list) {
|
||||
var html = "";
|
||||
var lastCategory = "";
|
||||
var showHelp = true;
|
||||
html += list.map(function(notification) {
|
||||
var itemHtml = "";
|
||||
return i.Category != lastCategory && (lastCategory = i.Category, lastCategory && (itemHtml += "</div>", itemHtml += "</div>"), itemHtml += '<div class="verticalSection verticalSection-extrabottompadding">', itemHtml += '<div class="sectionTitleContainer" style="margin-bottom:1em;">', itemHtml += '<h2 class="sectionTitle">', itemHtml += i.Category, itemHtml += "</h2>", showHelp && (showHelp = !1, itemHtml += '<a is="emby-linkbutton" class="raised button-alt headerHelpButton" target="_blank" href="https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Notifications">' + globalize.translate("Help") + "</a>"), itemHtml += "</div>", itemHtml += '<div class="paperList">'), itemHtml += '<a class="listItem listItem-border" is="emby-linkbutton" data-ripple="false" href="notificationsetting.html?type=' + i.Type + '">', i.Enabled ? itemHtml += '<i class="listItemIcon md-icon">notifications_active</i>' : itemHtml += '<i class="listItemIcon md-icon" style="background-color:#999;">notifications_off</i>', itemHtml += '<div class="listItemBody">', itemHtml += '<div class="listItemBodyText">' + i.Name + "</div>", itemHtml += "</div>", itemHtml += '<button type="button" is="paper-icon-button-light"><i class="md-icon">mode_edit</i></button>', itemHtml += "</a>"
|
||||
}).join(""), list.length && (html += "</div>", html += "</div>"), page.querySelector(".notificationList").innerHTML = html, loading.hide()
|
||||
if (notification.Category !== lastCategory) {
|
||||
lastCategory = notification.Category;
|
||||
if (lastCategory) {
|
||||
itemHtml += "</div>";
|
||||
itemHtml += "</div>";
|
||||
}
|
||||
itemHtml += '<div class="verticalSection verticalSection-extrabottompadding">';
|
||||
itemHtml += '<div class="sectionTitleContainer" style="margin-bottom:1em;">';
|
||||
itemHtml += '<h2 class="sectionTitle">';
|
||||
itemHtml += notification.Category;
|
||||
itemHtml += "</h2>";
|
||||
if (showHelp) {
|
||||
showHelp = false;
|
||||
itemHtml += '<a is="emby-linkbutton" class="raised button-alt headerHelpButton" target="_blank" href="https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Notifications">';
|
||||
itemHtml += globalize.translate("Help");
|
||||
itemHtml += "</a>";
|
||||
}
|
||||
itemHtml += "</div>";
|
||||
itemHtml += '<div class="paperList">';
|
||||
}
|
||||
itemHtml += '<a class="listItem listItem-border" is="emby-linkbutton" data-ripple="false" href="notificationsetting.html?type=' + notification.Type + '">';
|
||||
if (notification.Enabled) {
|
||||
itemHtml += '<i class="listItemIcon md-icon">notifications_active</i>';
|
||||
} else {
|
||||
itemHtml += '<i class="listItemIcon md-icon" style="background-color:#999;">notifications_off</i>';
|
||||
}
|
||||
itemHtml += '<div class="listItemBody">';
|
||||
itemHtml += '<div class="listItemBodyText">' + notification.Name + "</div>";
|
||||
itemHtml += "</div>";
|
||||
itemHtml += '<button type="button" is="paper-icon-button-light"><i class="md-icon">mode_edit</i></button>';
|
||||
itemHtml += "</a>";
|
||||
return itemHtml;
|
||||
}).join("");
|
||||
|
||||
if (list.length) {
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
}
|
||||
page.querySelector(".notificationList").innerHTML = html;
|
||||
loading.hide();
|
||||
})
|
||||
}
|
||||
|
||||
function getTabs() {
|
||||
return [{
|
||||
href: "notificationsettings.html",
|
||||
name: globalize.translate("TabNotifications")
|
||||
}, {
|
||||
href: "appservices.html?context=notifications",
|
||||
name: globalize.translate("TabServices")
|
||||
}]
|
||||
}
|
||||
return function(view, params) {
|
||||
view.addEventListener("viewshow", function() {
|
||||
libraryMenu.setTabs("notifications", 0, getTabs), reload(view)
|
||||
})
|
||||
reload(view);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
define(["loading", "fnchecked", "emby-linkbutton", "emby-input", "emby-checkbox", "emby-button"], function (loading) {
|
||||
"use strict";
|
||||
|
||||
function loadPage(page, config) {
|
||||
page.querySelector("#txtOpenSubtitleUsername").value = config.OpenSubtitlesUsername;
|
||||
page.querySelector("#txtOpenSubtitlePassword").value = config.OpenSubtitlesPasswordHash || "";
|
||||
loading.hide();
|
||||
}
|
||||
|
||||
function onSubmit(evt) {
|
||||
evt.preventDefault();
|
||||
loading.show();
|
||||
var form = this;
|
||||
ApiClient.getNamedConfiguration("subtitles").then(function (config) {
|
||||
config.OpenSubtitlesUsername = form.querySelector("#txtOpenSubtitleUsername").value;
|
||||
var newPassword = form.querySelector("#txtOpenSubtitlePassword").value;
|
||||
|
||||
if (newPassword) {
|
||||
config.OpenSubtitlesPasswordHash = newPassword;
|
||||
}
|
||||
|
||||
ApiClient.updateNamedConfiguration("subtitles", config).then(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).on("pageinit", "#openSubtitlesPage", function() {
|
||||
$(".metadataSubtitlesForm").off("submit", onSubmit).on("submit", onSubmit)
|
||||
}).on("pageshow", "#openSubtitlesPage", function() {
|
||||
loading.show();
|
||||
var page = this;
|
||||
ApiClient.getNamedConfiguration("subtitles").then(function (response) {
|
||||
loadPage(page, response);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -3,7 +3,6 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
|||
|
||||
function reloadList(page) {
|
||||
loading.show();
|
||||
query.IsAppStoreSafe = true;
|
||||
var promise1 = ApiClient.getAvailablePlugins(query);
|
||||
var promise2 = ApiClient.getInstalledPlugins();
|
||||
Promise.all([promise1, promise2]).then(function (responses) {
|
||||
|
@ -16,13 +15,8 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
|||
});
|
||||
}
|
||||
|
||||
function populateList(options) {
|
||||
populateListInternal(options);
|
||||
}
|
||||
|
||||
function getHeaderText(category) {
|
||||
category = category.replace(" ", "");
|
||||
|
||||
if ("Channel" === category) {
|
||||
category = "Channels";
|
||||
} else if ("Theme" === category) {
|
||||
|
@ -36,11 +30,7 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
|||
return globalize.translate(category);
|
||||
}
|
||||
|
||||
function isUserInstalledPlugin(plugin) {
|
||||
return -1 === ["02528C96-F727-44D7-BE87-9EEF040758C3", "0277E613-3EC0-4360-A3DE-F8AF0AABB5E9", "4DCB591C-0FA2-4C5D-A7E5-DABE37164C8B"].indexOf(plugin.guid);
|
||||
}
|
||||
|
||||
function populateListInternal(options) {
|
||||
function populateList(options) {
|
||||
var availablePlugins = options.availablePlugins;
|
||||
var installedPlugins = options.installedPlugins;
|
||||
var allPlugins = availablePlugins.filter(function (plugin) {
|
||||
|
@ -51,84 +41,37 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
|||
if (!options.targetSystem || plugin.targetSystem == options.targetSystem) {
|
||||
return "UserInstalled" == plugin.type;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
availablePlugins = allPlugins.sort(function (a__e, b__r) {
|
||||
var aName = a__e.category;
|
||||
var bName = b__r.category;
|
||||
|
||||
if (aName > bName) {
|
||||
availablePlugins = allPlugins.sort(function (a, b) {
|
||||
if (a.category > b.category) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (bName > aName) {
|
||||
} else if (b.category > a.category) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
aName = a__e.name;
|
||||
bName = b__r.name;
|
||||
|
||||
if (aName > bName) {
|
||||
if (a.name > b.name) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (bName > aName) {
|
||||
} else if (b.name > a.name) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
});
|
||||
var i__q;
|
||||
|
||||
var length;
|
||||
var plugin;
|
||||
var currentCategory;
|
||||
var html = "";
|
||||
|
||||
if (!options.categories) {
|
||||
currentCategory = globalize.translate("HeaderTopPlugins");
|
||||
html += '<div class="verticalSection">';
|
||||
html += '<h2 class="sectionTitle sectionTitle-cards">' + currentCategory + "</h2>";
|
||||
var topPlugins = allPlugins.slice(0).sort(function (a__t, b__y) {
|
||||
if (a__t.installs > b__y.installs) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (b__y.installs > a__t.installs) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
var aName = a__t.name;
|
||||
var bName = b__y.name;
|
||||
|
||||
if (aName > bName) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (bName > aName) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}).filter(isUserInstalledPlugin);
|
||||
html += '<div class="itemsContainer vertical-wrap">';
|
||||
var limit = screen.availWidth >= 1920 ? 15 : 12;
|
||||
|
||||
for (i__q = 0, length = Math.min(topPlugins.length, limit); i__q < length; i__q++) {
|
||||
html += getPluginHtml(topPlugins[i__q], options, installedPlugins);
|
||||
}
|
||||
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
var hasOpenTag = false;
|
||||
|
||||
for (currentCategory = null, false === options.showCategory && (html += '<div class="itemsContainer vertical-wrap">', hasOpenTag = true), i__q = 0, length = availablePlugins.length; i__q < length; i__q++) {
|
||||
plugin = availablePlugins[i__q];
|
||||
currentCategory = null;
|
||||
if (options.showCategory === false) {
|
||||
html += '<div class="itemsContainer vertical-wrap">';
|
||||
hasOpenTag = true;
|
||||
}
|
||||
for (var i = 0; i < availablePlugins.length; i++) {
|
||||
plugin = availablePlugins[i];
|
||||
var category = plugin.categoryDisplayName;
|
||||
|
||||
if (category != currentCategory) {
|
||||
|
@ -138,16 +81,13 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
|||
html += "</div>";
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
html += '<div class="verticalSection">';
|
||||
html += '<h2 class="sectionTitle sectionTitle-cards">' + category + "</h2>";
|
||||
html += '<div class="itemsContainer vertical-wrap">';
|
||||
hasOpenTag = true;
|
||||
}
|
||||
|
||||
currentCategory = category;
|
||||
}
|
||||
|
||||
html += getPluginHtml(plugin, options, installedPlugins);
|
||||
}
|
||||
|
||||
|
@ -215,11 +155,14 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
|||
|
||||
var query = {
|
||||
TargetSystems: "Server",
|
||||
IsAppStoreSafe: true,
|
||||
IsAdult: false
|
||||
};
|
||||
|
||||
window.PluginCatalog = {
|
||||
renderCatalog: populateList
|
||||
};
|
||||
|
||||
return function (view, params) {
|
||||
view.querySelector("#selectSystem").addEventListener("change", function () {
|
||||
query.TargetSystems = this.value;
|
||||
|
|
|
@ -32,12 +32,37 @@ define(["loading", "libraryMenu", "dom", "globalize", "cardStyle", "emby-linkbut
|
|||
function getPluginCardHtml(plugin, pluginConfigurationPages) {
|
||||
var configPage = pluginConfigurationPages.filter(function(pluginConfigurationPage) {
|
||||
return pluginConfigurationPage.PluginId == plugin.Id
|
||||
})[0],
|
||||
html = "",
|
||||
disallowPlugins = !Dashboard.allowPluginPages(plugin.Id),
|
||||
configPageUrl = configPage ? Dashboard.getConfigurationPageUrl(configPage.Name) : null,
|
||||
href = configPage && !disallowPlugins ? configPageUrl : null;
|
||||
return html += "<div data-id='" + plugin.Id + "' data-name='" + plugin.Name + "' class='card backdropCard'>", html += '<div class="cardBox visualCardBox">', html += '<div class="cardScalable">', html += '<div class="cardPadder cardPadder-backdrop"></div>', html += href ? '<a class="cardContent cardImageContainer" is="emby-linkbutton" href="' + href + '">' : configPageUrl ? disallowPlugins ? '<div class="cardContent connectModePluginCard cardImageContainer">' : '<div class="cardContent cardImageContainer">' : '<div class="cardContent noConfigPluginCard noHoverEffect cardImageContainer">', plugin.ImageUrl ? (html += '<div class="cardImage coveredImage" style="background-image:url(\'' + plugin.ImageUrl + "');\">", html += "</div>") : html += '<i class="cardImageIcon md-icon"></i>', html += href ? "</a>" : "</div>", html += "</div>", html += '<div class="cardFooter">', 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">more_horiz</i></button>', html += "</div>", html += "<div class='cardText'>", html += configPage ? configPage.DisplayName || plugin.Name : plugin.Name, html += "</div>", html += "<div class='cardText cardText-secondary'>", html += plugin.Version, html += "</div>", html += "</div>", html += "</div>", html += "</div>"
|
||||
})[0];
|
||||
var configPageUrl = configPage ? Dashboard.getConfigurationPageUrl(configPage.Name) : null;
|
||||
|
||||
var html = "";
|
||||
html += "<div data-id='" + plugin.Id + "' data-name='" + plugin.Name + "' class='card backdropCard'>";
|
||||
html += '<div class="cardBox visualCardBox">';
|
||||
html += '<div class="cardScalable">';
|
||||
html += '<div class="cardPadder cardPadder-backdrop"></div>';
|
||||
html += configPageUrl ? '<a class="cardContent cardImageContainer" is="emby-linkbutton" href="' + configPageUrl + '">' : '<div class="cardContent noConfigPluginCard noHoverEffect cardImageContainer">';
|
||||
if (plugin.ImageUrl) {
|
||||
html += '<div class="cardImage coveredImage" style="background-image:url(\'' + plugin.ImageUrl + "');\">";
|
||||
html += "</div>";
|
||||
} else {
|
||||
html += '<i class="cardImageIcon md-icon"></i>';
|
||||
}
|
||||
html += configPageUrl ? "</a>" : "</div>";
|
||||
html += "</div>";
|
||||
html += '<div class="cardFooter">';
|
||||
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">more_horiz</i></button>';
|
||||
html += "</div>";
|
||||
html += "<div class='cardText'>";
|
||||
html += configPage ? configPage.DisplayName || plugin.Name : plugin.Name;
|
||||
html += "</div>";
|
||||
html += "<div class='cardText cardText-secondary'>";
|
||||
html += plugin.Version;
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
return html;
|
||||
}
|
||||
|
||||
function renderPlugins(page, plugins, showNoPluginsMessage) {
|
||||
|
@ -117,4 +142,4 @@ define(["loading", "libraryMenu", "dom", "globalize", "cardStyle", "emby-linkbut
|
|||
}), window.PluginsPage = {
|
||||
renderPlugins: renderPlugins
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -32,11 +32,11 @@ function getParameterByName(name, url) {
|
|||
function pageClassOn(eventName, className, fn) {
|
||||
"use strict";
|
||||
|
||||
document.addEventListener(eventName, function (e__q) {
|
||||
var target = e__q.target;
|
||||
document.addEventListener(eventName, function (event) {
|
||||
var target = event.target;
|
||||
|
||||
if (target.classList.contains(className)) {
|
||||
fn.call(target, e__q);
|
||||
fn.call(target, event);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -44,22 +44,21 @@ function pageClassOn(eventName, className, fn) {
|
|||
function pageIdOn(eventName, id, fn) {
|
||||
"use strict";
|
||||
|
||||
document.addEventListener(eventName, function (e__w) {
|
||||
var target = e__w.target;
|
||||
document.addEventListener(eventName, function (event) {
|
||||
var target = event.target;
|
||||
|
||||
if (target.id === id) {
|
||||
fn.call(target, e__w);
|
||||
fn.call(target, event);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var Dashboard = {
|
||||
allowPluginPages: function (pluginId) {
|
||||
return true;
|
||||
},
|
||||
getCurrentUser: function () {
|
||||
return window.ApiClient.getCurrentUser(false);
|
||||
},
|
||||
|
||||
//TODO: investigate url prefix support for serverAddress function
|
||||
serverAddress: function () {
|
||||
if (AppInfo.isNativeApp) {
|
||||
var apiClient = window.ApiClient;
|
||||
|
@ -231,17 +230,7 @@ var AppInfo = {};
|
|||
!function () {
|
||||
"use strict";
|
||||
|
||||
function initializeApiClient(apiClient) {
|
||||
if (!("cordova" !== self.appMode && "android" !== self.appMode)) {
|
||||
apiClient.getAvailablePlugins = function () {
|
||||
return Promise.resolve([]);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function onApiClientCreated(e__e, newApiClient) {
|
||||
initializeApiClient(newApiClient);
|
||||
|
||||
function onApiClientCreated(e, newApiClient) {
|
||||
if (window.$) {
|
||||
$.ajax = newApiClient.ajax;
|
||||
}
|
||||
|
@ -283,12 +272,12 @@ var AppInfo = {};
|
|||
|
||||
function createConnectionManager() {
|
||||
return require(["connectionManagerFactory", "apphost", "credentialprovider", "events", "userSettings"], function (ConnectionManager, apphost, credentialProvider, events, userSettings) {
|
||||
var credentialProviderInstance = new credentialProvider(),
|
||||
promises = [apphost.getSyncProfile(), apphost.init()];
|
||||
var credentialProviderInstance = new credentialProvider();
|
||||
var promises = [apphost.getSyncProfile(), apphost.init()];
|
||||
|
||||
Promise.all(promises).then(function (responses) {
|
||||
var deviceProfile = responses[0],
|
||||
capabilities = Dashboard.capabilities(apphost);
|
||||
var deviceProfile = responses[0];
|
||||
var capabilities = Dashboard.capabilities(apphost);
|
||||
|
||||
capabilities.DeviceProfile = deviceProfile;
|
||||
|
||||
|
@ -306,7 +295,7 @@ var AppInfo = {};
|
|||
var apiClient = new apiClientFactory(Dashboard.serverAddress(), apphost.appName(), apphost.appVersion(), apphost.deviceName(), apphost.deviceId(), window.devicePixelRatio);
|
||||
|
||||
apiClient.enableAutomaticNetworking = false;
|
||||
apiClient.manualAddressOnly = true;
|
||||
apiClient.manualAddressOnly = true;
|
||||
|
||||
connectionManager.addApiClient(apiClient);
|
||||
|
||||
|
@ -349,7 +338,7 @@ var AppInfo = {};
|
|||
}
|
||||
|
||||
function getPlaybackManager(playbackManager) {
|
||||
window.addEventListener("beforeunload", function (e__r) {
|
||||
window.addEventListener("beforeunload", function () {
|
||||
try {
|
||||
playbackManager.onAppClose();
|
||||
} catch (err) {
|
||||
|
@ -467,12 +456,10 @@ var AppInfo = {};
|
|||
|
||||
if ("registerElement" in document) {
|
||||
define("registerElement", []);
|
||||
} else if (browser.msie) {
|
||||
define("registerElement", [bowerPath + "/webcomponentsjs/webcomponents-lite.min.js"], returnFirstDependency);
|
||||
} else {
|
||||
if (browser.msie) {
|
||||
define("registerElement", [bowerPath + "/webcomponentsjs/webcomponents-lite.min.js"], returnFirstDependency);
|
||||
} else {
|
||||
define("registerElement", [bowerPath + "/document-register-element/build/document-register-element"], returnFirstDependency);
|
||||
}
|
||||
define("registerElement", [bowerPath + "/document-register-element/build/document-register-element"], returnFirstDependency);
|
||||
}
|
||||
|
||||
if ("cordova" === self.appMode || "android" === self.appMode) {
|
||||
|
@ -532,19 +519,15 @@ var AppInfo = {};
|
|||
define("bgtaskregister", ["environments/windows-uwp/bgtaskregister"], returnFirstDependency);
|
||||
define("transfermanager", ["environments/windows-uwp/transfermanager"], returnFirstDependency);
|
||||
define("filerepository", ["environments/windows-uwp/filerepository"], returnFirstDependency);
|
||||
} else if ("cordova" === self.appMode) {
|
||||
define("filerepository", ["cordova/filerepository"], returnFirstDependency);
|
||||
define("transfermanager", ["filerepository"], returnFirstDependency);
|
||||
} else if ("android" === self.appMode) {
|
||||
define("transfermanager", ["cordova/transfermanager"], returnFirstDependency);
|
||||
define("filerepository", ["cordova/filerepository"], returnFirstDependency);
|
||||
} else {
|
||||
if ("cordova" === self.appMode) {
|
||||
define("filerepository", ["cordova/filerepository"], returnFirstDependency);
|
||||
define("transfermanager", ["filerepository"], returnFirstDependency);
|
||||
} else {
|
||||
if ("android" === self.appMode) {
|
||||
define("transfermanager", ["cordova/transfermanager"], returnFirstDependency);
|
||||
define("filerepository", ["cordova/filerepository"], returnFirstDependency);
|
||||
} else {
|
||||
define("transfermanager", [apiClientBowerPath + "/sync/transfermanager"], returnFirstDependency);
|
||||
define("filerepository", [apiClientBowerPath + "/sync/filerepository"], returnFirstDependency);
|
||||
}
|
||||
}
|
||||
define("transfermanager", [apiClientBowerPath + "/sync/transfermanager"], returnFirstDependency);
|
||||
define("filerepository", [apiClientBowerPath + "/sync/filerepository"], returnFirstDependency);
|
||||
}
|
||||
|
||||
if ("android" === self.appMode) {
|
||||
|
@ -600,10 +583,10 @@ var AppInfo = {};
|
|||
|
||||
function loadCoreDictionary(globalize) {
|
||||
var languages = ["ar", "be-by", "bg-bg", "ca", "cs", "da", "de", "el", "en-gb", "en-us", "es", "es-ar", "es-mx", "fa", "fi", "fr", "fr-ca", "gsw", "he", "hi-in", "hr", "hu", "id", "it", "kk", "ko", "lt-lt", "ms", "nb", "nl", "pl", "pt-br", "pt-pt", "ro", "ru", "sk", "sl-si", "sv", "tr", "uk", "vi", "zh-cn", "zh-hk", "zh-tw"];
|
||||
var translations = languages.map(function (i__t) {
|
||||
var translations = languages.map(function (language) {
|
||||
return {
|
||||
lang: i__t,
|
||||
path: "strings/" + i__t + ".json"
|
||||
lang: language,
|
||||
path: "strings/" + language + ".json"
|
||||
};
|
||||
});
|
||||
globalize.defaultModule("core");
|
||||
|
@ -655,12 +638,6 @@ var AppInfo = {};
|
|||
roles: "admin",
|
||||
controller: "scripts/addpluginpage"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/appservices.html",
|
||||
dependencies: [],
|
||||
autoFocus: false,
|
||||
roles: "admin"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/autoorganizelog.html",
|
||||
dependencies: [],
|
||||
|
@ -750,12 +727,6 @@ var AppInfo = {};
|
|||
autoFocus: false,
|
||||
roles: "admin"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/opensubtitles.html",
|
||||
dependencies: [],
|
||||
autoFocus: false,
|
||||
roles: "admin"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/forgotpassword.html",
|
||||
dependencies: ["emby-input", "emby-button"],
|
||||
|
@ -1159,7 +1130,15 @@ var AppInfo = {};
|
|||
|
||||
function loadPlugins(externalPlugins, appHost, browser, shell) {
|
||||
console.log("Loading installed plugins");
|
||||
var list = ["components/playback/playbackvalidation", "components/playback/playaccessvalidation", "components/playback/experimentalwarnings", "components/htmlaudioplayer/plugin", "components/htmlvideoplayer/plugin", "components/photoplayer/plugin", "components/youtubeplayer/plugin"];
|
||||
var list = [
|
||||
"components/playback/playbackvalidation",
|
||||
"components/playback/playaccessvalidation",
|
||||
"components/playback/experimentalwarnings",
|
||||
"components/htmlaudioplayer/plugin",
|
||||
"components/htmlvideoplayer/plugin",
|
||||
"components/photoplayer/plugin",
|
||||
"components/youtubeplayer/plugin"
|
||||
];
|
||||
|
||||
if ("cordova" === self.appMode) {
|
||||
list.push("cordova/chromecast");
|
||||
|
@ -1177,8 +1156,8 @@ var AppInfo = {};
|
|||
}
|
||||
}
|
||||
|
||||
for (var i__y = 0, length = externalPlugins.length; i__y < length; i__y++) {
|
||||
list.push(externalPlugins[i__y]);
|
||||
for (var index = 0, length = externalPlugins.length; index < length; index++) {
|
||||
list.push(externalPlugins[index]);
|
||||
}
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
@ -1201,96 +1180,91 @@ var AppInfo = {};
|
|||
function onAppReady(browser) {
|
||||
console.log("Begin onAppReady");
|
||||
|
||||
var isInBackground = -1 !== self.location.href.toString().toLowerCase().indexOf("start=backgroundsync");
|
||||
// ensure that appHost is loaded in this point
|
||||
require(['appHost'], function (appHost) {
|
||||
var isInBackground = -1 !== self.location.href.toString().toLowerCase().indexOf("start=backgroundsync");
|
||||
|
||||
window.Emby = {};
|
||||
window.Emby = {};
|
||||
|
||||
console.log("onAppReady - loading dependencies");
|
||||
console.log("onAppReady - loading dependencies");
|
||||
|
||||
if (isInBackground) {
|
||||
syncNow();
|
||||
} else {
|
||||
if (isInBackground) {
|
||||
syncNow();
|
||||
} else {
|
||||
|
||||
if (browser.iOS) {
|
||||
require(['css!devices/ios/ios.css']);
|
||||
}
|
||||
if (browser.iOS) {
|
||||
require(['css!devices/ios/ios.css']);
|
||||
}
|
||||
|
||||
require(['apphost', 'appRouter', 'scripts/themeloader', 'libraryMenu'], function (appHost, pageObjects) {
|
||||
window.Emby.Page = pageObjects;
|
||||
require(['appRouter', 'scripts/themeloader', 'libraryMenu'], function (pageObjects) {
|
||||
window.Emby.Page = pageObjects;
|
||||
|
||||
defineCoreRoutes(appHost);
|
||||
defineCoreRoutes(appHost);
|
||||
|
||||
Emby.Page.start({
|
||||
click: false,
|
||||
hashbang: true
|
||||
});
|
||||
Emby.Page.start({
|
||||
click: false,
|
||||
hashbang: true
|
||||
});
|
||||
|
||||
require(["components/thememediaplayer", "scripts/autobackdrops"]);
|
||||
require(["components/thememediaplayer", "scripts/autobackdrops"]);
|
||||
|
||||
if (!("cordova" !== self.appMode && "android" !== self.appMode)) {
|
||||
if (browser.android) {
|
||||
require(["cordova/mediasession", "cordova/chromecast", "cordova/appshortcuts"]);
|
||||
} else if (browser.safari) {
|
||||
require(["cordova/mediasession", "cordova/volume", "cordova/statusbar", "cordova/backgroundfetch"]);
|
||||
if ("cordova" === self.appMode || "android" === self.appMode) {
|
||||
if (browser.android) {
|
||||
require(["cordova/mediasession", "cordova/chromecast", "cordova/appshortcuts"]);
|
||||
} else if (browser.safari) {
|
||||
require(["cordova/mediasession", "cordova/volume", "cordova/statusbar", "cordova/backgroundfetch"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!(browser.tv || browser.xboxOne || browser.ps4)) {
|
||||
require(["components/nowplayingbar/nowplayingbar"]);
|
||||
}
|
||||
|
||||
if (appHost.supports("remotecontrol")) {
|
||||
require(["playerSelectionMenu", "components/playback/remotecontrolautoplay"]);
|
||||
}
|
||||
|
||||
if (!(appHost.supports("physicalvolumecontrol") && !browser.touch || browser.edge)) {
|
||||
require(["components/playback/volumeosd"]);
|
||||
}
|
||||
|
||||
if (navigator.mediaSession) {
|
||||
require(["mediaSession"]);
|
||||
}
|
||||
|
||||
if (!(browser.tv || browser.xboxOne)) {
|
||||
require(["components/playback/playbackorientation"]);
|
||||
registerServiceWorker();
|
||||
|
||||
if (window.Notification) {
|
||||
require(["components/notifications/notifications"]);
|
||||
if (!browser.tv && !browser.xboxOne && !browser.ps4) {
|
||||
require(["components/nowplayingbar/nowplayingbar"]);
|
||||
}
|
||||
}
|
||||
|
||||
require(["playerSelectionMenu"]);
|
||||
if (appHost.supports("remotecontrol")) {
|
||||
require(["playerSelectionMenu", "components/playback/remotecontrolautoplay"]);
|
||||
}
|
||||
|
||||
if (appHost.supports("fullscreenchange") && (browser.edgeUwp || -1 !== navigator.userAgent.toLowerCase().indexOf("electron"))) {
|
||||
require(["fullscreen-doubleclick"]);
|
||||
}
|
||||
if (!(appHost.supports("physicalvolumecontrol") && !browser.touch || browser.edge)) {
|
||||
require(["components/playback/volumeosd"]);
|
||||
}
|
||||
|
||||
if (appHost.supports("sync")) {
|
||||
initLocalSyncEvents();
|
||||
}
|
||||
if (navigator.mediaSession) {
|
||||
require(["mediaSession"]);
|
||||
}
|
||||
|
||||
if (!AppInfo.isNativeApp) {
|
||||
if (window.ApiClient) {
|
||||
require(["apiInput"]);
|
||||
|
||||
if (!browser.tv && !browser.xboxOne) {
|
||||
require(["components/playback/playbackorientation"]);
|
||||
registerServiceWorker();
|
||||
|
||||
if (window.Notification) {
|
||||
require(["components/notifications/notifications"]);
|
||||
}
|
||||
}
|
||||
|
||||
require(["playerSelectionMenu"]);
|
||||
|
||||
if (appHost.supports("fullscreenchange") && (browser.edgeUwp || -1 !== navigator.userAgent.toLowerCase().indexOf("electron"))) {
|
||||
require(["fullscreen-doubleclick"]);
|
||||
}
|
||||
|
||||
if (appHost.supports("sync")) {
|
||||
initLocalSyncEvents();
|
||||
}
|
||||
|
||||
if (!AppInfo.isNativeApp && window.ApiClient) {
|
||||
require(["css!" + ApiClient.getUrl("Branding/Css")]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function registerServiceWorker() {
|
||||
if (navigator.serviceWorker && "cordova" !== self.appMode && "android" !== self.appMode) {
|
||||
try {
|
||||
navigator.serviceWorker.register("serviceworker.js").then(function () {
|
||||
return navigator.serviceWorker.ready;
|
||||
}).then(function (reg) {
|
||||
if (reg && reg.sync) {
|
||||
return reg.sync.register("emby-sync").then(function () {// TODO cvium: the sync serviceworker is a noop?
|
||||
//window.SyncRegistered = Dashboard.isConnectMode()
|
||||
});
|
||||
}
|
||||
});
|
||||
navigator.serviceWorker.register("serviceworker.js");
|
||||
} catch (err) {
|
||||
console.log("Error registering serviceWorker: " + err);
|
||||
}
|
||||
|
@ -1848,39 +1822,9 @@ var AppInfo = {};
|
|||
}
|
||||
}
|
||||
|
||||
if ("Playlist" == itemType) {
|
||||
return "itemdetails.html?id=" + id + "&serverId=" + serverId;
|
||||
}
|
||||
var itemTypes = ["Playlist", "TvChannel", "Program", "BoxSet", "MusicAlbum", "MusicGenre", "Person", "Recording", "MusicArtist"];
|
||||
|
||||
if ("TvChannel" == itemType) {
|
||||
return "itemdetails.html?id=" + id + "&serverId=" + serverId;
|
||||
}
|
||||
|
||||
if ("Program" == itemType) {
|
||||
return "itemdetails.html?id=" + id + "&serverId=" + serverId;
|
||||
}
|
||||
|
||||
if ("BoxSet" == itemType) {
|
||||
return "itemdetails.html?id=" + id + "&serverId=" + serverId;
|
||||
}
|
||||
|
||||
if ("MusicAlbum" == itemType) {
|
||||
return "itemdetails.html?id=" + id + "&serverId=" + serverId;
|
||||
}
|
||||
|
||||
if ("MusicGenre" == itemType) {
|
||||
return "itemdetails.html?id=" + id + "&serverId=" + serverId;
|
||||
}
|
||||
|
||||
if ("Person" == itemType) {
|
||||
return "itemdetails.html?id=" + id + "&serverId=" + serverId;
|
||||
}
|
||||
|
||||
if ("Recording" == itemType) {
|
||||
return "itemdetails.html?id=" + id + "&serverId=" + serverId;
|
||||
}
|
||||
|
||||
if ("MusicArtist" == itemType) {
|
||||
if (itemTypes.indexOf(itemType) >= 0) {
|
||||
return "itemdetails.html?id=" + id + "&serverId=" + serverId;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue