2

Can the iCloud download status be accessed programmatically from the MPMediaLibrary - MPMediaItemProperty or other source?

We want to detect the source of a song so we know if it is from Apple Music (DRM), matched using iTunes Match (not DRM), purchased, or simply uploaded from a ripped CD etc.

The document About iCloud Music Library icons and status describes the download icon and status for files in the Media Library, and see them in iTunes on the Mac, but can't find a way to get this status information within the app.

Jim Leask
  • 6,159
  • 5
  • 21
  • 31
  • It looks like this may be accessible from the iTunes Music Library.xml. Find `Playlists`, and below that will be assigned IDs for each track. Then find `NameDownloaded`. Below that there are the IDs of each downloaded track. – HaveSpacesuit Nov 27 '17 at 16:15
  • Have you ever found a solution for this? My search turned nothing. I'm considering opening an API request to get this info. – Andy Ibanez Feb 19 '18 at 16:44
  • No, we haven't found how to do this yet. – Jim Leask Feb 26 '18 at 22:54
  • If you just want to check if the song is DRM-protected or not, you can use the MPMediaItem's hasProtectedAsset property. – Taiwosam May 28 '19 at 20:55

1 Answers1

2

You can use MPMediaItem properties - isCloudItem to check download status and hasProtectedAsset to check DRM protection.

See MPMediaItem docs

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 26 '21 at 01:19