Here is a typical iTunes playerInfo notification:
I want to compare the "Player State" 's object. But the object represented by the key "Player State" is not a string so how can I compare with say a state that represents Player Stopped ?
Something like this"
if ([information objectForKey"Player State"] isEqualToString @"Stopped"]) {
NSLog(@"Stopped!");
}
but [information objectForKey"Player State"] is not a string so I know it won't work.
Thanks.
Code:
2011-02-25 08:42:26.583 Demo[472:a0f] {
Album = "Doo-Wops & Hooligans (Deluxe Version)";
"Album Artist" = "Bruno Mars";
"Album Rating" = 0;
"Album Rating Computed" = 1;
Artist = "Bruno Mars";
"Artwork Count" = 1;
"Disc Count" = 1;
"Disc Number" = 1;
Genre = Pop;
"Library PersistentID" = 1734896675364731040;
Location = ****
Name = "Just the Way You Are (feat. Lupe Fiasco) [Remix] {Bonus Track}";
PersistentID = 7070657166844949486;
"Play Count" = 0;
"Play Date" = "1904-01-01 00:00:00 -0500";
"Player State" = Playing;
"Playlist PersistentID" = "-7222080182103823525";
"Rating Computed" = 1;
"Skip Count" = 0;
"Skip Date" = "1904-01-01 00:00:00 -0500";
"Store URL" = "itms://itunes.com/link?n=Just%20the%20Way%20You%20Are%20(feat.%20Lupe%20Fiasco)%20%5BRemix%5D%20%7BBonus%20Track%7D&an=Bruno%20Mars&pn=Doo-Wops%20%26%20Hooligans%20(Deluxe%20Version)";
"Total Time" = 238524;
"Track Count" = 12;
"Track Number" = 11;
Year = 2010;
}
Something like this"
if ([information objectForKey"Player State"] isEqualToString @"Stopped"]) {
NSLog(@"Stopped!");
}
but [information objectForKey"Player State"] is not a string so I know it won't work.
Thanks.