Can we remove tracks from a user's Library Playlist yet?

Hi there,

I just watched the WWDC22 vids on MusicKit enhancements.

In the Explore More Content with MusicKit video, there is a brief mention of "edit playlists" at 24:33.

I asked about this a couple years ago here in this forum.

The ever-helpful @JoeKun suggested that I submit a Feedback Assistant ticket on the need/justification for this feature, which I did some time ago: FB9798928. Sadly, there's been no traction on that.

I'm super hopeful that the ability to remove tracks from a library playlist is now, or at least will soon be, possible; however, I can't find anything in the docs yet to support this notion.

Am I being overly optimistic, or are we finally going to get this much requested feature?

Thanks.

Answered by Engineer in 716604022

Hello Kimfucious,

Thank you for your question! You are not being overly optimistic! Editing playlists does support removing tracks from a playlist. In the items parameter, just pass the items of the playlist without the item you want deleted. That being said, you cannot remove items from any playlist, but only playlists users have created in your specific app. By the way, this functionality is currently only available on Apple platforms.

-David

Feel free to dupe the new FB I submitted asking for this functionality to be added to the new MusicLibrary class: FB10042390

Accepted Answer

Hello Kimfucious,

Thank you for your question! You are not being overly optimistic! Editing playlists does support removing tracks from a playlist. In the items parameter, just pass the items of the playlist without the item you want deleted. That being said, you cannot remove items from any playlist, but only playlists users have created in your specific app. By the way, this functionality is currently only available on Apple platforms.

-David

@david-apple Awesome!

Does this mean that only playlists created with the new [createPlaylist](@david-apple Awesome!) function are editable, or can playlists created via the Apple Music API also be edited?

Thanks,

Kim

Hi Kim,

Yes, this means you can edit playlists that's been made using the create playlist function. You cannot edit playlists created via Apple Music API, though you can still add to them given that they are not restricted to non-editable.

-David 

@david-apple This is great!

I'm so happy that this feature is now available... it's been a long time coming.

It appears that I need to target iOS16, which means I gotta update my test device, which is an iPod touch generation 7.

I look forward to getting into this soon.

I'm not so optimistic. It's shame that Apple introduces new APIs that target only iOS16 and MacOS Monterey (Musickit) and there is literally no way to add support for older systems without tricks. I hope edit playlist will go to API as well, I reported that through Feedback Assistant let's see what engineers do with this.

I also just submitted a feedback to Apple asking to bring this feature also to Apple Music web APIs (FB13543760).

Can we remove tracks from a user's Library Playlist yet?
 
 
Q