From d952f37b0e5d16675a8ef56a6c5eb2fb295c9aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Mon, 8 Feb 2021 21:24:44 +0100 Subject: [PATCH] Prevent saving unfinished video info when autoclosing --- src/player.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/player.js b/src/player.js index 36da0d8c..4c9f3858 100644 --- a/src/player.js +++ b/src/player.js @@ -372,7 +372,8 @@ class ClapperPlayer extends PlayerBase if(size[0] > 0 && size[1] > 0) clapperWidget._saveWindowSize(size); } - if(this.state !== GstClapper.ClapperState.STOPPED) { + /* If "quitOnStop" is set here it means that we are in middle of autoclosing */ + if(this.state !== GstClapper.ClapperState.STOPPED && !this.quitOnStop) { let resumeInfo = {}; if(settings.get_boolean('resume-enabled')) { resumeInfo.title = this.playlistWidget.getActiveFilename(); @@ -439,8 +440,8 @@ class ClapperPlayer extends PlayerBase if(settings.get_boolean('close-auto')) { /* Stop will be automatically called soon afterwards */ - this._performCloseCleanup(this.widget.get_root()); this.quitOnStop = true; + this._performCloseCleanup(this.widget.get_root()); } }