From 589107dc91afa3b854692f49a15e09389a0b596e Mon Sep 17 00:00:00 2001 From: Travis Shivers Date: Mon, 27 Jul 2020 21:00:36 -0500 Subject: [PATCH] Moved seek timeout to config --- config/defaults.js | 2 ++ src/store/modules/slplayer/actions.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/defaults.js b/config/defaults.js index 80ce878d..f90f24e2 100644 --- a/config/defaults.js +++ b/config/defaults.js @@ -51,6 +51,8 @@ const defaults = { // The playback rate (1 +/- rate) that is used when speed syncing slplayer_speed_sync_rate: 0.5, + + slplayer_seek_timeout: 15000, sidebar_time_update_interval: 500, // If the plex client's time changes by this much from the expected time, trigger a state change diff --git a/src/store/modules/slplayer/actions.js b/src/store/modules/slplayer/actions.js index 6c4d46d6..04c48dfd 100644 --- a/src/store/modules/slplayer/actions.js +++ b/src/store/modules/slplayer/actions.js @@ -219,13 +219,13 @@ export default { return main(cancelSignal); }, - NORMAL_SEEK: async ({ commit }, { cancelSignal, seekToMs }) => { + NORMAL_SEEK: async ({ rootGetters, commit }, { cancelSignal, seekToMs }) => { console.debug('NORMAL_SEEK', seekToMs); commit('SET_OFFSET_MS', seekToMs); setCurrentTimeMs(seekToMs); - // TODO: throw that vlaue in the config - const timeoutToken = CAF.timeout(15000, 'Took too long!'); + const timeoutToken = CAF.timeout(rootGetters.GET_CONFIG.slplayer_seek_timeout, + 'Normal seek took too long'); const anySignal = CAF.signalRace([ cancelSignal,