I'm querying the iPhone media library using MPMediaQuery and getting a list of all the artists and albums. How do I get the iTunes ID for each artists, album or song so I can uniquely identify it? Just searching by name can be not very accurate.
Asked
Active
Viewed 2,317 times
2 Answers
0
The library https://github.com/gangverk/iTunesSearch has a getIdForArtist method.

Kevin Renskers
- 5,156
- 4
- 47
- 95
0
You need to look up MPMediaItemPropertyPersistentID in the MPMediaItem documentation, it identifies each media item uniquely.

amergin
- 3,106
- 32
- 44
-
But from what I understand it identify it just on the same device. I'm looking for a way to actually find the artist/song in iTunes (or other music services) in order to show additional info – Shahar Nechmad Jul 08 '11 at 04:21
-
I'd say you might be better off then looking at the database you want to query first and finding what they are looking for. A starting point might be... http://en.wikipedia.org/wiki/List_of_online_music_databases – amergin Jul 14 '11 at 21:19