BlingCorp / bling

Utilities for the awesome window manager
https://blingcorp.github.io/bling/
MIT License
852 stars 49 forks source link

Playerctl: Added metadata_v2 #207

Open Aproxia-dev opened 1 year ago

Aproxia-dev commented 1 year ago

Rewrote parts of the metadata signal, giving more access to most of the metadata that was previously inaccessible.

The signal still defaults to the previous format, and must be manually enabled by setting the metadata_v2 argument to true.

Example: image

playerctl:connect_signal("metadata", function(_, metadata, album_art, new, player_name)
        if new == true then
                naughty.notify({
                        title    = metadata.trackNumber .. ". " .. metadata.artist .. " - " .. metadata.title,
                        text     =  "from <b><i>" .. metadata.album .. "</i></b> (" .. metadata.contentCreated .. ")",
                        image    = album_art,
                        app_name = player_name,
                        app_icon = gc.recolor_image(icons.music, beautiful.notifs),
                        actions  = { prev, playpause, skip }
                })
        end
end)
Aproxia-dev commented 1 year ago

Ping @JavaCafe01

javacafe01 commented 1 year ago

Ping @JavaCafe01

🫡