kirtan-shah / nowplaying-cli

macOS command-line utility for retrieving currently playing media
GNU General Public License v3.0
148 stars 9 forks source link

Is it possible to use this to render the album artwork using nowplaying-cli? #4

Closed pogmommy closed 1 year ago

pogmommy commented 1 year ago

I'm trying to use this to get now-playing information into an ubersicht widget. Is there a way to get kMRMediaRemoteNowPlayingInfoArtworkData in a more readable format? Unless I'm unfamiliar with the format used, it seems like the data made available is abbreviated and isn't able to be used for rendering the album artwork.

No worries if not, thank you for the time and effort put into this, it's wildly useful even if this use-case isn't within the scope of this project!

kirtan-shah commented 1 year ago

I believe this can be done. We just need to add a special case for artworkData that will print out the unabbreviated data.

I'm debating whether it would be better to output the data in binary format (to be piped or redirected to a file), or in some ASCII format (hex, base64?)

kirtan-shah commented 1 year ago

I decided to output the data in base64 format because you can pipe into base64 -decode on a mac if you need the binary format. The latest release now supports getting the full album artwork!

frypf commented 1 year ago

I have one machine running Monterey and one on Ventura, but only the Ventura one returns anything for artworkData. On Monterey I just get an empty string, not even the null that is usually output with an incorrect key specifier. Just wanted to check is this intended/expected behaviour? Thanks for this very useful little tool!