adarhef / NowPlayingRetriever

7 stars 0 forks source link

Zero kb artwork.jpg returned when playing media (Youtube) on Safari browser #1

Open khammo01 opened 5 days ago

khammo01 commented 5 days ago

When playing Youtube in Safari browser, artwork.jpg sometimes is zero kb even though I can see a thumbnail in the nowplaying media control.

artwork works correctly for Chrome and YouTube and for Music App.

In source code, see some processing if the image is not a jpg....? Is that broken perhaps?

Great app - I can script but can't write Swift - Thank you!

OS X Sequoia 15.0.1

adarhef commented 3 days ago

Hey! So I noticed this when I initially wrote this code, that it wasn't getting artwork for Safari. Running the code again I remembered that the artwork data just isn't present in the information dictionary, at least with the key I was using for everything else. No other key seemed to contain anything relevant. But in the system's now playing I do see a thumbnail. Since these are all private undocumented APIs that can be disabled at any moment, there's really not much I can do unfortunately. I guess I can keep this issue open if anyone else has any ideas but I'm currently out of ideas and unable to spend the time researching this further. Frankly my needs at the time were to have this work for the Music app, and the fact that it also worked for Chrome was a nice bonus.

khammo01 commented 2 days ago

Understood and thanks. ChatGPT helped me write a shell script that looks for a YouTube safari tab with audio , gets and returns that artwork if NowPlayingRetriever returns a zero size artwork.jpg

oops, I accidentally closed the issue. Reopened.