diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index b94e6c0ecc..a5ed66fb70 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -210,7 +210,7 @@ background-image: url(images/items/folders/home.png); } -.tvshowsViewMenu { +.tvshowsViewMenu, .livetvViewMenu { background-image: url(images/items/folders/tv.png); } diff --git a/dashboard-ui/css/notifications.css b/dashboard-ui/css/notifications.css index ac466c077e..7056f76672 100644 --- a/dashboard-ui/css/notifications.css +++ b/dashboard-ui/css/notifications.css @@ -70,6 +70,10 @@ max-width: 95%; } + .flyoutNotification:last-child { + border-bottom: 1px solid #ccc; + } + .notificationName { font-weight: bold; color: #555; @@ -88,13 +92,13 @@ } .notificationsList { - border-bottom: 1px solid #ccc; + border-bottom: 1px solid #ddd; } -.notificationsList .flyoutNotification { - border-left: 1px solid #ccc; - border-right: 1px solid #ccc; -} + .notificationsList .flyoutNotification { + border-left: 1px solid #ddd; + border-right: 1px solid #ddd; + } .imgNotification, .imgNotificationInner { width: 40px; @@ -191,4 +195,4 @@ .notificationContent p { max-width: 350px; } -} \ No newline at end of file +} diff --git a/dashboard-ui/css/posteritem.css b/dashboard-ui/css/posteritem.css index 1929b4211e..6ba11f954f 100644 --- a/dashboard-ui/css/posteritem.css +++ b/dashboard-ui/css/posteritem.css @@ -145,8 +145,8 @@ .myLibraryPosterItem .posterItemImage { height: 34px; - background-position: 12px center; - background-size: 20px 20px; + background-position: 9px center; + background-size: 14px 14px; background-color: rgba(51, 136, 204, 0.7); background-color: rgba(82, 181, 75, 0.7); } @@ -154,9 +154,9 @@ .myLibraryPosterItem .posterItemDefaultText { top: 0; left: 0; - line-height: 36px; + line-height: 34px; text-align: left; - padding: 0 0 0 43px; + padding: 0 0 0 34px; } .moviesPosterItem .posterItemImage, .trailersPosterItem .posterItemImage { diff --git a/dashboard-ui/mypreferenceswebclient.html b/dashboard-ui/mypreferenceswebclient.html index dc2e468a9d..002fea201f 100644 --- a/dashboard-ui/mypreferenceswebclient.html +++ b/dashboard-ui/mypreferenceswebclient.html @@ -29,6 +29,7 @@ + @@ -39,6 +40,7 @@ + @@ -50,6 +52,7 @@ + diff --git a/dashboard-ui/scripts/editcollectionitems.js b/dashboard-ui/scripts/editcollectionitems.js index bb7c3afea0..05ca9f74ff 100644 --- a/dashboard-ui/scripts/editcollectionitems.js +++ b/dashboard-ui/scripts/editcollectionitems.js @@ -236,15 +236,6 @@ $('.libraryTree', page).on('itemclicked', function (event, data) { - if (data.itemType == "libraryreport") { - Dashboard.navigate('libraryreport.html'); - return; - } - - if (data.itemType == "livetvservice") { - return; - } - if (data.id != currentItem.Id) { MetadataEditor.currentItemId = data.id; diff --git a/dashboard-ui/scripts/edititemimages.js b/dashboard-ui/scripts/edititemimages.js index 14731db589..cebc27a5b7 100644 --- a/dashboard-ui/scripts/edititemimages.js +++ b/dashboard-ui/scripts/edititemimages.js @@ -545,10 +545,6 @@ $('.libraryTree', page).on('itemclicked', function (event, data) { - if (data.itemType == "livetvservice") { - return; - } - if (data.id != currentItem.Id) { MetadataEditor.currentItemId = data.id; diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js index 3ec6847021..080eb0684b 100644 --- a/dashboard-ui/scripts/edititemmetadata.js +++ b/dashboard-ui/scripts/edititemmetadata.js @@ -1250,10 +1250,6 @@ $('.libraryTree', page).on('itemclicked', function (event, data) { - if (data.itemType == "livetvservice") { - return; - } - if (data.id != currentItem.Id) { MetadataEditor.currentItemId = data.id; diff --git a/dashboard-ui/scripts/edititemsubtitles.js b/dashboard-ui/scripts/edititemsubtitles.js index cd9b0ce2ed..9aaf9a87b0 100644 --- a/dashboard-ui/scripts/edititemsubtitles.js +++ b/dashboard-ui/scripts/edititemsubtitles.js @@ -292,10 +292,6 @@ $('.libraryTree', page).on('itemclicked', function (event, data) { - if (data.itemType == "livetvservice") { - return; - } - if (data.id != currentItem.Id) { MetadataEditor.currentItemId = data.id; diff --git a/dashboard-ui/scripts/editorsidebar.js b/dashboard-ui/scripts/editorsidebar.js index 5e2b52864a..dd618a6eac 100644 --- a/dashboard-ui/scripts/editorsidebar.js +++ b/dashboard-ui/scripts/editorsidebar.js @@ -76,25 +76,17 @@ function loadChildrenOfRootNode(page, callback, openItems, selectedId) { - var promise1 = $.getJSON(ApiClient.getUrl("Library/MediaFolders")); - var promise2 = ApiClient.getLiveTvInfo(); - $.when(promise1, promise2).done(function (response1, response2) { + $.when(promise2).done(function (response2) { - var mediaFolders = response1[0].Items; - var liveTvInfo = response2[0]; + var liveTvInfo = response2; var nodes = []; var i, length; - for (i = 0, length = mediaFolders.length; i < length; i++) { - - var state = openItems.indexOf(mediaFolders[i].Id) == -1 ? 'closed' : 'open'; - - nodes.push(getNode(mediaFolders[i], state)); - } + nodes.push({ attr: { id: 'MediaFolders', rel: 'folder', itemtype: 'mediafolders' }, data: 'Media Folders', state: 'open' }); for (i = 0, length = liveTvInfo.Services.length; i < length; i++) { @@ -142,6 +134,24 @@ } + function loadMediaFolders(service, openItems, callback) { + + $.getJSON(ApiClient.getUrl("Library/MediaFolders")).done(function (result) { + + var nodes = result.Items.map(function (i) { + + var state = openItems.indexOf(i.Id) == -1 ? 'closed' : 'open'; + + return getNode(i, state); + + }); + + callback(nodes); + + }); + + } + function loadNode(page, node, openItems, selectedId, currentUser, callback) { if (node == '-1') { @@ -160,6 +170,12 @@ return; } + if (itemtype == 'mediafolders') { + + loadMediaFolders(id, openItems, callback); + return; + } + var query = { ParentId: id, Fields: 'Settings' @@ -240,7 +256,9 @@ itemType: data.rslt.obj.attr("itemtype") }; - $(this).trigger('itemclicked', [eventData]); + if (eventData.itemType != 'livetvservice' && eventData.itemType != 'mediafolders') { + $(this).trigger('itemclicked', [eventData]); + } }); } diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index c4e3f410a6..3ad19b9b35 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -1,5 +1,19 @@ (function ($, document, apiClient) { + function getUserViews(userId) { + + var deferred = $.Deferred(); + + ApiClient.getUserViews(userId).done(function (result) { + + var items = result.Items; + + deferred.resolveWith(null, [items]); + }); + + return deferred.promise(); + } + function createMediaLinks(options) { var html = ""; @@ -102,44 +116,7 @@ function loadlibraryButtons(elem, userId, index) { - var promise1 = ApiClient.getUserViews(userId); - - var promise2 = ApiClient.getLiveTvInfo(); - - var promise3 = $.getJSON(ApiClient.getUrl("Channels", { - userId: userId, - - // We just want the total record count - limit: 0 - })); - - $.when(promise1, promise2, promise3).done(function (r1, r2, r3) { - - var result = r1[0]; - var liveTvInfo = r2[0]; - var channelResponse = r3[0]; - - if (channelResponse.TotalRecordCount) { - - result.Items.push({ - Name: 'Channels', - CollectionType: 'channels', - Id: 'channels', - url: 'channels.html' - }); - } - - var showLiveTv = liveTvInfo.EnabledUsers.indexOf(userId) != -1; - - if (showLiveTv) { - - result.Items.push({ - Name: 'Live TV', - CollectionType: 'livetv', - Id: 'livetv', - url: 'livetvsuggested.html' - }); - } + getUserViews(userId).done(function (items) { var html = '
'; @@ -148,7 +125,7 @@ } html += '
'; html += createMediaLinks({ - items: result.Items, + items: items, shape: 'myLibrary', showTitle: true, centerText: true @@ -202,18 +179,18 @@ }); } - function loadLibraryTiles(elem, userId) { + function loadLibraryTiles(elem, userId, shape) { - ApiClient.getUserViews(userId).done(function (result) { + getUserViews(userId).done(function (items) { var html = ''; - if (result.Items.length) { + if (items.length) { html += '

' + Globalize.translate('HeaderMyLibrary') + '

'; html += '
'; html += LibraryBrowser.getPosterViewHtml({ - items: result.Items, - shape: 'backdrop', + items: items, + shape: shape, showTitle: true, centerText: true, lazy: true @@ -250,7 +227,7 @@ var html = ''; if (result.Items.length) { - html += '

'+Globalize.translate('HeaderResume')+'

'; + html += '

' + Globalize.translate('HeaderResume') + '

'; html += '
'; html += LibraryBrowser.getPosterViewHtml({ items: result.Items, @@ -279,7 +256,10 @@ loadRecentlyAdded(elem, userId); } else if (section == 'librarytiles') { - loadLibraryTiles(elem, userId); + loadLibraryTiles(elem, userId, 'backdrop'); + } + else if (section == 'smalllibrarytiles') { + loadLibraryTiles(elem, userId, 'smallBackdrop'); } else if (section == 'resume') { loadResume(elem, userId); @@ -327,16 +307,16 @@ } var homePageDismissValue = '2'; - + function dismissWelcome(page, userId) { ApiClient.getDisplayPreferences('home', userId, 'webclient').done(function (result) { result.CustomPrefs.homePageWelcomeDismissed = homePageDismissValue; - ApiClient.updateDisplayPreferences('home', result, userId, 'webclient').done(function() { - + ApiClient.updateDisplayPreferences('home', result, userId, 'webclient').done(function () { + $('.welcomeMessage', page).hide(); - + }); }); } @@ -364,7 +344,7 @@ } else { $('.welcomeMessage', page).show(); } - + loadSections(page, userId, result); }); diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 3d30e12186..d79f3984dc 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -365,6 +365,18 @@ // Handle search hints var id = item.Id || item.ItemId; + if (item.CollectionType == 'livetv') { + return 'livetvsuggested.html'; + } + + if (item.CollectionType == 'channels') { + return 'channels.html'; + } + + if (item.CollectionType == 'movies') { + return 'movieslatest.html?topParentId=' + item.Id; + } + if (item.CollectionType == 'boxsets' || item.Type == 'ManualCollectionsFolder') { return 'collections.html?topParentId=' + item.Id; } diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 55d65c8754..864a9ce924 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -64,15 +64,9 @@ html += '
'; html += '
'; - html += ''; - - html += ''; - - html += ''; - html += '
'; html += '
'; - html += 'Dashboard'; + //html += 'Dashboard'; html += 'Metadata Manager'; html += 'Reports'; html += '
'; @@ -105,7 +99,16 @@ var viewMenuCssClass = (i.CollectionType || 'general') + 'ViewMenu'; - return '' + i.Name + ''; + var itemId = i.Id; + + if (i.CollectionType == "channels") { + itemId = "channels"; + } + else if (i.CollectionType == "livetv") { + itemId = "livetv"; + } + + return '' + i.Name + ''; }).join(''); @@ -118,31 +121,6 @@ }); }); - ApiClient.getLiveTvInfo().done(function (liveTvInfo) { - - var showLiveTv = liveTvInfo.EnabledUsers.indexOf(userId) != -1; - - if (showLiveTv) { - $('.liveTvMenuOption').show(); - $('.secondaryDivider').show(); - } - }); - - $.getJSON(ApiClient.getUrl("Channels", { - userId: userId, - - // We just want the total record count - limit: 0 - - })).done(function (response) { - - if (response.TotalRecordCount) { - $('.channelsMenuOption').show(); - $('.secondaryDivider').show(); - } - - }); - Dashboard.getCurrentUser().done(function (user) { if (user.Configuration.IsAdministrator) { @@ -378,6 +356,7 @@ $.fn.createHoverTouch = function () { return $(this).on('mouseenter', function () { if (preventHover === true) { + preventHover = false; return; } diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index c8d0621876..d5b60d7d7e 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -256,6 +256,10 @@ console.log('Transcoding because bitrate is too high'); return false; } + + if (videoStream && videoStream.Profile == 'High') { + return false; + } var extension = (mediaSource.Container || '').toLowerCase(); diff --git a/dashboard-ui/scripts/notifications.js b/dashboard-ui/scripts/notifications.js index 13700630a8..c416a6b948 100644 --- a/dashboard-ui/scripts/notifications.js +++ b/dashboard-ui/scripts/notifications.js @@ -39,14 +39,14 @@ html += '

Notifications

'; html += '
'; - html += '
'; + html += '
'; html += '

Loading...'; html += '

'; html += ''; - html += ''; + html += ''; html += '
';