Code Monkey home page Code Monkey logo

spotify-adblock-linux's Introduction

This project has been deprecated in favor of its rewrite in Rust (https://github.com/abba23/spotify-adblock).

spotify-adblock-linux

Spotify adblocker for Linux that works by wrapping getaddrinfo and cef_urlrequest_create, blocking non-whitelisted domains and blacklisted URLs.

Notes

  • This does not work with the snap Spotify package.

Build

Prerequisites:

  • Git
  • Wget
  • tar
  • Make
  • GCC
  • libc headers (e.g. libc-dev on Debian-based distributions)

$ git clone https://github.com/abba23/spotify-adblock-linux.git
$ cd spotify-adblock-linux
$ wget -O cef.tar.bz2 https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linux64_minimal.tar.bz2
$ tar -xf cef.tar.bz2 --wildcards '*/include' --strip-components=1
$ make

Install

Debian Package

$ sudo make install

Flatpak

$ mkdir -p ~/.spotify-adblock && cp spotify-adblock.so ~/.spotify-adblock
$ flatpak override --user --filesystem="~/.spotify-adblock/spotify-adblock.so" com.spotify.Client

Usage

Command-line

Debian Package

$ LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify

Flatpak

$ flatpak run --command=sh com.spotify.Client -c 'eval "$(sed s#LD_PRELOAD=#LD_PRELOAD=$HOME/.spotify-adblock/spotify-adblock.so:#g /app/bin/spotify)"'

Desktop file

You can integrate it with your desktop environment by creating a .desktop file (e.g. spotify-adblock.desktop) in ~/.local/share/applications. This lets you easily run it from an application launcher without opening a terminal.

Examples:

Debian Package

[Desktop Entry]
Type=Application
Name=Spotify (adblock)
GenericName=Music Player
Icon=spotify-client
TryExec=spotify
Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify

Flatpak

[Desktop Entry]
Type=Application
Name=Spotify (adblock)
GenericName=Music Player
Icon=com.spotify.Client
Exec=flatpak run --file-forwarding --command=sh com.spotify.Client -c 'eval "$(sed s#LD_PRELOAD=#LD_PRELOAD=$HOME/.spotify-adblock/spotify-adblock.so:#g /app/bin/spotify)"' @@u %U @@
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify

Uninstall

$ sudo make uninstall

spotify-adblock-linux's People

Contributors

aaronrancsik avatar abba23 avatar abenson avatar alsogamer avatar juby210 avatar lrznd avatar polyzen avatar ristovski avatar smaznet avatar tedyst avatar zhaqenl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spotify-adblock-linux's Issues

Still getting ads

Running this:
LD_PRELOAD=/usr/local/lib/spotify-adblock.so snap run spotify &

i see this errors:
Gtk-Message: Failed to load module "gail"
Gtk-Message: Failed to load module "atk-bridge"
Gtk-Message: Failed to load module "canberra-gtk-module"
[1210/144406.180554:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command

Spotify works, however i still see ads and listen to them

Songs not loading

Songs aren't loading :/ everything else working fine but songs.

Ubuntu 18.04 x86_64
Spotify 1.1.10.546.ge08ef575 (not the snap version)

Log from terminal.

1125/144453.716844:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
[+] apresolve.spotify.com
[+] guc3-accesspoint-a-g1ck.ap.spotify.com
[+] https://spclient.wg.spotify.com/reaccept-my-legal/v1/reacceptance-metadata?language=en
[-] https://spclient.wg.spotify.com/ad-logic/v1/config
[+] spclient.wg.spotify.com
[-] https://spclient.wg.spotify.com/ads/v2/config?payload=eyJ1c2VyX2FnZW50IjoiTW96aWxsYVwvNS4wIChYMTE7IExpbnV4IHg4Nl82NCkgQXBwbGVXZWJLaXRcLzUzNi41IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lXC8xOS4wLjEwODQuOSBTYWZhcmlcLzUzNi41IFNwb3RpZnlcLzExMTAwMDU0NiAoODsgMDsgNSkiLCJzZXNzaW9uX2lkIjoiN2I5OWQ0ODEtYzQzMC00NjE5LTk1YTUtOTA0ZDQ1NTA0MmMyIn0=
[+] dealer.spotify.com
[+] dealer.spotify.com
[+] spclient.wg.spotify.com
[-] https://spclient.wg.spotify.com/ads/v2/config?payload=eyJ1c2VyX2FnZW50IjoiTW96aWxsYVwvNS4wIChYMTE7IExpbnV4IHg4Nl82NCkgQXBwbGVXZWJLaXRcLzUzNi41IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lXC8xOS4wLjEwODQuOSBTYWZhcmlcLzUzNi41IFNwb3RpZnlcLzExMTAwMDU0NiAoODsgMDsgNSkiLCJzZXNzaW9uX2lkIjoiN2I5OWQ0ODEtYzQzMC00NjE5LTk1YTUtOTA0ZDQ1NTA0MmMyIn0=
[+] https://graph.facebook.com/v2.2/me?fields=id,email,permissions&access_token=not-a-token
[-] graph.facebook.com
[+] pl.scdn.co
[+] seeded-session-images.scdn.co
[-] https://spclient.wg.spotify.com/ads/v2/config?payload=eyJ1c2VyX2FnZW50IjoiTW96aWxsYVwvNS4wIChYMTE7IExpbnV4IHg4Nl82NCkgQXBwbGVXZWJLaXRcLzUzNi41IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lXC8xOS4wLjEwODQuOSBTYWZhcmlcLzUzNi41IFNwb3RpZnlcLzExMTAwMDU0NiAoODsgMDsgNSkiLCJzZXNzaW9uX2lkIjoiN2I5OWQ0ODEtYzQzMC00NjE5LTk1YTUtOTA0ZDQ1NTA0MmMyIn0=
[+] dailymix-images.scdn.co
[-] https://spclient.wg.spotify.com/ad-logic/v1/config
[-] www.googletagservices.com
[-] https://spclient.wg.spotify.com/ads/v2/config?payload=eyJ1c2VyX2FnZW50IjoiTW96aWxsYVwvNS4wIChYMTE7IExpbnV4IHg4Nl82NCkgQXBwbGVXZWJLaXRcLzUzNi41IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lXC8xOS4wLjEwODQuOSBTYWZhcmlcLzUzNi41IFNwb3RpZnlcLzExMTAwMDU0NiAoODsgMDsgNSkiLCJzZXNzaW9uX2lkIjoiN2I5OWQ0ODEtYzQzMC00NjE5LTk1YTUtOTA0ZDQ1NTA0MmMyIn0=
[-] audio-sp-sjc.spotifycdn.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] audio-sp-sjc.spotifycdn.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] heads4-ak-spotify-com.akamaized.net
[-] audio-sp-sjc.spotifycdn.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] https://spclient.wg.spotify.com/ad-logic/v1/config
[-] audio-sp-sjc.spotifycdn.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] https://spclient.wg.spotify.com/ads/v2/config?payload=eyJ1c2VyX2FnZW50IjoiTW96aWxsYVwvNS4wIChYMTE7IExpbnV4IHg4Nl82NCkgQXBwbGVXZWJLaXRcLzUzNi41IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lXC8xOS4wLjEwODQuOSBTYWZhcmlcLzUzNi41IFNwb3RpZnlcLzExMTAwMDU0NiAoODsgMDsgNSkiLCJzZXNzaW9uX2lkIjoiN2I5OWQ0ODEtYzQzMC00NjE5LTk1YTUtOTA0ZDQ1NTA0MmMyIn0=
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] audio-sp-sjc.spotifycdn.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] https://spclient.wg.spotify.com/ad-logic/v1/config
[-] https://spclient.wg.spotify.com/ads/v2/config?payload=eyJ1c2VyX2FnZW50IjoiTW96aWxsYVwvNS4wIChYMTE7IExpbnV4IHg4Nl82NCkgQXBwbGVXZWJLaXRcLzUzNi41IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lXC8xOS4wLjEwODQuOSBTYWZhcmlcLzUzNi41IFNwb3RpZnlcLzExMTAwMDU0NiAoODsgMDsgNSkiLCJzZXNzaW9uX2lkIjoiN2I5OWQ0ODEtYzQzMC00NjE5LTk1YTUtOTA0ZDQ1NTA0MmMyIn0=
[-] audio-sp-sjc.spotifycdn.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] https://spclient.wg.spotify.com/ad-logic/v1/config
[-] https://spclient.wg.spotify.com/ads/v2/config?payload=eyJ1c2VyX2FnZW50IjoiTW96aWxsYVwvNS4wIChYMTE7IExpbnV4IHg4Nl82NCkgQXBwbGVXZWJLaXRcLzUzNi41IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lXC8xOS4wLjEwODQuOSBTYWZhcmlcLzUzNi41IFNwb3RpZnlcLzExMTAwMDU0NiAoODsgMDsgNSkiLCJzZXNzaW9uX2lkIjoiN2I5OWQ0ODEtYzQzMC00NjE5LTk1YTUtOTA0ZDQ1NTA0MmMyIn0=
[-] audio-sp-sjc.spotifycdn.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] audio-fa.scdn.co
[-] audio4-ak.spotify.com.edgesuite.net
[-] audio-fa.scdn.co
[-] audio-sp-sjc.spotifycdn.net

