Skip to content

Commit

Permalink
Don't take screenshot for audio without cover image, fixes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
mhyee authored and datasone committed Jan 6, 2023
1 parent 3cb4a23 commit 708e6f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion notify_media.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 708e6f5

Please sign in to comment.