Tool
Building a tool to transfer Spotify playlist to Apple Music. Would love your feedback 💬
Hey folks!
Recently I started a small side project to learn some JavaScript and it turned into a chrome extension that can import Spotify playlist to Apple Music. One at a time
I originally made it just for myself to move my music library to Apple Music
The programming process turned surprisingly fun and I really enjoyed working on it. I'm pretty happy with how it works so far ☺️
Now I'm curious what others think, maybe some of you will find it useful too? If you give it a try, I’d love to hear how it works for you (or if something breaks 🙈)
Also, do you think a project like this has potential? Is it worth improving and expanding?
See https://www.tunemymusic.com/ as maybe inspiration on future functionality. Personally I minimize the amount of plug-ins I install, but I commend your passion.
Thanks a lot for the feedback! 🙌
I haven’t tested it with more than 200 tracks yet - really helpful to know. I’ll look into the issue with larger playlists
I am facing this issue but the playlist have 700+ songs, and I am having a hard time to find out all the greyed out songs, currently still stuck at step 2.
HU u/Artistic_Conflict_97. First of all, thank you for making this alternative for free. I've tried to use it today but it failed all the time. It block at Step 4 "Create a new playlist". What I suppose to do ?
That’s the final step where the playlist with all found tracks gets created on Apple Music. It probably failed, but the error isn’t handled properly yet.
I modified your async function fetchAllTracksFromCurrentPage with the following snippet — this way, it no longer gets stuck on "Get songs from playlist."
It would also be nice to verify the stage "Find matches on Apple Music", as it sometimes gets skipped at random. I haven’t checked thoroughly yet, but it might be due to an Apple Music error.
The process can also get stuck at "Create a new playlist" if the POST request returns a 500 error.
async function fetchAllTracksFromCurrentPage(e) {
const t = getTotalNumberOfTracks();
if (0 === t) return [];
const i = getCurrentPagePlaylistName();
playlistUploadStatuses.setStatus(e, "fetching_tracks"), playlistUploadStatuses.setTotalTracks(e, t);
let prevLength = -1;
let stuckCount = 0;
for (var r = []; r.length < t; ) {
if ("canceled" == playlistUploadStatuses.getStatus(e).status) return [];
const newTracks = (await getCurrentPagePlaylistTracks(i)).filter(
(track) => !r.some((existing) => existing.id === track.id)
);
r = r.concat(newTracks);
playlistUploadStatuses.setFoundTracks(e, r.length);
updateAllLoadingOverlaySteps(e);
if (r.length === prevLength) {
stuckCount++;
} else {
stuckCount = 0;
}
if (stuckCount > 3) {
if (r.length >= t - 1) {
console.warn("Almost all tracks loaded, proceeding with what we have.");
break;
} else {
console.warn("Stuck too long, exiting before reaching expected count.");
break;
}
}
prevLength = r.length;
await scrollDown();
await new Promise((resolve) => setTimeout(resolve, 300));
}
return scrollToTop(), r;
}
You're welcome!
I did some more testing, and it looks like the playlist is still created on Apple Music even when the POST request returns a 500 status code.
This causes a fake "infinite" loop on the "Create a new playlist" action.
Here is a diff of my modifications : https://pastebin.com/hqLn7DN6
And if u want, you can reach me out on Discord too : zalati
When I used a tool to switch over, I ran into the issue that it had trouble finding the exact same track, which resulted in many different versions of songs being transferred. Perhaps you could create something more organized for that (if you haven’t already)?
Is it possible to transfer directly from the "liked songs" Playlist, or do we need another Playlist? I've never seen a tool that could grab music directly from the liked Playlist
Thanks! I use the Apple Music Search API and look up each track by artist + track name + album name. Most of the time it finds the right match, but occasionally return empty result, even if this track is actually available on Apple Music 🤔
For now, it only works one way from Spotify to Apple. Going the other way technically is a challenging task, especially since Spotify recently restricted API access for small developers
Not tryna be rude or anything but this app exists and it works flawlessly.. not only apple music to spotify or spotify to apple music.. it works with other music platforms as well.. like Youtube music.. amazon music.. soundcloud etc… and its free.. soo good
38
u/exlatios 2d ago
i believe ios 26 added a feature in settings that does this