Doesn't block ads for me

This doesn't block ads for me.
Anyways, I see that you wrote in the README.md file that "it doesn't work with the snap Spotify package" and I actually have the one from the Ubuntu Software Store, so how else (or where) can I get the right Spotify package? I'm running ubuntu 20.04 LTS by the way.

Blacklist dictionary needs to be nulled

Perhaps it's just the way I am using it, but the "spclient.wg.spotify.com" links need to be allowed now.
Testing if this causing ad issues as we speak.

Yep, ads detected. I'll poke about.

Ads still playing, just less frequent (banner ads are not displayed)

spotify-client (1:1.1.10.546.ge08ef575-19)

Installed via the official repository.
Running on Debian 10 with Gnome.
One ad provider: https://ad.doubleclick.net/

output of "sudo make --debug install":
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
Updating goal targets....
File 'install' does not exist.
Must remake target 'install'.
install -Dm644 -t /usr/local/lib spotify-adblock.so
Successfully remade target file 'install'.

output of "LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify": [1125/172058.267787:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command

when building, I get error 127

after following the steps in the readme, I got this error when I ran make
gcc -Wall -shared -fPIC -o spotify-adblock.so -ldl spotify-adblock.c whitelist.h make: gcc: Command not found Makefile:9: recipe for target 'spotify-adblock.so' failed make: *** [spotify-adblock.so] Error 127

Adblocking broken in Spotify 1.1.42.622

Spotify version 1.1.42.622 seems to be making some ad requests through CEF (Chromium Embedded Framework) instead of libcurl as before, bypassing the current function hooks.

Doesn't work on the latest Spotify update.

As the title says, spotify-adblock-linux is not working on the latest update (v.1.1.42.622-1). Visual ads as well as audio ads have been showing up as of late.

I just wanted to confirm if this only applies to me, because it was working on the previous version of Spotify. If you are aware of this issue working on it, I apologize in advance for not seeing it. I appreciate your work a lot.

Latest Spotify package: https://aur.archlinux.org/packages/spotify/
OS: Manjaro Linux 20.1
spotify-adblock-linux version: cloned from Github and pulled recently.

object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored

This is the output I'm getting:

ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
Gtk-Message: 09:23:12.308: Failed to load module "canberra-gtk-module"
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
[0224/092312.550209:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command

Does this mean the injection is not working?

Sync with other devices

Having this mod installed it's working like a champ. But I use a lot send songs from phone to computer, is there a way that we can enable that path?

'make' fails when installing

When I try to make after cloning, it fails with the following error.

gcc -Wall -shared -fPIC -o spotify-adblock.so  -ldl spotify-adblock.c whitelist.h blacklist.h
spotify-adblock.c:3:10: fatal error: curl/curl.h: No such file or directory
 #include <curl/curl.h>
          ^~~~~~~~~~~~~
compilation terminated.
Makefile:11: recipe for target 'spotify-adblock.so' failed
make: *** [spotify-adblock.so] Error 1

Songs stop playing after 4 seconds

As described in the title. Songs stop playing after 4 seconds and says "can't play the current song". I'm new to Linux so maybe it's something I don't have installed.

Solus 4.1 Fortitude
Spotify 1.1.26.501.gbe11e53b

Here is the log from the terminal

spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by spotify)

(spotify:19340): dbind-WARNING **: 20:07:05.503: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
/usr/share/spotify/spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /usr/share/spotify/spotify)
/proc/self/exe: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /proc/self/exe)
/proc/self/exe: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /proc/self/exe)
[+] apresolve.spotify.com
[-] login5.spotify.com
[0310/200705.950975:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
[+] gew1-accesspoint-c-dtl1.ap.spotify.com
[-] login5.spotify.com
[+] dealer.spotify.com
[+] dealer.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[+] dealer.spotify.com
[-] login5.spotify.com
[+] dealer.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[+] thisis-images.scdn.co
[+] dailymix-images.scdn.co
[+] newjams-images.scdn.co
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[+] dealer.spotify.com
[+] dealer.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] www.googletagservices.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[+] dealer.spotify.com
[+] dealer.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[+] heads-fa.scdn.co
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[+] dealer.spotify.com
[+] dealer.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[+] dealer.spotify.com
[+] dealer.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com
[-] login5.spotify.com

