diff --git a/dashboard-ui/bower_components/emby-apiclient/apiclient.js b/dashboard-ui/bower_components/emby-apiclient/apiclient.js index f061795106..d47b517c15 100644 --- a/dashboard-ui/bower_components/emby-apiclient/apiclient.js +++ b/dashboard-ui/bower_components/emby-apiclient/apiclient.js @@ -669,23 +669,53 @@ }); }; - self.detectBitrate = function () { + function normalizeReturnBitrate(bitrate) { - // First try a small amount so that we don't hang up their mobile connection - return self.getDownloadSpeed(1000000).then(function (bitrate) { + if (!bitrate) { + return Promise.reject(); + } - if (bitrate < 1000000) { - return Math.round(bitrate * 0.8); + return Math.round(bitrate * 0.8); + } + + function detectBitrateInternal(tests, index, currentBitrate) { + + if (index >= tests.length) { + + return normalizeReturnBitrate(currentBitrate); + } + + var test = tests[0]; + + return self.getDownloadSpeed(test.bytes).then(function (bitrate) { + + if (bitrate < test.threshold) { + + return normalizeReturnBitrate(bitrate); } else { - - // If that produced a fairly high speed, try again with a larger size to get a more accurate result - return self.getDownloadSpeed(2400000).then(function (bitrate) { - - return Math.round(bitrate * 0.8); - }); + return detectBitrateInternal(tests, index + 1, bitrate); } + }, function () { + return normalizeReturnBitrate(currentBitrate); }); + } + + self.detectBitrate = function () { + + return detectBitrateInternal([ + { + bytes: 100000, + threshold: 5000000 + }, + { + bytes: 1000000, + threshold: 50000000 + }, + { + bytes: 3000000, + threshold: 50000000 + }], 0); }; /** diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index 4ce0b3a67f..11a505bb1f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -240,7 +240,7 @@ define(['browser'], function (browser) { return function (options) { options = options || {}; - var physicalAudioChannels = options.audioChannels || 2; + var physicalAudioChannels = options.audioChannels || (browser.tv || browser.xboxOne || browser.ps4 ? 6 : 2); var bitrateSetting = getMaxBitrate(); @@ -334,12 +334,12 @@ define(['browser'], function (browser) { AudioCodec: videoAudioCodecs.join(',') }); } - + if (browser.tizen) { mp4VideoCodecs.push('mpeg2video'); mp4VideoCodecs.push('vc1'); } - + if (canPlayMkv && mp4VideoCodecs.length) { profile.DirectPlayProfiles.push({ Container: 'mkv', diff --git a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js index f878ee93fe..3aecd30cdb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js +++ b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js @@ -310,7 +310,8 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan textlines.push(displayName); } - if (options.artist !== false) { + if (options.artist !== false && (options.artist === true || item.AlbumArtist !== options.containerAlbumArtist)) { + if (item.ArtistItems && item.Type !== 'MusicAlbum') { textlines.push(item.ArtistItems.map(function (a) { return a.Name; @@ -318,7 +319,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan }).join(', ')); } - if (item.AlbumArtist && item.Type === 'MusicAlbum') { + else if (item.AlbumArtist && item.Type === 'MusicAlbum') { textlines.push(item.AlbumArtist); } } diff --git a/dashboard-ui/reports.html b/dashboard-ui/reports.html index a136fec722..adb0cf398b 100644 --- a/dashboard-ui/reports.html +++ b/dashboard-ui/reports.html @@ -60,7 +60,6 @@
diff --git a/dashboard-ui/scripts/itembynamedetailpage.js b/dashboard-ui/scripts/itembynamedetailpage.js index a1e4798c73..c4f8726e36 100644 --- a/dashboard-ui/scripts/itembynamedetailpage.js +++ b/dashboard-ui/scripts/itembynamedetailpage.js @@ -273,7 +273,8 @@ }, { playFromHere: true, action: 'playallfromhere', - smallIcon: true + smallIcon: true, + artist: true }); break; diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 9b6a848878..d3f5a6a967 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -119,7 +119,7 @@ if (dom.getWindowSize().innerWidth >= 800) { backdrop.setBackdrops([item], { - blur: 27 + blur: 24 }, false); } else { backdrop.clear(); @@ -1162,7 +1162,8 @@ playFromHere: true, action: 'playallfromhere', image: false, - artist: false + artist: 'auto', + containerAlbumArtist: item.AlbumArtist }); isList = true; } @@ -1261,7 +1262,7 @@ page.querySelector('#childrenTitle').innerHTML = globalize.translate('HeaderEpisodes'); } else if (item.Type == "Episode") { - page.querySelector('#childrenTitle').innerHTML = item.SeriesName + ' - ' + item.SeasonName; + page.querySelector('#childrenTitle').innerHTML = item.SeasonName; } else if (item.Type == "Series") { page.querySelector('#childrenTitle').innerHTML = globalize.translate('HeaderSeasons'); diff --git a/dashboard-ui/scripts/reports.js b/dashboard-ui/scripts/reports.js index 6fd850c7ed..a69c623bf9 100644 --- a/dashboard-ui/scripts/reports.js +++ b/dashboard-ui/scripts/reports.js @@ -200,65 +200,6 @@ return html; } - function getStats(result) { - var html = ''; - html += '
'; - //html += '
If you like Africa Fever II, check these out...
'; - html += '
'; - result.Groups.map(function (group) { - //html += '
'; - //html += '
'; - //html += '
'; - html += '
'; - //html += '
'; - html += '
'; - html += '
'; - - html += '
' - html += '
'; - html += '' + group.Header + ' ' + ''; - html += '
'; - - html += '
'; - html += '
'; - html += ''; - html += '
'; - html += '
'; - html += '
'; - - html += '
'; - html += '
'; - html += '
'; - - }); - - - html += '
'; - //html += '
'; - html += '
'; - return html; - } - function ExportReport(page, e) { query.UserId = Dashboard.getCurrentUserId(); @@ -302,7 +243,7 @@ window.scrollTo(0, 0); var html = ''; - if (query.ReportView === "ReportData" || query.ReportView === "ReportStatistics") { + if (query.ReportView === "ReportData") { $('#selectIncludeItemTypesBox', page).show(); $('#tabFilter', page).show(); } @@ -380,25 +321,6 @@ reloadItems(page); }); } - else { - - $('.listTopPaging', page).html(pagingHtml).trigger('create'); - // page.querySelector('.listTopPaging').innerHTML = pagingHtml; - - $('.listTopPaging', page).show(); - $('.listBottomPaging', page).hide(); - - $('.btnNextPage', page).hide(); - $('.btnPreviousPage', page).hide(); - - $('#btnReportExport', page).hide(); - $('#selectPageSizeBox', page).hide(); - $('#selectReportGroupingBox', page).hide(); - $('#grpReportsColumns', page).hide(); - - html += getStats(result); - $('.reporContainer', page).html(html).trigger('create'); - } $('#GroupStatus', page).hide(); $('#GroupAirDays', page).hide(); @@ -429,11 +351,6 @@ query.HasQueryLimit = true; url = ApiClient.getUrl("Reports/Items", query); break; - case "ReportStatistics": - query.TopItems = topItems; - query.HasQueryLimit = false; - url = ApiClient.getUrl("Reports/Statistics", query); - break; case "ReportActivities": query.HasQueryLimit = true; url = ApiClient.getUrl("Reports/Activities", query); diff --git a/dashboard-ui/scripts/songs.js b/dashboard-ui/scripts/songs.js index 33c8fc29cd..0bd98f8ea8 100644 --- a/dashboard-ui/scripts/songs.js +++ b/dashboard-ui/scripts/songs.js @@ -72,7 +72,8 @@ var html = listView.getListViewHtml({ items: result.Items, action: 'playallfromhere', - smallIcon: true + smallIcon: true, + artist: true }); var i, length; diff --git a/dashboard-ui/scripts/userprofilespage.js b/dashboard-ui/scripts/userprofilespage.js index fab2eb905f..c3b22a28bc 100644 --- a/dashboard-ui/scripts/userprofilespage.js +++ b/dashboard-ui/scripts/userprofilespage.js @@ -231,9 +231,9 @@ require(['actionsheet'], function (actionsheet) { - var card = $(elem).parents('.card'); - var page = $(elem).parents('.page'); - var id = card.attr('data-id'); + var card = $(elem).parents('.card')[0]; + var page = $(elem).parents('.page')[0]; + var id = card.getAttribute('data-id'); actionsheet.show({ items: menuItems,