Obtaining iTunes ID to an iPod player item
Asked Answered
C

1

18

I have an app that interacts with both the iPod player, and the iTunes Store Web Service Search API. Is there a way to obtain the iTunes ID for a song that I retrieve from my user's iPod library (e.g. via MPMusicPlayerController, or MPMediaItem)?

The documentation says that the MPMediaItemPropertyPersistentID is a unique identifier that persists across app launch. This however, seems like it might be a unique local id.

The only solution I can think of is to retrieve the song title and artist from MPMediaItem, then query iTunes to obtain the iTunes ID. Is the iTunes ID stored anywhere locally within the iPod library?

Thanks - I am pretty new to the media framework.

Connect answered 31/12, 2009 at 1:14 Comment(0)
B
5

The API documentation does not list a property for MPMediaItem that gives the iTunes Song ID, but it does give all of the information about a song such as the Artist and song name so, as you suggested, you could search the store for that criteria.

Branscum answered 3/2, 2011 at 21:21 Comment(2)
The problem here is the user is free to edit track name, artist name etc for his content and that would make this approach unfeasible.Anastassia
Can you give an example?Sperm

© 2022 - 2024 — McMap. All rights reserved.