Skip to content

Copying your playslists between Youtube and Spotify

Notifications You must be signed in to change notification settings

DarthPiotr/Youtify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 

Repository files navigation

Youtify

Copying your playslists between Youtube and Spotify

Easy to use

// Init Secrets
YoutifyConfig.YouTubeApiKey   = "Your YouTube API Key";
YoutifyConfig.SpotifyClientId = "Your Spotify Client Id";

// Init services and treat like generic ones
ServiceHandler spotify = new SpotifyHandler();
ServiceHandler youtube = new YouTubeHandler();

// Import and convert playlist
Playlist sourcePlaylist = youtube.ImportPlaylist("PLi9drqWffJ9FWBo7ZVOiaVy0UQQEm4IbP");
ConvertResult convertionResult = Algorithm.Convert(sourcePlaylist.Songs, spotify);

// Prepare new playlist
Playlist newPlaylist = spotify.NewPlaylist(sourcePlaylist); // Get new playlist and copy metadata
newPlaylist.Songs = convertionResult.GetSongs();            // Add songs that were sucessfully converted

// Export playlist
spotify.CreatePlaylist(ref newPlaylist);                    // Create new playlist
spotify.ExportPlaylist(newPlaylist, ExportType.AddAll);     // Export tracks

About

Copying your playslists between Youtube and Spotify

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages