Skip to content

Local Music to Spotify Playlist Creator is a Python-based application designed to seamlessly transform your offline music collection into an organized Spotify playlist. By extracting metadata from local MP3 files, the application searches for the corresponding songs on Spotify and adds them to a specified playlist.

License

Notifications You must be signed in to change notification settings

xectrone/local-music-to-spotify-playlist-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local Music to Spotify Playlist Creator

Python Spotipy Mutagen License

Overview

Local Music to Spotify Playlist Creator is a Python application that allows users to convert their offline music collections into Spotify playlists. By scanning local MP3 files for metadata (title and artist), this tool searches for the corresponding songs on Spotify and adds them to a user-defined playlist.

Features

  • Extracts song title and artist information from local MP3 files.
  • Searches for songs on Spotify using the Spotify API.
  • Creates a new playlist or updates an existing playlist on Spotify.
  • User-friendly output indicating the status of each song added.

Prerequisites

To run this application, you'll need:

  • Python 3.x installed on your system.
  • A Spotify account (free or premium).
  • An application registered on the Spotify Developer Dashboard to obtain your API credentials.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/local-music-to-spotify-playlist-creator.git
    cd local-music-to-spotify-playlist-creator
  2. Set up a virtual environment (optional but recommended):

    python -m venv venv
    venv\Scripts\activate
  3. Install the required packages:

    pip install -r requirements.txt
  4. Create a .env file in the project directory and add your Spotify API credentials:

    SPOTIPY_CLIENT_ID='your_spotify_client_id'
    SPOTIPY_CLIENT_SECRET='your_spotify_client_secret'
    SPOTIPY_REDIRECT_URI='http://localhost:8888/callback'
    

Usage

  1. Place your local MP3 files in a folder (e.g., I:\New folder\Music\ENGLISH\New folder (2)).

  2. Modify the offline_folder and playlist_name variables in the script to point to your local folder and desired playlist name, respectively.

  3. Run the script:

    python local_music_to_spotify.py
  4. Follow the authentication process in your browser to allow the app to access your Spotify account.

Notes

  • The application currently supports MP3 files. You can modify the code to support other formats if desired.
  • Ensure that you have an active internet connection to search for songs on Spotify.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Spotipy - A lightweight Python library for the Spotify Web API.
  • Mutagen - A Python module to handle audio metadata.

About

Local Music to Spotify Playlist Creator is a Python-based application designed to seamlessly transform your offline music collection into an organized Spotify playlist. By extracting metadata from local MP3 files, the application searches for the corresponding songs on Spotify and adds them to a specified playlist.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages