Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

eldossjogy/spotify2deezer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project logo

Spotify2Deezer

About

Python scripts to convert and sync Spotify Playlist to Deezer Playlist using their respective APIs, and a discord bot implementing them. Deezer playlist is limited to 2000 songs, the bot does not convert or sync playlist over due to this. It is understood that the search method and sync method are in no way the best, and was only created for adequate functionality.

🔗Invite Discord Bot

Built Using

Try it yourself!

To set up, download the files and then install the packages in requirement.txt.
Afterwards, create a .env file in the directory for the CLI or Discord Bot, and complete the env with information for one of the two:

CLI:

APP_ID = "deezer_app_id"
SECRET = "deezer_secret_id"
REDIRECT_URL = "deezer_redirect_url"
SPOTIPY_CLIENT_ID = "spotify_client_id"
SPOTIPY_CLIENT_SECRET = "spotify_client_secret"
SPOTIPY_REDIRECT_URI = "spotify_redirect_url"

Discord Bot:

TOKEN = "discord_token"
KEY = "key_fernet"
DATABASE_URL= "postgres_url"
APP_ID = "deezer_app_id"
SECRET = "deezer_secret_id"
REDIRECT_URL = "deezer_redirect_url"
SPOTIPY_CLIENT_ID = "spotify_client_id"
SPOTIPY_CLIENT_SECRET = "spotify_client_secret"
SPOTIPY_REDIRECT_URI = "spotify_redirect_url"

Database:

To create the user database, use the following commands:

CREATE TABLE userInfo (
   userid VARCHAR ( 50 ) UNIQUE NOT NULL,
   token VARCHAR ( 255 ) UNIQUE,
   sync TEXT[][]);
ALTER TABLE userinfo ALTER COLUMN sync SET DEFAULT '{}';

Fernet Key:

To create the fernet key, use the following commands:

from cryptography.fernet import Fernet
key = Fernet.generate_key()
key_str = key.decode('utf-8')
print(key_str)

Run the bot:

pip install py-cord==2.0.0b1; pip install -r requirements.txt; python main.py

Get Deezer API Info by creating app on Deezer for developers
Get Spotify API Info by creating app on Spotify for developers

Finally, run the main.py file.

About

Python scripts and Discord bot that allows user to convert Spotify playlists to Deezer Playlists and sync them.

Resources

Stars

Watchers

Forks

Contributors

Languages