mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 07:32:02 +00:00
periodically push changes in library from player
This commit is contained in:
parent
38b7f71d86
commit
3e05fe2e31
1 changed files with 13 additions and 0 deletions
|
|
@ -220,6 +220,19 @@ const Player = ({ urlParams }) => {
|
||||||
}, 'player');
|
}, 'player');
|
||||||
}
|
}
|
||||||
}, [videoState.time, videoState.duration]);
|
}, [videoState.time, videoState.duration]);
|
||||||
|
React.useEffect(() => {
|
||||||
|
const interval = setInterval(() => {
|
||||||
|
core.dispatch({
|
||||||
|
action: 'Player',
|
||||||
|
args: {
|
||||||
|
action: 'PushToLibrary'
|
||||||
|
}
|
||||||
|
}, 'player');
|
||||||
|
}, 30000);
|
||||||
|
return () => {
|
||||||
|
clearInterval(interval);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
React.useLayoutEffect(() => {
|
React.useLayoutEffect(() => {
|
||||||
const onKeyDown = (event) => {
|
const onKeyDown = (event) => {
|
||||||
switch (event.code) {
|
switch (event.code) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue