From bc28f46068c51583123627ecbdb052963cc7b24b Mon Sep 17 00:00:00 2001 From: Frechdachs Date: Mon, 9 Jan 2023 14:56:40 +0100 Subject: [PATCH] Do not autosave empty QC reports --- mpvqc/manager/_states.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpvqc/manager/_states.py b/mpvqc/manager/_states.py index 83d3c236..10ec1f3b 100644 --- a/mpvqc/manager/_states.py +++ b/mpvqc/manager/_states.py @@ -198,8 +198,8 @@ def on_write_auto_save(self, _: AppWindow, __: Table, m: MpvWidget) -> None: Auto saves the current state """ - if m.player.has_video(): - content = _exporter.get_file_content(self._vid, self._comments or []) + if m.player.has_video() and self._comments: + content = _exporter.get_file_content(self._vid, self._comments) _exporter.write_auto_save(video_path=self._vid, file_content=content) def on_import(