From 01a294a70a2c24b86d233c20be9ccfa2bac43e9c Mon Sep 17 00:00:00 2001 From: arkohut <39525455+arkohut@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:53:13 +0800 Subject: [PATCH] feat: add active_app from active_window when scanning --- memos/commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/memos/commands.py b/memos/commands.py index 096f8c6..31bd220 100644 --- a/memos/commands.py +++ b/memos/commands.py @@ -198,6 +198,8 @@ async def loop_files(library_id, folder, folder_path, force, plugins): if file_type_group == "image": metadata = read_metadata(absolute_file_path) if metadata: + if "active_window" in metadata and "active_app" not in metadata: + metadata["active_app"] = metadata["active_window"].split(" - ")[0] new_entity["metadata_entries"] = [ { "key": key,