Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not block "404 Not Found" ads #33

Closed
Maiklas3000 opened this issue Jan 10, 2015 · 6 comments
Closed

does not block "404 Not Found" ads #33

Maiklas3000 opened this issue Jan 10, 2015 · 6 comments
Assignees
Labels

Comments

@Maiklas3000
Copy link

When Spotify output says there is a 404 Not Found error for an ad, no notification of the ad is made, and so blockify lets the ad play. As of today, every ad gets a 404 Not Found, so that means blockify allows all ads, at least for me.

I'm running Blockify 1.7.1, Arch 3.18.2-1, Enlightenment 0.19.2-1, Pulseaudio 5.99.2, and Spotify 0.9.11.27-1. Enlightenment is configured to show all three levels of notifications and to use the Enlightenment notification and DBus modules. Song info appears in notifications, and they are recognized by blockify, and the DBus controls work. I don't know if my system is causing the "404 Not Found" errors or if it's happening for everyone.

I wrote a shell script in 5 minutes to mute all "404 Not Found" ads. Here is its output (which is mostly just repeating the stderr of spotify):

12:34:09.247 I [head_file_streamer.cpp:106 ] Requesting head file from CDN url: http://heads-ec.spotify.com/head/3ec8731d67ad9b18cb7aec929f24ff8edf2e60ef
12:34:09.247 D [spirc_manager.cpp:578 ] GAIA: SpircManager::stpLoad, track=spotify:track:0ylMnxkHno7tBynYTV5esa, index=0, position=0, paused=0
*** Track!
12:34:09.247 I [ap_chunk_downloader.cpp:75 ] Requesting data (0 -> 524288) from AP for file 3ec8731d67ad9b18cb7aec929f24ff8edf2e60ef
12:34:09.603 I [http_fetch_connection.cpp:362 ] Result 404 Not Found
*** Ad!
12:34:10.881 I [ap_chunk_downloader.cpp:174 ] Request for file 3ec8731d67ad9b18cb7aec929f24ff8edf2e60ef complete (code: 0)

Here is blockify-ui's -vvv output:

2015-01-10 14:11:49 DEBUG util Added logging console handler.
2015-01-10 14:11:49 INFO util Loglevel is 10 (10=DEBUG, 20=INFO, 30=WARN).
2015-01-10 14:11:49 INFO list Blocklist loaded from /home/user/.config/blockify/blocklist.txt.
2015-01-10 14:11:49 INFO util Configuration file loaded from /home/user/.config/blockify/blockify.ini.
2015-01-10 14:11:49 INFO player InterludePlayer initialized.
2015-01-10 14:11:49 DEBUG player Loading playlist.
2015-01-10 14:11:49 DEBUG player Stop: State is (, , ).
2015-01-10 14:11:49 DEBUG player Setting interlude to: file:///media/Passport/Music/Waldeck/Balance Of The Force/01 Defenceless.mp3
2015-01-10 14:11:49 INFO player Playlist loaded (Length: 69).
2015-01-10 14:11:49 INFO player Playlist: ['file:///media/Passport/Music/Waldeck/Balance Of The Force/01 Defenceless.mp3']
2015-01-10 14:11:49 DEBUG main Mute method is pulse sink.
2015-01-10 14:11:49 INFO main Blockify initialized.
2015-01-10 14:11:49 DEBUG main Autodetect: True.
2015-01-10 14:11:49 DEBUG main Automute: True.
2015-01-10 14:11:49 DEBUG gui Enabled automute.
2015-01-10 14:11:49 INFO gui Blockify-UI initialized.
2015-01-10 14:11:49 INFO gui Blockify-UI started.
2015-01-10 14:34:09 INFO main Forcing unmute.

Where it says "Forcing unmute", your program undid my program's muting of an ad. (Note where my program says, "Ad!" at the same timestamp.) I'm not asking your program to play nicely with my program (though I'm not sure why it insists on unmuting.) I'm just saying your program misses every ad at present, at least for me. It is, however, very impressive otherwise. You could fix it by launching spotify from blockify (unless there is an easier way to grab stderr), and then just look for that text. I'm not sure, but you might be able to do away with the need for notifications while you're at it.

@gmdfalk
Copy link
Owner

gmdfalk commented Jan 10, 2015

Thanks for the detailed report, I'll try to reproduce and report back.

@gmdfalk
Copy link
Owner

gmdfalk commented Jan 10, 2015

I can't reproduce this issue, everything working fine here. You raise some interesting points though. I'll keep an eye on this.

For now, I'm adding an option to disable forced unmute (force_unmute in the general section) with 1.7.2 to potentially play nice with your app (though you probably don't have a reason to keep blockify running if its not muting correctly).

What exactly do you mean with notifications and why don't you like them?

@gmdfalk
Copy link
Owner

gmdfalk commented Jan 10, 2015

On second thought, i removed the force unmute code. Lets see how that plays out. It might not change anything in your case as blockify will probably still try to unmute. Let me know how it turns out.

@gmdfalk gmdfalk self-assigned this Jan 10, 2015
@gmdfalk gmdfalk added the bug label Jan 10, 2015
@Maiklas3000
Copy link
Author

With 1.7.1(-2) and IceWM (instead of Enlightenment), blockify-ui went 6 for 6 in blocking ads, including at least one with a 404 error. So, the problem is apparently with Enlightenment (or my configuration thereof.)

You said, " i removed the force unmute code." I think you meant you reverted force unmute to the way it was in 1.7.1. Anyway, with 1.7.2(-2), the behavior under Enlightenment is the same as with 1.7.1. (Running on its own, it blocks nothing. When my own blocker is running, blockify-ui unmutes any muted ads. :/)

You asked why I don't like notifications. I didn't say that. Maybe I misunderstand how your program identifies ads. Your program documentation states that notifications are required for your program to function, so I assume it looks at notifications for ad information. I thought the 404 errors were preventing the ad notifications, but your program blocked an ad with a 404 error under IceWM, so that's not exactly the problem.

Close?

@gmdfalk
Copy link
Owner

gmdfalk commented Jan 11, 2015

The trouble with Enlightenment is that it is not supported by libwnck. Libwnck is used by blockify to track open windows.
One way or the other, it seems Enlightment handles its window management different in a way that breaks libwnck support.
Maybe they changed something in their compliance with EWMH or ICCCM standards with a recent version.
Did blockify work for you with previous versions of Enlightenment?

@Maiklas3000
Copy link
Author

I hadn't tried it in previous versions of Enlightenment, but I just installed and tried E16, and blockify-ui worked perfectly there. It even did the interlude music.
Edit: blockify-ui also works perfectly in Enlightenment 18(.8), stock (no changes), no D-Bus module, no notifications (except whatever are built in, but none are displayed.)
Edit2: closing issue, since it seems restricted to Enlightenment 19's quirks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants