Xeroday / Spotify-Ad-Blocker

EZBlocker - A Spotify Ad Blocker for Windows
https://www.ericzhang.me/projects/spotify-ad-blocker-ezblocker/
GNU General Public License v3.0
1.85k stars 192 forks source link

## #150

Closed Woodahs closed 6 years ago

Woodahs commented 6 years ago

#

GenesisFR commented 6 years ago

@Xeroday I'd recommend using something like https://gist.github.com/GenesisFR/de0ad5710fb5eb221b5a239e819728bf to get the window handle of Spotify (last time I checked, it was always index 0 in the list) as processs.MainWindowTitle is equal to IntPtr.Zero when Spotify is sitting in the taskbar.

Xeroday commented 6 years ago

I'm able to grab the handle, just not the window title. The latest version should work even when Spotify is minimized to tray. It won't be able to tell what the artist is, but it will know if an ad is playing.