views:

40

answers:

1

Hi,

I am building an iPhone app for music album released on iTunes, client requested that if user purchased the album, the app should allow to play these songs in the app while playing games. I need to find a way how to quicly check if the song is available in the iPod library. I've heard that every song from iTunes has some unique ID but I have no idea how to use it. Searching for the name of the song is not an option in library like mine cause I have over 20 gigs of music ...

Thanks,

Ondrej

+1  A: 

You have 20 gigs of music data, not names. Searching for a unique ID involves the same number of searches as for a name, you have the same number of tracks. What happens if the user bought the CD and ripped it into the iPod?

Woody
I thought there will be some kind of indexing in the db, like in any database syste it would be much faster to search for an id than for a full track name ... :( ... And client doesn't worry about the actual cd as they are prtomoting iTunes sales ...
Ondrej
Its a database access on a built in indexed sqlite database, covering what is in effect a very small dataset of less than 10,000 items, so I doubt it would be much different, and certainly not the sort of difference that a user would notice.I can't see anywhere you can search by the ID though, just the query to MPMediaQuery with one of the 'standard' attributes, track/album/group/artist etc.
Woody