From 950ae269c98ffca41367b4f19c28bb27d18c7f2d Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sun, 14 Jan 2024 19:56:11 +0100 Subject: [PATCH] feat: add periodic saving action --- src/store/player.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/store/player.js b/src/store/player.js index 0674dd9..3b4cb68 100644 --- a/src/store/player.js +++ b/src/store/player.js @@ -103,3 +103,9 @@ export const player = { }, }, } + +setInterval(() => { + if (player.state.paused === false) { + store.dispatch('player/time') + } +}, 40000)