jonathangarelick / SoundSeer

SoundSeer is a macOS app that shows your current song & controls in the menu bar.
128 stars 2 forks source link

Adopt alternative to timed polling for Spotify player status #14

Closed alexpersian closed 7 months ago

alexpersian commented 7 months ago

please ignore if you've already explored these ideas

There are a couple things from SpotMenu I saw after poking around that might help interfacing with the Spotify client more smoothly; specially around getting the player state.

Referencing the the Spotify app directly

Using notification center for updates (push)

I think with this approach the AppleScript timed polling could be eliminated and even more performance would be found since it won't have to poll while the Spotify isn't active or playing.

jonathangarelick commented 7 months ago

This is excellent, I will definitely look into this.

jonathangarelick commented 7 months ago

A few tricky edge cases, but this is now working and merged into main. Thanks @alexpersian ! Hopefully will ship this with v1.1 sometime next week.

alexpersian commented 7 months ago

🔥🔥🔥 Excited to check it out!

alexpersian commented 7 months ago

Great stuff. Instant response now. 0 CPU usage while idle. 💯

image

https://github.com/jonathangarelick/SoundSeer/assets/5446451/88bab04d-a981-4fbb-ab6f-e4c0eebf7996