Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Playerctl: Added metadata_v2 #207

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Aproxia-dev
Copy link
Contributor

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
Copy link
Contributor Author

Ping @javacafe01

@javacafe01
Copy link
Member

Ping @javacafe01

🫡

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants