SecUpwN / Spotify-AdKiller

Your Party with Spotify - without ads!
https://github.com/SecUpwN/Spotify-AdKiller
GNU General Public License v3.0
845 stars 84 forks source link

Spotify-AdKiller (for LINUX)

Your Party with Spotify - without ads!

Spotify-AdKiller

We all love Spotify, but sometimes people (like us) want to throw a party without having to listen to interrupting ads before having bought Spotify Premium. Well, with this killer project, now you can!

This is for testing purposes ONLY! Spotify is a fantastic service and worth every penny. This script is NOT meant to circumvent buying premium! Please do consider switching to premium to support Spotify - especially if you're going to use it on mobile. If the script does not work for you, help us improve it!

Dependencies

Utilities used in the script:

New dependencies are highlighted in bold. Please make sure to install these before upgrading the script.

You will also need to have one of the following audio/media players installed:

Please consult the Settings section below for information on setting a custom audio player.

openSUSE

Install all utilities + VLC on openSUSE with:

sudo zypper in binutils pulseaudio-utils libnotify-tools xdotool vlc

Ubuntu

Install all utilities + VLC on Ubuntu with:

sudo apt-get install x11-utils pulseaudio-utils libnotify-bin xdotool vlc

Arch Linux

There is an AUR Package for Arch Linux. To install:

git clone https://aur.archlinux.org/spotify-adkiller-git.git
cd spotify-adkiller-git
makepkg -si

Installation

Automated Installation

Grab the latest release of Spotify-AdKiller:

git clone https://github.com/SecUpwN/Spotify-AdKiller.git

Run the provided installer:

cd Spotify-AdKiller
./install.sh

Troubleshooting

Manual Installation

  1. Copy spotify-adkiller.sh and spotify-wrapper.sh to your PATH (e.g. $HOME/bin or /usr/local/bin on openSUSE and Ubuntu) and make both of them executable with chmod +x spotify-adkiller.sh and chmod +x spotify-wrapper.sh.

  2. Copy Spotify (AdKiller).desktop to $HOME/.local/share/applications or any other folder your distro reads .desktop launchers from (e.g. /usr/share/applications, /usr/local/share/applications).

The default configuration file will be written automatically on the first startup of the script.

Usage

If you installed Spotify-AdKiller correctly, a new entry called Spotify (AdKiller) should appear in your menu. This launcher will start Spotify in ad-free mode. The script will terminate automatically as soon as Spotify exits. As mentioned before, this is for testing purposes ONLY so use this new entry only when your purposes are testing.

Important note: Please make sure you don't have notifications disabled in your Spotify configuration (ui.track_notifications_enabled=true in ~/.config/spotify/User/<your username>/prefs).

Settings

The configuration file for Spotify-AdKiller is located under $HOME/.config/Spotify-AdKiller/Spotify-AdKiller.cfg. There are several settings that control how Spotify-AdKiller operates:

Modes

CUSTOM_MODE controls the ad blocking mode. The following modes are available:

The default ad blocking mode is continuous.

Spotify-AdKiller will always fall back to simple mode if no local tracks are found and/or if no supported music player is available on the system.

Local Playback

The following settings control local music playback during ads:

Debug Setting

You can make the CLI output more verbose and enable the log file by setting DEBUG to 1. The log will be written to $HOME/.Spotify-AdKiller.log and replaced each time Spotify-AdKiller runs.

Important Notes

Please make sure to always use the provided launcher when running Spotify. Under some circumstances Spotify might remain muted when exiting the application. This is a technical limitation with PulseAudio. Spotify-AdKiller automatically unmutes Spotify when initially run.

If, for some reason, Spotify does remain muted you can use the following command to unmute it manually while it's running:

for i in $(LC_ALL=C pactl list | grep -E '(^Sink Input)|(media.name = \"Spotify\"$)' | cut -d \# -f2 | grep -v Spotify); do pactl set-sink-input-mute "$i" no; done

Similar Projects

License

Many people have contributed to make our script become what it is today (huge shout-out to the initial creator pcworld). If you are like us and think that it is very sad when projects die, please accept that all code here is fully licensed under GPL v3+. Have a look at the full License. Contribute pull requests!

This product is not endorsed, certified or otherwise approved in any way by Spotify. Spotify is the registered trade mark of the Spotify Group. Use your brainz prior to formatting your HDD.