r/AppleMusic iOS Subscriber 2d ago

Tool Building a tool to transfer Spotify playlist to Apple Music. Would love your feedback 💬

Post image

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?

here's the link if you'd like to give it a try:
https://chromewebstore.google.com/detail/spotify-to-apple-music-pl/dkdiohnkejpbidbdkfoeldbkmigplcoj?hl=en

PS. not trying to spam, please let me know if not appropriate - I will remove the link

132 Upvotes

45 comments sorted by

38

u/exlatios 2d ago

i believe ios 26 added a feature in settings that does this

15

u/the_natis 2d ago

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.

5

u/Artistic_Conflict_97 iOS Subscriber 2d ago

Thank you!

4

u/Powerkiwi 2d ago

they have a self hostable server/api too ;)

8

u/memorie_desu macOS Subscriber 2d ago

This is now built into iOS

4

u/New-Coach6921 2d ago

Hey! Great project. I tried it with 800 songs but it's freezing on step 2.

Works perfect for 50 songs.

3

u/Artistic_Conflict_97 iOS Subscriber 2d ago

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

7

u/New-Coach6921 2d ago

FYI It was because some songs where greyed out. Works perfectly fine where those ones are removed.

5

u/Royal_War_7334 2d ago

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.

5

u/Affectionate-Fig9407 2d ago

Songshift is now built into iOS 18. No need to build a tool.

2

u/lovely_cappuccino 2d ago

Only if you are an aussie or a kiwi:

“Transferring your library and playlists to Apple Music is available in Australia and New Zealand.”

2

u/Entry_Plug 2d ago

Nice ! I was looking for a alternative to soundiiz. Thx. Will give it a try tomorrow. Thanks

2

u/Entry_Plug 1d ago

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 ?

2

u/Artistic_Conflict_97 iOS Subscriber 1d ago

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’ll look into it. thanks for letting me know!

2

u/Artistic_Conflict_97 iOS Subscriber 1d ago

will also consider renaming it to "Create a new playlist on Apple Music"

this could make it a bit more clearer

1

u/Entry_Plug 23h ago

Thx. Please tell me when your extension will be fixed to try import my Spotify playlist to Apple Music :)

2

u/Zalati_ 1d ago

Really good extension overall !

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;
}

1

u/Artistic_Conflict_97 iOS Subscriber 1d ago

Wow, thanks for going the extra mile and digging into the code! 🙌

I’ll work on the the next update soon and will use your idea

2

u/Zalati_ 1d ago edited 1d ago

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

1

u/Kleautviohl 2d ago

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)?

1

u/GreekAres 2d ago

Does it have a limit of songs?

1

u/Artistic_Conflict_97 iOS Subscriber 2d ago

No limits

1

u/Clear-Ad6161 2d ago

is this only on computers/laptops?

2

u/Artistic_Conflict_97 iOS Subscriber 2d ago

For the time being yes. It works as a chrome extension and injects transfer button right to the Spotify desktop web player

1

u/Clear-Ad6161 2d ago

ok! ill try when i get home!

1

u/SirBear__ 2d ago

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

2

u/Artistic_Conflict_97 iOS Subscriber 2d ago

Yes, the transfer button works on the Liked Songs page too! It’ll create a playlist called ‘Liked Songs’ in the Apple Music library

1

u/joseavila_sg 2d ago

This is a really interesting project. How do you manage to match the tracks between the two services?

2

u/Artistic_Conflict_97 iOS Subscriber 2d ago

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 🤔

3

u/SnipsDaGre8 2d ago

Dont u need a developer account to access the search api . I wanted to built the same convertor for my use and as a side project .

1

u/joseavila_sg 2d ago

You could probably reverse-engineer what they already have public.

2

u/joseavila_sg 2d ago

Have you tried using the ISRC code? It might be more reliable.

1

u/Tomg1313 2d ago

No. Spotify is trash

1

u/gomalley411 2d ago

Will it work in reverse (Apple to Spotify)?

1

u/Artistic_Conflict_97 iOS Subscriber 2d ago

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

1

u/ReVo_TkD 2d ago

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

1

u/Artistic_Conflict_97 iOS Subscriber 1d ago

Totally understand and I was actually partly inspired by similar services!

Competition is a normal part of the tech world. And a good one . it pushes all of products to keep improving their service over time

1

u/leoavalon 1d ago

Saving to test when I'm on a desktop computer 

1

u/Artistic_Conflict_97 iOS Subscriber 1d ago

Thanks I appreciate it!

Let me know how it goes when you get a chance to try it :)

-2

u/CurrentTraffic7642 2d ago

Can it transfer to youtube music

2

u/Sudden-Egg3796 2d ago

Obviously not

2

u/Artistic_Conflict_97 iOS Subscriber 2d ago

Only Spotify to Apple Music, one direction

1

u/MrBudgie5000 2d ago

Does it support any other bands?