eonpatapon / mpDris2

MPRIS V2.1 support for mpd
GNU General Public License v3.0
210 stars 46 forks source link

Album art cover image sometimes appears too large. #94

Closed doronbehar closed 6 years ago

doronbehar commented 6 years ago

Here is example showing a notification completely covering the page:

desktop 2017 09 10-17 03 29

Setup:

I use https://github.com/stefano-m/lua-media_player to display notifications and to control my MPD instance in awesome-Wm. I was searching through the source code of https://github.com/stefano-m/lua-media_player and couldn't find anything related to displaying album art or cover albums images.

I'm not sure here is the right place to ask, and not at the lua-media_player module, but would it be possible to configure mpDris2 to display album art images in a defined fixed size?

grawity commented 6 years ago

mpDris2 does not display anything; it only exports information for other programs (consumers) to use.

Importantly, there can be multiple consumers running at the same time (each of which would want a different cover size), as well as multiple providers (each of which would need to be taught about resizing). So just making mpDris2 blindly resize the exported image is not going to solve anything.

In the end, only the consumer itself (lua-media_player) knows what size it needs at the moment, so it should do its own resizing on display.

doronbehar commented 6 years ago

You are right, I should ask @stefano-m about it, thanks any way :)

grawity commented 6 years ago

Though, now that you mention it: I forgot that track notifications can be invoked by mpDris2 itself, if configured. That would have nothing to do with MPRIS, but rather with the notification daemon – in Awesome, it would go directly to naughty, I think.

But even in that case, it would be the job of the notification daemon to shrink the provided image to fit. Again, many apps can show notifications, and only the notification daemon itself would know what size it accepts.