[question]

To update this, do I want to need to overwrite the blacklist and whitelist files?
Do I need to perform another make install?

Also, how may I get involved should you no longer maintain this?
Tshark, null-route hosts to test, and if good add to blacklist?

Requesting future update guideline

The script works great, for now. But when you update the whitelist or blacklist in future, how should we update the script? Please add a seperate section how to update the script.

Thank you for the amazing work!

Some tracks are getting blocked

For instance this track can't be played with the client but will get played in browser with Ublock or in the modified Android app. I noticed this problem with a few other tracks but I forgot to open an issue back then.

Don't judge my music taste I'm just searching for some new phonk 😳

[1] 13256 segmentation fault (core dumped)

System- Manjaro Illyria KDE / Kernel 4.19-66
Reproduce bug- $LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify

Can I add set LD_PRELOAD variable in my .zshrc and take care of this?

Symbol lookup error

Hello,
I installed on archlinux the very last version of spotify-adblock-git (r68.624fad4-1) issued on 2020/10/02 through AUR.
I run Spotify version 1.0.98.78.gb45d2a6b (2019).
When I try to launch spotify-adblock I get a symbol lookup error :

$ LD_PRELOAD=/usr/lib/spotify-adblock.so spotify
/bin/sh: symbol lookup error: /usr/lib/spotify-adblock.so: undefined symbol: cef_string_userfree_utf16_free

The PKGBUILD of the spotify-adblock-git AUR package is the following :

# Maintainer: xyzzy

pkgname=spotify-adblock-git
_pkgname=${pkgname%-*}
pkgver=r68.624fad4
pkgrel=1
license=("GPL3")
pkgdesc="Adblocker for Spotify"
depends=("spotify")
makedepends=("git")
arch=("i686" "x86_64")
provides=("spotify-adblock")
conflicts=("spotify-adblock")
url=https://github.com/abba23/spotify-adblock-linux

source=(
	"${_pkgname}::git+https://github.com/abba23/spotify-adblock-linux.git"
	"cef.tar.bz2::http://opensource.spotify.com/cefbuilds/cef_binary_80.0.8%2Bgf96cd1d%2Bchromium-80.0.3987.132_linux64_minimal.tar.bz2"
	"${_pkgname}.desktop"
)
noextract=('cef.tar.bz2')

sha1sums=(
	'SKIP'
	'e6c323ff461d0f9beb093f94a77a1f817c8732e5'
	'5240cf66c7a74c2d3733cf858c9cd78e033950a5'
)

pkgver() {
	cd "${srcdir}/${_pkgname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd "${srcdir}/${_pkgname}"
	bsdtar -xf ../cef.tar.bz2 --strip-components=1 '*/include'
}

build() {
	cd "${srcdir}/${_pkgname}"
	make
}

package() {
	cd "${srcdir}/${_pkgname}"
	make DESTDIR="${pkgdir}" PREFIX=/usr install
	install -Dm644 "../${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
}

