Skip spotify ads by automatically restarting application when ad comes

Overview

SpotiByeAds

made-with-python GitHub license Documentation Status GitHub stars GitHub stars

No one likes interruptions! Don't you hate it when you're listening to your favorite jazz track or your EDM playlist and an ad for Old Spice or Pepsi starting playing interrupting your mood? With SpotiByeAds, you can listen ad-free allowing you to concentrating less on those ads and more towards the task at hand!

How it works?

SpotiByeAds or SBA for short utilizes Python with the SpotiPy API and Pynput Libraries as well as the os and sys modules in order to provide you with an ad-free experience.

First, it asks you for your Spotify Username, Client ID and Client Secret (which is done by running python main.py). Of course if you've used this program and have saved the credentials, it should load a json file with your credentials in it and if not, it will ask for your credentials. Note that whenever you enter your credentials, you have the option of either saving your credentials for future use or keeping your credentials just for that session of using SBA.

After SBA has your credentials, it will establish a connection with Spotify by restarting it and setting it to your last known track/playlist. When an ad enters your spotify queue, SBA will detect the current track as an ad and restart the app. After the restart, SBA will automatically queue up the next track!

Requirements

  • Python 3
  • Pip (Python's Package Manager)

Installation

It should be noted that this is a quick way to get SBA (SpotiByeAds) up and running!

For a detailed documentation, go here.

  • First, clone the repository.
git clone https://github.com/daspartho/SpotiByeAds.git 
  • Then, change your current directory into the SpotiByeAds repository.
cd SpotiByeAds
  • Finally, install the requirements in the requirements file.
pip install -r requirements.txt
  • From here, SpotiByeAds is installed. Continue to the Setting Up section in order to connect SpotiByeAds to Spotify itself.

Setting up

You should need to do these only the first time.

  1. Go to https://developer.spotify.com/dashboard and sign in with your Spotify account.
  2. Click on the 'CREATE AN APP' option and provide an app name and app description as you'd like.
  3. Go to 'EDIT SETTINGS' and fill in the Redirect URIs placeholder with http://localhost:8080/, and click on Save.
  4. Copy the Client ID and Client Secret and paste it in when you start the script later on.
    • ⚠️ Please remember to never share your Client Secret with anyone. This could lead to your account getting stolen or irregular Spotify user behavior that could lead to account termination.
    • Developers of SpotiByeAds will never ask for your Client Secret.

⚠️ ⚠️ ⚠️

If you are on Linux and installed a containerized version of Spotify (e.g via Snap or Flatpack) or any unofficial forms of distribution, please paste the path to the Spotify executable on your computer (or a command that starts up the Spotify app) in the main.py script on the line described below:

    PATH = (shutil.which("spotify")  # For any system with spotify on $PATH
            or ("{HOMEDRIVE}{HOMEPATH}\AppData\Roaming\Spotify\Spotify.exe"
                .format_map(os.environ) if os.name == "nt"  # Windows
                else "/Applications/Spotify.app" if sys.platform == "darwin"  # MacOS
                else ""  # Custom path if installation is different
               )
           )

Please find this part of the script and paste the path/command within the "" (empty quotes) on the line with the comment # Custom path ....

This is also applicable on any other OS, if the Spotify installation path is different from the usual (and is not included in the $PATH environment variable).

⚠️ ⚠️ ⚠️

Usage

  1. Open Spotify and start your favourite track.
  2. Run the script from a terminal using python main.py in the local repository's directory (or probably by double-cliking on the main python script from your file explorer on Windows).
    • If it's the first time running the script, enter your Spotify username and paste in the Client ID and Client Secret when prompted to enter them.
  3. Congratulations! You can now listen to Spotify with no ads and the peace of mind you deserve 😁 .

Pausing playback, Skipping tracks, Changing playlists.

Due to the way the script works, pausing and playing or manually changing tracks disrupts it's work, such that the next ad that comes up might not be skipped. Not, to worry, the script has a way around this...

When you want to perform any of these actions:

  1. Go to the terminal where in the script is running.
  2. Press Ctr-C i.e hold down the Ctrl key and tap the C key.
  3. Follow the prompts to perform your desired action.

⚠️ Note: If you're using Command Prompt on windows, please note that it might have some unwanted behaviour with keyboard input that affects this feature. You are strongly adviced to run the script in Windows Powershell.

Contributing

If you want to contribute code, just write a quick pull request and the developers will take a look at it. If you want to suggest an idea, just write an issue and the developers will check it out!

Building

MacOS / Linux

If you'd like to build for Mac / Linux, do the following:

  1. To build in a development environment (to make sure it works right), run python setup.py py2app -A. Please note: This builds the app in something called alias mode. This is NOT a proper build, and will only work on the machine it was run on.
  2. To build a proper package, run python setup.py py2app.

Any major platform

You'll need Python 3 with the PyInstaller package installed. The run the following command in a terminal from the project directory.

pyinstaller --onefile --collect-submodules pynput -c -n SpotiByeAds main.py

If succesful, then check for the executable file in the dist/ directory created.

Owner
Partho
Partho
Create standalone, installable R Shiny apps using Electron

Create standalone, installable R Shiny apps using Electron

Chase Clark 5 Dec 24, 2021
Cylc: a workflow engine for cycling systems

Cylc: a workflow engine for cycling systems. Repository master branch: core meta-scheduler component of cylc-8 (in development); Repository 7.8.x branch: full cylc-7 system.

The Cylc Workflow Engine 205 Dec 20, 2022
Junos PyEZ is a Python library to remotely manage/automate Junos devices.

The repo is under active development. If you take a clone, you are getting the latest, and perhaps not entirely stable code. DOCUMENTATION Official Do

Juniper Networks 623 Dec 10, 2022
Easy way to build a SaaS application using Python and Dash

EasySaaS This project will be attempt to make a great starting point for your next big business as easy and efficent as possible. This project will cr

xianhu 3 Nov 17, 2022
A collection of existing KGQA datasets in the form of the huggingface datasets library, aiming to provide an easy-to-use access to them.

KGQA Datasets Brief Introduction This repository is a collection of existing KGQA datasets in the form of the huggingface datasets library, aiming to

Semantic Systems research group 21 Jan 06, 2023
A reproduction repo for a Scheduling bug in AirFlow 2.2.3

A reproduction repo for a Scheduling bug in AirFlow 2.2.3

Ilya Strelnikov 1 Feb 09, 2022
This collection is to provide an easier way to interact with Juniper

Ansible Collection - cremsburg.apstra Overview The goal of this collection is to provide an easier way to interact with Juniper's Apstra solution. Whi

Calvin Remsburg 1 Jan 18, 2022
dotfiles - Cristian Valero Abundio

In this repository you can find various configurations to configure your Linux operating system, preferably ArchLinux and its derivatives.

Cristian Valero Abundio 1 Jan 09, 2022
The fastest way to copy to (not from) high speed flash storage.

FastestCopy The fastest way to copy to (not from) high speed flash storage. This is about 3-6x faster than file copy on explorer.exe to usb flash driv

Derek Frombach 0 Nov 03, 2021
YBlade - Import QBlade blades into Fusion 360

YBlade - Import QBlade blades into Fusion 360 Simple script for Fusion 360 that takes QBlade blade description and constructs the blade: Usage First,

Jan Mrázek 37 Sep 25, 2022
LINUX-AOS (Automatic Optimization System)

LINUX-AOS (Automatic Optimization System)

1 Jul 12, 2022
Stock Monitoring

Stock Monitoring Description It is a stock monitoring script. This repository is still under developing. Getting Started Prerequisites & Installing pi

Sission 1 Feb 03, 2022
🛠️ Plugin to integrate Chuy with Poetry

Archived This is bundled with Chuy since v1.3.0. Poetry Chuy Plugin This plugin integrates Chuy with Poetry. Note: This only works in Poetry 1.2.0 or

Eliaz Bobadilla 4 Sep 24, 2021
Python project setup, updater, and launcher

pyLaunch Python project setup, updater, and launcher Purpose: Increase project productivity and provide features easily. Once installed as a git submo

DAAV, LLC 1 Jan 07, 2022
Zotero references script (and app)

A little script (and PyInstaller build) for a very specific, somewhat hack-ish purpose: managing and exporting project references with Zotero and its API.

Marius Rödder 0 Dec 05, 2021
Liquid Rocket Engine Cooling Simulation

Liquid Rocket Engine Cooling Simulation NASA CEA The implemented class calls NASA CEA via RocketCEA. INSTALL GUIDE In progress install instructions fo

John Salib 1 Jan 30, 2022
A python package to adjust the bias of probabilistic forecasts/hindcasts using "Mean and Variance Adjustment" method.

Documentation A python package to adjust the bias of probabilistic forecasts/hindcasts using "Mean and Variance Adjustment" method. Read documentation

1 Feb 02, 2022
Group P-11's submission for the University of Waterloo's 2021 Engineering Competition (Programming section).

P-11-WEC2021 Group P-11's submission for the University of Waterloo's 2021 Engineering Competition (Programming section). Part I Compute typing time f

TRISTAN PARRY 1 May 14, 2022
This program is meant to take the pain out of generating nice bash PS1 prompts.

TOC PS1 Installation / Quickstart License Other Docs Examples PS1 Command Help PS1 ↑ This program is meant to take the pain out of generating nice bas

Steven Hollingsworth 6 Jun 19, 2022
A simple python script that print the Mandelbrot set for every power of the formal formula.

Python Mandelbrot A simple python script that print the Mandelbrot set for every power of the formal formula.

Paride Giunta 2 Apr 15, 2022