Spotify Auto-Skipper is a simple Windows tray application that eliminates the hassle of hearing songs you've already listened to. By integrating with your Last.fm scrobble history, it intelligently skips tracks on Spotify that were played recently, letting you enjoy a fresher playlist with minimal effort.
Spotify Auto-Skipper is a lightweight Windows application designed to enhance the Spotify listening experience by automatically skipping songs that have been recently played, based on users' Last.fm scrobble history. This tool operates discreetly in the system tray, ensuring a seamless integration with users' music preferences.
Features
- Monitors the currently playing track on the Spotify account.
- Queries Last.fm to determine the last scrobble time of the current track.
- Automatically skips the track if it has been played within a user-defined number of days (default: 60 days).
- Offers a system tray icon for easy access and control.
- Maintains daily logs of all app activities for better management.
Configuration
To set up the application, a configuration file named config.ini should be created in the same folder as the executable. This file should include the following:
[LastFM]
username = YOUR_LASTFM_USERNAME
api_key = YOUR_LASTFM_API_KEY
[Spotify]
client_id = YOUR_SPOTIFY_CLIENT_ID
client_secret = YOUR_SPOTIFY_CLIENT_SECRET
refresh_token = YOUR_SPOTIFY_REFRESH_TOKEN
[Settings]
skip_window_days = 60
poll_interval_seconds = 120
The provided template file config.ini.template can be utilized as a starting point, simply by renaming it.
Configuration Options
- skip_window_days: Determines how many days of scrobble history to check.
- poll_interval_seconds: Sets the interval for checking the currently playing song.
- Note: Configuration is read only at startup; a restart is required after changes.
Running the Application
Users can run the application either as a Python script or compile it into an executable:
Option 1: Run as Python Script
python spotify_skip_recently_played_song.py
Option 2: Build as Executable
Compile the script using PyInstaller:
pyinstaller --noconsole --onefile spotify_skip_recently_played_song.py
Ensure the config.ini is adjacent to the generated executable.
System Tray Interface
The application features easy-to-use controls within the system tray with the following options:
- Open Logs: Access the log folder containing daily logs.
- Exit: Close the application gracefully.
Logging
All activity is recorded in a dedicated logs subdirectory, making tracking easy with timestamps included for each entry.
Instance Management
The app employs a Windows mutex (SpotifyAutoSkipperMutex) to prevent multiple instances from running simultaneously, thereby enhancing stability.
Technical Overview
- Utilizes the Spotify API for track detection and commands.
- Integrates with the Last.fm API for scrobble information.
- Automates token refresh using a permanent refresh token.
- Developed with libraries including
requests,pystray,Pillow,ctypes, andconfigparser.
Credits
The project is created by Vatroslav Mileusnić, with collaborative assistance in commentary and code structuring from ChatGPT 5.
No comments yet.
Sign in to be the first to comment.