From 46a738b7f471588f5888556184fc884517a8ac7f Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sun, 14 Jan 2018 15:08:55 -0800 Subject: [PATCH] Minor tweak to playlist dirty check --- src/channel/playlist.js | 4 ++-- src/switches.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/channel/playlist.js b/src/channel/playlist.js index 3ef781a4..09d1f114 100644 --- a/src/channel/playlist.js +++ b/src/channel/playlist.js @@ -142,7 +142,7 @@ PlaylistModule.prototype.load = function (data) { return; } - if (!playlistPosition) { + if (!playlistPosition || !playlist.externalPosition) { // Old style playlist playlistPosition = { index: playlist.pos, @@ -221,7 +221,7 @@ PlaylistModule.prototype.save = function (data) { }; if (this._listDirty) { - data.playlist = { pl: arr }; + data.playlist = { pl: arr, pos, time, externalPosition: true }; } } else { data.playlist = { pl: arr, pos, time }; diff --git a/src/switches.js b/src/switches.js index a6d150f8..8725e572 100644 --- a/src/switches.js +++ b/src/switches.js @@ -1,4 +1,6 @@ -const switches = {}; +const switches = { + plDirtyCheck: true +}; export function isActive(switchName) { return switches.hasOwnProperty(switchName) && switches[switchName] === true;