Moved seek timeout to config

This commit is contained in:
Travis Shivers 2020-07-27 21:00:36 -05:00
parent 7b3febd868
commit 589107dc91
No known key found for this signature in database
GPG Key ID: EE4CC2891B8FCD33
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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,