artemgordinskiy / Spotifree

An OS X app that automatically mutes ads on Spotify [DISCONTINUED]
http://spotifree.gordinskiy.com
MIT License
1.05k stars 70 forks source link

Video ads are not blocked #52

Open calucido opened 9 years ago

artemgordinskiy commented 9 years ago

Sorry, there's no way for us to block them.

yolfer commented 8 years ago

Dang, this makes spotifree much less useful. Can you provide a bit of technical info about why the video ads are not blockable by spotfiree? Maybe someone in the community can figure out a fix.

artemgordinskiy commented 8 years ago

Dang indeed. When a video ad comes on, Spotify reports its status as "stopped", and ignores all attempts to change the volume or skip the track. So there's not much Spotifree can do about them...

pedrocleis commented 8 years ago

Isn't there a way to mute Spotify, on Windows we have the Sound Mixer, doesn't OS X have something like this? I think it should be a issue with OS X if we can't mute an app using a script.

dceddia commented 8 years ago

Can the Spotify status be queried? Then, if it's "stopped", mute system audio or just the Spotify app?

Muting system audio might be a little heavy-handed, but presumably if you're listening to Spotify you don't have any other audio playing. Would probably want to somehow alert the user that audio is muted, though.

artemgordinskiy commented 8 years ago

Hey guys, Sorry to bring bad news, but none of your ideas would work, unfortunately.

Isn't there a way to mute Spotify, on Windows we have the Sound Mixer, doesn't OS X have something like this?

Nope, nothing like that. AFAIK, only possible by installing third-party kernel extensions like Soundflower, which is complicated and generally a pain in the ass, as you may imagine.

Can the Spotify status be queried? Then, if it's "stopped", mute system audio or just the Spotify app?

As I say above, there's no way to mute Spotify like that. Besides, if Spotify is "stopped", I have no way of knowing whether it's a video ad or you simply paused the music yourself to watch some Netflix.

JessePeden commented 8 years ago

What about detecting when the video frame is displayed and active, then muting system audio only until the video frame is NOT displayed anymore? This could also be just an option that people can enable/disable on their own in case it interferes with other system operations (somehow).

artemgordinskiy commented 8 years ago

@sybercorp Spotifree uses the public AppleScript API provided by Spotify. As far as I know, it doesn't provide a way of detecting video frames. Unless you know how to do that reliably outside of AppleScript.

forgetso commented 8 years ago

Hi Artem, what about this? Set an interval to get the ID of the currently playing track. Check for this every 1s. If the ID disappears, change the spotify volume to zero. If the ID appears, change the spotify volume to the previous value. If no ID appears for 30s, clear the interval and change the spotify volume to the previous value (in this case the user has simply stopped listening). Is this perhaps too processor intensive?

artemgordinskiy commented 8 years ago

@forgetso Thanks for the suggestion, but it won't work, unfortunately. As per my second comment in this thread:

When a video ad comes on, Spotify reports its status as "stopped", and ignores all attempts to change the volume or skip the track.

The only workaround for now is to keep Spotify minimised when it's playing.

forgetso commented 8 years ago

Ah, sorry. I missed this crucial piece of information!