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 @@