From 71746a6ffcc60dcfd444fb00561acf5979bf8811 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Sat, 18 Apr 2020 00:06:51 +0300 Subject: [PATCH] Extract const value --- src/components/playback/playbackmanager.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index 161cc391f3..f323d3609c 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -1,6 +1,9 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'playQueueManager', 'userSettings', 'globalize', 'connectionManager', 'loading', 'apphost', 'screenfull'], function (events, datetime, appSettings, itemHelper, pluginManager, PlayQueueManager, userSettings, globalize, connectionManager, loading, apphost, screenfull) { 'use strict'; + /** Delay time in ms for reportPlayback logging */ + const reportPlaybackLogDelay = 1e3; + function enableLocalPlaylistManagement(player) { if (player.getPlaylist) { @@ -65,7 +68,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla const now = (new Date).getTime(); - if (method !== reportPlaybackLastMethod || now - (reportPlaybackLastTime || 0) >= 1e3) { + if (method !== reportPlaybackLastMethod || now - (reportPlaybackLastTime || 0) >= reportPlaybackLogDelay) { console.debug(method + '-' + JSON.stringify(info)); reportPlaybackLastMethod = method; reportPlaybackLastTime = now;