1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update sync objects

This commit is contained in:
Luke Pulverenti 2016-12-10 13:40:39 -05:00
parent fc210d8ad2
commit 6cede56f93
47 changed files with 148 additions and 62 deletions

View file

@ -670,8 +670,6 @@ define(['appSettings', 'userSettings', 'datetime', 'browser'], function (appSett
});
};
self.lastBitrateDetections = {};
self.playInternal = function (item, startPosition, callback) {
if (item == null) {
@ -699,15 +697,12 @@ define(['appSettings', 'userSettings', 'datetime', 'browser'], function (appSett
});
};
var bitrateDetectionKey = ApiClient.serverAddress();
if (item.MediaType == 'Video' && appSettings.enableAutomaticBitrateDetection() && (new Date().getTime() - (self.lastBitrateDetections[bitrateDetectionKey] || 0)) > 300000) {
if (item.MediaType == 'Video' && appSettings.enableAutomaticBitrateDetection()) {
Dashboard.showLoadingMsg();
ApiClient.detectBitrate().then(function (bitrate) {
console.log('Max bitrate auto detected to ' + bitrate);
self.lastBitrateDetections[bitrateDetectionKey] = new Date().getTime();
appSettings.maxStreamingBitrate(bitrate);
onBitrateDetected();