Skip to content

Ezzud/spotsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpotiSync

A Bun/Node.js service that keeps a Spotify playlist and a YouTube Music playlist in sync.

Setup

Youtube Credentials

Get your Youtube Playlist ID

  1. Go to your playlist
  2. Check the url on your browser (Should look like this: https://music.youtube.com/playlist?list=AAAAAAAAAAAAAAAAAAAAAAAA )
  3. Copy the content after https://music.youtube.com/playlist?list=
  4. Replace YOUR_YOUTUBE_PLAYLIST_ID by the content you copied in your config.json
    "youtube": {
        "clientId": "",
        "clientSecret": "",
        "refreshToken": "",
        "redirectUri": "https://auth.ezzud.fr/callback",
        "playlistId": "YOUR_YOUTUBE_PLAYLIST_ID"
    },

Get your Spotify Playlist ID

  1. Go to spotify
  2. Click on the "Share" button on your playlist
  3. Copy the link (Should look like this: https://open.spotify.com/playlist/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)
  4. Copy the content after https://open.spotify.com/playlist/
  5. Replace YOUR_SPOTIFY_PLAYLIST_ID by the content you copied in your config.json
    "spotify": {
        "clientId": "",
        "clientSecret": "",
        "refreshToken": "",
        "redirectUri": "https://auth.ezzud.fr/callback",
        "playlistId": "YOUR_SPOTIFY_PLAYLIST_ID"
    },

Get your Youtube Client ID and Client Secret

  1. Go to Google Cloud Console (https://console.cloud.google.com/)
  2. Create a new project
  3. Install Youtube Data API v3 on your project (API and services)
  4. Go to Credentials
  5. Click on "+ Create Credentials" for Oauth Client ID
  6. Select the following options:
  • Application type: Web Application
  • Authorized redirect URIs: https://auth.ezzud.fr/callback
  1. Create your ID and copy the following informations into config.json
    "youtube": {
        "clientId": "YOUR_CLIENT_ID",
        "clientSecret": "YOUR_CLIENT_SECRET",
        "refreshToken": "",
        "redirectUri": "https://auth.ezzud.fr/callback",
        "playlistId": ""
    },
  1. Go to "Audience" https://console.cloud.google.com/auth/audience
  2. On "Test users", add the email of the youtube account owning your playlist

Get your Spotify Client ID and Secret

  1. Go to https://developer.spotify.com/
  2. Create a new App
  3. Add Redirect URI: https://auth.ezzud.fr/callback
  4. Check "Web API"
  5. Create your App
  6. Copy Client ID and Secret and paste them into config.json
    "spotify": {
        "clientId": "YOUR_CLIENT_ID",
        "clientSecret": "YOUR_CLIENT_SECRET",
        "refreshToken": "",
        "redirectUri": "https://auth.ezzud.fr/callback",
        "playlistId": ""
    },

Run the app

Requirements: https://bun.com

  1. On your cmd, paste
pnpm start
  1. You will receive multiple links to open in the console ℹ️ FOLLOW INSTRUCTIONS IN THE CONSOLE
  2. Open each link and allow access as requested
  3. Copy the url you got redirected to after allowing access
  4. Paste it into the console and press enter
  5. Now everything will be synchronised automatically

About

Synchronize your youtube music playlist with your spotify playlist

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors