diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 64b38bf53b..b87eee15e4 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -192,7 +192,7 @@ var html = ''; html += '
'; - html += Globalize.translate('HeaderLibrary'); + html += Globalize.translate('HeaderMedia'); html += '
'; html += items.map(function (i) { diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index fdf31e7cf0..78d5dfe14e 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -725,8 +725,9 @@ contentType = 'video/' + mediaSource.Container; if (mediaSource.enableDirectPlay) { - mediaUrl = mediaSource.Path; + mediaUrl = FileSystem.translateFilePath(mediaSource.Path); playMethod = 'DirectPlay'; + } else { if (mediaSource.SupportsDirectStream) { @@ -761,9 +762,9 @@ if (mediaSource.enableDirectPlay) { - mediaUrl = mediaSource.Path; - + mediaUrl = FileSystem.translateFilePath(mediaSource.Path); playMethod = 'DirectPlay'; + } else { var isDirectStream = mediaSource.SupportsDirectStream; diff --git a/dashboard-ui/scripts/musicrecommended.js b/dashboard-ui/scripts/musicrecommended.js index 718e55ec8b..8c75ec37c8 100644 --- a/dashboard-ui/scripts/musicrecommended.js +++ b/dashboard-ui/scripts/musicrecommended.js @@ -33,7 +33,6 @@ $('#recentlyAddedSongs', page).html(LibraryBrowser.getPosterViewHtml({ items: items, showUnplayedIndicator: false, - showChildCountIndicator: true, showLatestItemsPopup: false, shape: getSquareShape(), showTitle: true, diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 608b869244..28928ac8ed 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -701,7 +701,7 @@ var Dashboard = { } }, - ensureToolsMenu: function (page, user) { + ensureToolsMenu: function (page) { var sidebar = $('.toolsSidebar', page); @@ -720,10 +720,6 @@ var Dashboard = { item = items[i]; - if (!user.Policy.IsAdministrator) { - break; - } - if (item.divider) { menuHtml += "
"; } @@ -738,7 +734,15 @@ var Dashboard = { menuHtml += ''; } - menuHtml += ''; + var icon = item.icon; + + if (icon) { + if (icon.indexOf('fa') == 0) { + menuHtml += ''; + } else { + menuHtml += '' + icon + ''; + } + } menuHtml += ''; menuHtml += item.name; @@ -1969,19 +1973,19 @@ $(document).on('pagecreate', ".page", function () { if (apiClient && apiClient.accessToken() && Dashboard.getCurrentUserId()) { - Dashboard.getCurrentUser().done(function (user) { + var isSettingsPage = page.hasClass('type-interior'); - var isSettingsPage = page.hasClass('type-interior'); + if (isSettingsPage) { + Dashboard.ensureToolsMenu(page); - if (!user.Policy.IsAdministrator && isSettingsPage) { - Dashboard.logout(); - return; - } + Dashboard.getCurrentUser().done(function (user) { - if (isSettingsPage) { - Dashboard.ensureToolsMenu(page, user); - } - }); + if (!user.Policy.IsAdministrator) { + Dashboard.logout(); + return; + } + }); + } } else { diff --git a/dashboard-ui/thirdparty/apiclient/apiclient.js b/dashboard-ui/thirdparty/apiclient/apiclient.js index ef0474b89f..60af3f1035 100644 --- a/dashboard-ui/thirdparty/apiclient/apiclient.js +++ b/dashboard-ui/thirdparty/apiclient/apiclient.js @@ -192,7 +192,7 @@ if (connectionMode == MediaBrowser.ConnectionMode.Local && currentServerInfo.RemoteAddress) { newConnectionMode = MediaBrowser.ConnectionMode.Remote; } - else if (connectionMode == MediaBrowser.ConnectionMode.Remote && currentServerInfo.LocalAddress) { + else if (connectionMode != MediaBrowser.ConnectionMode.Local && currentServerInfo.LocalAddress) { newConnectionMode = MediaBrowser.ConnectionMode.Local; } else { @@ -204,6 +204,7 @@ function tryReconnectInternal(deferred, connectionMode, currentRetryCount) { + connectionMode = switchConnectionMode(connectionMode); var url = MediaBrowser.ServerInfo.getServerAddress(self.serverInfo(), connectionMode); logger.log("Attempting reconnection to " + url); diff --git a/dashboard-ui/thirdparty/cordova/android/filesystem.js b/dashboard-ui/thirdparty/cordova/android/filesystem.js index c8a1ac103f..f8f21de5e9 100644 --- a/dashboard-ui/thirdparty/cordova/android/filesystem.js +++ b/dashboard-ui/thirdparty/cordova/android/filesystem.js @@ -4,6 +4,10 @@ fileExists: function (path) { return NativeFileSystem.fileExists(path); + }, + + translateFilePath: function (path) { + return NativeFileSystem.translateFilePath(path); } }; diff --git a/dashboard-ui/thirdparty/cordova/android/iap.js b/dashboard-ui/thirdparty/cordova/android/iap.js index e3d5909025..e762eb55b8 100644 --- a/dashboard-ui/thirdparty/cordova/android/iap.js +++ b/dashboard-ui/thirdparty/cordova/android/iap.js @@ -35,7 +35,7 @@ } function beginPurchase(id) { - return NativeIapManager.beginPurchase(id); + return MainActivity.beginPurchase(id); } window.IapManager = { diff --git a/dashboard-ui/thirdparty/cordova/filesystem.js b/dashboard-ui/thirdparty/cordova/filesystem.js index bf2fc59968..bfae5efb1a 100644 --- a/dashboard-ui/thirdparty/cordova/filesystem.js +++ b/dashboard-ui/thirdparty/cordova/filesystem.js @@ -4,8 +4,11 @@ fileExists: function (path) { return false; - } + }, + translateFilePath: function (path) { + return path; + } }; })(); \ No newline at end of file diff --git a/dashboard-ui/thirdparty/filesystem.js b/dashboard-ui/thirdparty/filesystem.js index bf2fc59968..bfae5efb1a 100644 --- a/dashboard-ui/thirdparty/filesystem.js +++ b/dashboard-ui/thirdparty/filesystem.js @@ -4,8 +4,11 @@ fileExists: function (path) { return false; - } + }, + translateFilePath: function (path) { + return path; + } }; })(); \ No newline at end of file