From 0965f0083e013a11670990f31339f56db366eba1 Mon Sep 17 00:00:00 2001 From: jcass Date: Mon, 22 Feb 2016 22:05:15 +0200 Subject: [PATCH] fix:Avoid progress slider from becoming 'stuck' because the timer died unexpectedly. Also see https://github.com/adamcik/media-progress-timer/issues/3 --- mopidy_musicbox_webclient/static/js/gui.js | 1 - mopidy_musicbox_webclient/static/mb.appcache | 2 +- .../static/vendors/media_progress_timer/timer.js | 6 +++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mopidy_musicbox_webclient/static/js/gui.js b/mopidy_musicbox_webclient/static/js/gui.js index 84cff3d..025372d 100644 --- a/mopidy_musicbox_webclient/static/js/gui.js +++ b/mopidy_musicbox_webclient/static/js/gui.js @@ -16,7 +16,6 @@ function resetSong() { data.track.artists = ''; data.track.length = 0; data.track.uri = ' '; - setSongInfo(data); } function resizeMb() { diff --git a/mopidy_musicbox_webclient/static/mb.appcache b/mopidy_musicbox_webclient/static/mb.appcache index 49bd417..382f7cf 100644 --- a/mopidy_musicbox_webclient/static/mb.appcache +++ b/mopidy_musicbox_webclient/static/mb.appcache @@ -1,6 +1,6 @@ CACHE MANIFEST -# 2016-02-18:v2 +# 2016-02-22:v1 NETWORK: * diff --git a/mopidy_musicbox_webclient/static/vendors/media_progress_timer/timer.js b/mopidy_musicbox_webclient/static/vendors/media_progress_timer/timer.js index 744e3de..a6ee63f 100644 --- a/mopidy_musicbox_webclient/static/vendors/media_progress_timer/timer.js +++ b/mopidy_musicbox_webclient/static/vendors/media_progress_timer/timer.js @@ -111,7 +111,11 @@ ProgressTimer.prototype._update = function(timestamp) { } this._scheduleUpdate(timestamp); } else { - this._running = false; + // Workaround for https://github.com/adamcik/media-progress-timer/issues/3 + // This causes the timer to die unexpectedly if the position goes + // over the duration slightly. + + // this._running = false; this._callback(duration, duration, this._running); } };