Through iTunes, you can create playlist folders that are nested arbitrarily deep. When you copy those playlist folders to your iOS device, iTunes is able to detect that they're folders, and allows you to drill down to the point where you ultimately get songs. Any idea how they do that?? I've been trying to figure this out for days.
When I query for a specific persistentID of a known folder, the only things I can see about it that are different from a playlist that contains songs are:
- playlist.mediaTypes = 4359 (this is Music|Podcast|Audiobook|Movie|VideoiTunes) whereas a normal playlist will not mix audio types and video types
- value for property MPMediaPlaylistPropertyPlaylistAttributes contains 2 (MPMediaPlaylistAttributeSmart), whereas a normal playlist contains 0
- the item count will be equal to the total number of items on the device
But, that's it! I don't see any way to get at the sub-folders. Or, when interrogating a playlist or subfolder that's contained within a folder, I don't see any way to tie it to the parent.
Apple does it in iTunes, so there must be a way. Are they using some private API?