diff --git a/src/bower_components/emby-webcomponents/browserdeviceprofile.js b/src/bower_components/emby-webcomponents/browserdeviceprofile.js index 7b37a0cdb1..ad5237fde8 100644 --- a/src/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/src/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -751,7 +751,7 @@ define(['browser'], function (browser) { Condition: 'Equals', Property: 'IsSecondaryAudio', Value: 'false', - IsRequired: 'false' + IsRequired: false }); } @@ -780,7 +780,7 @@ define(['browser'], function (browser) { Condition: 'Equals', Property: 'IsSecondaryAudio', Value: 'false', - IsRequired: 'false' + IsRequired: false } ] }); @@ -913,4 +913,4 @@ define(['browser'], function (browser) { return profile; }; -}); \ No newline at end of file +}); diff --git a/src/scripts/librarymenu.js b/src/scripts/librarymenu.js index 8d65f9420b..145ae42479 100644 --- a/src/scripts/librarymenu.js +++ b/src/scripts/librarymenu.js @@ -386,16 +386,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)] + }); } } } diff --git a/src/scripts/plugincatalogpage.js b/src/scripts/plugincatalogpage.js index ed237a02d4..40d57560b5 100644 --- a/src/scripts/plugincatalogpage.js +++ b/src/scripts/plugincatalogpage.js @@ -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) { @@ -113,7 +103,7 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", " } return 0; - }).filter(isUserInstalledPlugin); + }); html += '
'; var limit = screen.availWidth >= 1920 ? 15 : 12; @@ -215,11 +205,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; diff --git a/src/scripts/pluginspage.js b/src/scripts/pluginspage.js index 69583403e8..6264f012e0 100644 --- a/src/scripts/pluginspage.js +++ b/src/scripts/pluginspage.js @@ -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 += "
", html += '
', html += '
', html += '
', html += href ? '' : configPageUrl ? disallowPlugins ? '
' : '", html += '
', html += '
', html += '', html += "
", html += "
", html += configPage ? configPage.DisplayName || plugin.Name : plugin.Name, html += "
", html += "
", html += plugin.Version, html += "
", html += "
", html += "
", html += "
" + })[0]; + var configPageUrl = configPage ? Dashboard.getConfigurationPageUrl(configPage.Name) : null; + + var html = ""; + html += "
"; + html += '
'; + html += '"; + html += '
'; + html += '
'; + html += ''; + html += "
"; + html += "
"; + html += configPage ? configPage.DisplayName || plugin.Name : plugin.Name; + html += "
"; + html += "
"; + html += plugin.Version; + html += "
"; + html += "
"; + html += "
"; + html += "
"; + return html; } function renderPlugins(page, plugins, showNoPluginsMessage) { @@ -117,4 +142,4 @@ define(["loading", "libraryMenu", "dom", "globalize", "cardStyle", "emby-linkbut }), window.PluginsPage = { renderPlugins: renderPlugins } -}); \ No newline at end of file +}); diff --git a/src/scripts/site.js b/src/scripts/site.js index d30d27f9ea..4752d59235 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -231,17 +231,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; }