Can someone tell me what goes wrong ?
Thank you.

getaddarinfo failed

when running the "LD_PRELOAD=./spotify-adblock.so spotify" there is an error that says ERR: getaddrinfo failed

[Help] Usage on Manjaro Linux (Arch)

Executing the following command:

LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify

produces an error

bash: spotify: command not found

I have installed Spotify using Flatpak

Spotify deleting my account

Seems to be working, as I get no ads. But Spotify doesn't like those who won't give them personal data.

Took around 24 hours before they took it down.
"Your session has been terminated. (Error code: 127)"

env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
/usr/lib64/spotify-client/spotify: /usr/lib64/spotify-client/libcurl-gnutls.so.4: no version information available (required by /usr/lib64/spotify-client/spotify)
Gtk-Message: 21:24:57.313: Failed to load module "canberra-gtk-module"
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
/usr/share/spotify-client/spotify: /usr/lib64/spotify-client/libcurl-gnutls.so.4: no version information available (required by /usr/share/spotify-client/spotify)
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
/proc/self/exe: /usr/lib64/spotify-client/libcurl-gnutls.so.4: no version information available (required by /proc/self/exe)
[2019/09/20 00:02:23:7106] ERR: getaddrinfo failed
[2019/09/20 00:02:57:1585] ERR: getaddrinfo failed

Fedora 30
Verified Protonmail e-mail
Connection over Tor
Spotify version 1.1.5.153.gf614956d

auto run script.

Hi there im having some issues with my autorun script and wanted to see if you can give some pointers on whats going on or how to fix them?

Here is what i have so far
#!/bin/bash
LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify
any help would be wonderful thank you again for everything!

make error

when I use make i got this error

gcc -Wall -shared -fPIC -o spotify-adblock.so -ldl spotify-adblock.c whitelist.h blacklist.h
spotify-adblock.c:3:10: fatal error: curl/curl.h: No such file or directory
#include <curl/curl.h>
^~~~~~~~~~~~~
compilation terminated.
Makefile:11: recipe for target 'spotify-adblock.so' failed
make: *** [spotify-adblock.so] Error 1

ads not stopped totally just became more less frequent

Hi,

after building and running your code, the number of ads has been decreased significantly but sometimes get them.
My question how can monitor which domain are used for ads to blacklist them?
Im using spotify latest snap version on ubunutu 16.04:
spotify 1.1.10.546.ge08ef575-19 36 stable spotify✓
mostly in Hungary.

I've been trying wireshark, tcpdump to monitor connections, but here are to many of them without name resolution, so can't debug in this way.

Br
B.

Spotify wont update liked songs

On my phone and windows spotify, my liked songs will update to what i have added. On linux with using the blocker version and non-blocker version, spotify wont update the liked songs even if i have signed out and logged back in. Is there any way to fix this?

ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored

why is this?

ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
No protocol specified

(spotify:7748): Gtk-WARNING **: 15:57:11.481: cannot open display: :0.0

podcasts url

"traffic.megaphone.fm",
"dcs-b.megaphone.fm",

need to be whitelisted for podcasts.

spotify-adblock-linux Automated

Would be great if it's possible to add in the readme:

If you want it to work automatically, it's easy. First you open the .desktop file

sudo nano /usr/share/applications/spotify.desktop

You can replace nano for any editor you want.

Then you change the line

Exec=spotify %U

to

Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U

Then it should work automatically when you open it from your desktop environment.

error: sys/types.h: No such file or directory

How do I fix this. I am on Mint 20, Spotify (non-fp) from the Mint Store.

In file included from /usr/include/x86_64-linux-gnu/curl/curl.h:38,
from spotify-adblock.c:3:
/usr/include/x86_64-linux-gnu/curl/system.h:430:12: fatal error: sys/types.h: No such file or directory
430 | # include <sys/types.h>
| ^~~~~~~~~~~~~
compilation terminated.

Object cannot be preloaded

syzygianinfern0@pop-os:~/Documents/spotify-adblock-linux$ LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (invalid ELF header): ignored.

I would just really love to get this working but I end up with ads and this log 😢
How can I rectify this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.