mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
Improve MPV initialization and restore (#222)
- set mpv settings only after it has successfully started (at least on linux, settings were not taken) - change timing of restore queue to behave properly
This commit is contained in:
parent
b60ba27892
commit
1acfa93f1a
3 changed files with 16 additions and 13 deletions
|
|
@ -73,6 +73,7 @@ export const App = () => {
|
|||
|
||||
mpvPlayer?.volume(properties.volume);
|
||||
}
|
||||
mpvPlayer?.restoreQueue();
|
||||
};
|
||||
|
||||
if (isElectron() && playbackType === PlaybackType.LOCAL) {
|
||||
|
|
@ -94,8 +95,6 @@ export const App = () => {
|
|||
|
||||
useEffect(() => {
|
||||
if (isElectron()) {
|
||||
mpvPlayer!.restoreQueue();
|
||||
|
||||
mpvPlayerListener!.rendererSaveQueue(() => {
|
||||
const { current, queue } = usePlayerStore.getState();
|
||||
const stateToSave: Partial<Pick<PlayerState, 'current' | 'queue'>> = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue