Some iTunesLibrary.framework's ITLibPlaylist distinguishedKind don't work as intended.
| Originator: | pedrovcristao | ||
| Number: | rdar://19070933 | Date Originated: | 24/11/14 |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | |
| Classification: | Reproducible: | Always |
Summary:
I'm currently using iTunesLibrary.framework to fetch data from iTunes and I've stumbled upon a bug that makes a ITLibPlaylist object return an incorrect value for the distinguishedKind. For example, if you currently have a ITLibPlaylist object that is referencing your "25 most played" playlist, its distinguishedKind should be ITLibDistinguishedPlaylistKindTop25MostPlayed (=25), which isn't the case.
Steps to Reproduce:
1. Loop through all the playlists of an ITLibrary object (using allPlaylists)
2. Get the distinguishedKind of the playlists
3.
i. Notice that all your smart music playlists (like "25 most played" or "recently added") will have a value of 0 (ITLibDistinguishedPlaylistKindNone) on its distinguishedKind, but they're kind is correct, the value returned is 1 (=ITLibPlaylistKindSmart).
ii. You can also grab the distinguishedKind by using the method "valueForProperty:" and giving the constant "ITLibPlaylistPropertyDistinguisedKind" as the parameter. You'll notice that it returns null for every playlist created manually or smart playlist.
Expected Results:
The distinguishedKind of the smart libraries should returned their exact enum value. So:
"Recently Added" => ITLibDistinguishedPlaylistKindRecentlyAdded
"25 most played" => ITLibDistinguishedPlaylistKindTop25MostPlayed
And so on.
Actual Results:
They always return a value of 0 (ITLibDistinguishedPlaylistKindNone).
Version:
Xcode Version 6.1 (6A1052d)
OS X 10.1
Notes:
Currently there is no workaround. If I want to work with, let's say, the "Recently Added" playlist I have no way of doing that.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!