From 708e6f587015f83c45871cdd5753e907a480b693 Mon Sep 17 00:00:00 2001 From: mhyee Date: Fri, 6 Jan 2023 13:15:34 +0800 Subject: [PATCH] Don't take screenshot for audio without cover image, fixes #10 --- notify_media.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notify_media.lua b/notify_media.lua index ed23fe5..546116c 100644 --- a/notify_media.lua +++ b/notify_media.lua @@ -194,7 +194,9 @@ function notify_metadata_updated() local user_path = mp.command_native({"expand-path", "~~/"}) shot_path = user_path .. "\\" .. pid .. ".jpg" - save_shot(shot_path) + if mp.get_property("video-codec") then + save_shot(shot_path) + end message_content = "^[setFile](pid=" .. pid .. ")(title=" .. title .. ")(artist=" .. artist .. ")(path=" .. path .. ")(type=" .. media_type() .. ")$" write_to_socket(message_content)