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

Conversation

@Aproxia-dev
Copy link
Contributor

@Aproxia-dev Aproxia-dev commented Jan 18, 2023

I'll admit that the way i did it is not the greatest. I tried not to make it a breaking change.

An alternative solution would be giving access to metadata.value to the user directly, which would probably be a whole lot nicer and easier to implement than this load of crap as well.

@Aproxia-dev
Copy link
Contributor Author

Here's an example notification using said extra metadata.

image

And here's the code:

playerctl:connect_signal("metadata", function(_, title, artist, album_path, album, new, player_name, extra)
    if new == true then
        naughty.notify {
            title    = extra.track .. ". " .. artist .. " - " .. title,
            text     =  "from <b><i>" .. album .. "</i></b> (" .. extra.year .. ")",
            image    = album_path,
            app_name = player_name,
            app_icon = gc.recolor_image(icons.music, beautiful.notifs)
        }
    end
end)

@Nooo37 Nooo37 requested a review from Kasper24 January 20, 2023 21:01
@Kasper24
Copy link
Contributor

@JavaCafe01 Maybe we pass in a table instead of having so much values? We'll add it in a new signal for backwards compatibillity and keep the old one the same way

@chxp82q
Copy link
Member

chxp82q commented Jan 29, 2023

@JavaCafe01 Maybe we pass in a table instead of having so much values? We'll add it in a new signal for backwards compatibillity and keep the old one the same way

Yup, that makes sense.

@Aproxia-dev
Copy link
Contributor Author

It definitely makes a lot of sense to make a new signal for it at this point. Passing so many values into a signal like that looks very silly. How should the new signal be called, though?

@chxp82q
Copy link
Member

chxp82q commented Feb 1, 2023

It definitely makes a lot of sense to make a new signal for it at this point. Passing so many values into a signal like that looks very silly. How should the new signal be called, though?

The same. I mean, this is all metadata. Also, there should be some sort of checker that sees if the user is using the old method and notifies them.

@chxp82q
Copy link
Member

chxp82q commented Feb 10, 2023

Ping @Aproxia-dev

1 similar comment
@chxp82q
Copy link
Member

chxp82q commented Mar 11, 2023

Ping @Aproxia-dev

@Aproxia-dev
Copy link
Contributor Author

Closing this as I rewrote the whole thing and made a new PR. #207

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.

3 participants