Skip to content
This repository was archived by the owner on Jan 24, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions notify.lua
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,13 @@ function notify_current_track()
body = ""
params = ""
scaled_image = ""
delete_scaled_image = false

-- first try finding local cover art
abs_filename = os.getenv("PWD") .. "/" .. mp.get_property_native("path")
cover_image = get_folder_cover_art(abs_filename)
if cover_image and cover_image ~= "" then
scaled_image = tmpname()
scale_image(cover_image, scaled_image)
delete_scaled_image = true
end

-- then load cover art from the internet
Expand Down Expand Up @@ -284,10 +282,6 @@ function notify_current_track()
command = ("notify-send -a mpv %s -- %s %s"):format(params, summary, body)
print_debug("command: " .. command)
os.execute(command)

if delete_scaled_image and not os.remove(scaled_image) then
print("could not remove" .. scaled_image .. ", please remove it manually")
end
end

function notify_metadata_updated(name, data)
Expand Down