Block Ads on Spotify Desktop w/out Hosts

Question

Has anybody figured out a way to block ads on the Spotify app without modifying the hosts file, using Pi-Hole, or anything similar to that? Spotify recently changed their server stuff and you can't block spclient.wg.spotify.com without it also blocking music playback, but unblocking it allows ads to go through. I'll admit I don't know too much about Chromium Embedded Framework, but I was wondering if any smart people figured out a way to run adblock through it or something. I've been trying to block at least the banner ads using Spicetify, however, it doesn't seem to be as easy as just modifying the .css file. Any help would be appreciated.

EDIT: Switched two words around

Posted Sep 1, 2019, 9:57 AM UTC

521
Furei_Kyusho •

Open chrome go to open spotify.com , use ublock origin.

save yourself all the hassle of doing this, you're welcome.

15
adamkkkkkk•

if you want to use Spotify on windows then use this version of spotify

https://upgrade.spotify.com/upgrade/client/win32-x86/spotify_installer-1.1.12.451.gdb77255f-44.exe

Use this repo's dll to stop ads (no hosts file needed and the repo is active)

https://github.com/mrpond/BlockTheSpot

Use this guide to stop the spotify app from updating

https://www.reddit.com/r/Piracy/comments/aumaqg/guide_block_spotify_ads_on_windows_working/

Also use these two commands

icacls %localappdata%\Spotify\Update /deny "%username%":D

icacls %localappdata%\Spotify\Update /deny "%username%":R

to further remove read/deletion rights away from the Spotify app so it won't update itself

I'm using Spotify and haven't encountered a single visual/audio ad

10
[deleted]•

[deleted]

1
DarkVamprism•

adding this to the top of user.css for Spicetify will remove the banner ads on the artist screen, the big sponsor ad on the home page up the top, and the big stupid one that blocks out the screen.

.ad-container, #view-leaderboard-ad, #view-billboard-ad {
    display: none !important;
}
2
CyberBlaed•
1
Encrypt3dShadowOP•

It doesn't remove the whole element though. It simply blacks out the ad, which does nothing to free up screen space.

1
CyberBlaed•

Then if you are that fussy over real estate, use the web player and an adblocker like Ublock Origin. https://open.spotify.com/

An alternative is a bigger screen/higher resolution to push more pixels for your viewing area to use.

I cannot say I have seen the ‘window’ not show from a blocked ad, its account function specific from what I recall, happy to be proven wrong.

1
Encrypt3dShadowOP•

I was hoping it wouldn't come down to using the web player. Thanks.

1
player9486•

use pi-hole

1
Encrypt3dShadowOP•

Has anybody figured out a way to block ads on the Spotify app without modifying the hosts file, using Pi-Hole, or anything similar to that?

The whole point is that Spotify seems stream their ads and music from the same server now, and blocking that server will prevent any music for playing.

1
player9486•

Have you tried adding ublock's lists in pi-hole? I'm not getting ads.

From https://github.com/gorhill/uBlock/ :

The default behavior of uBlock Origin when newly installed is to block ads, trackers and malware sites -- through EasyList, EasyPrivacy, Peter Lowe’s ad/tracking/malware servers, various lists of malware sites, and uBlock Origin's own filter lists.

1
Encrypt3dShadowOP•

From my understanding, it just acts as a network-wide hosts file, only capable of blocking IP or DNS addresses without having the ability to specify things like "only block /ads/". The other reason I don't really want to use Pi-hole is I do a lot of gaming and I don't want my little Pi 3 B to be a bottleneck.

1
player9486•

You can run pi-hole on an Ubuntu Virtual Machine on your gaming computer with only eating 1 GB of your RAM, but it's all yours to decide at the end. Also see this: https://github.com/StevenBlack/hosts/issues/270

1
[deleted]•

[deleted]

1
Encrypt3dShadowOP•

Looks interesting, but most hits on Google are about Fiddler being rootkit malware. I'll look into other ways of blocking the API requests mentioned in the readme, though.

EDIT: I did some more research and it looks like it's fine, I'll give it a try.

1
Encrypt3dShadowOP•

rip, they deleted their comment once they started losing karma. The suggestion was to look at https://github.com/wintersim/fiddler-spotify-adblock, just in case anyone looks through these.

EDIT: This method actually worked for me, which is weird because to my knowledge, it's doing the same thing as an AdGuard filter, which didn't work.

1

rip, they deleted their comment once they started losing karma.

You can bring their post back - here

If that link ^ doesn't work try this.

1
[deleted]•

[removed]

1
[deleted]•

[deleted]

0
Encrypt3dShadowOP•

Neat application, doesn't filter Spotify ads. This doesn't help the issue I stated in the original post, which is that you can't simply block a host and call it a day.

1
[deleted]•

[deleted]

2
Encrypt3dShadowOP•

I'm on Windows 10. They changed how it works more recently to feed ads and music through the same host.

1
[deleted]•

[deleted]

1