Question

I'm using the scripting bride to have my mac app connect into iTunes. I try to set the shuffle property, but it won't change.

iTunesApplication *itunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.itunes"];
itunes.currentPlaylist.shuffle = YES;
NSLog([NSString stringWithFormat:@"%hhd", itunes.currentPlaylist.shuffle]);

The NSLog will always print 0, even if I change the shuffle mode manually in iTunes. I have the same issue with setting the repeat mode

itunes.currentPlaylist.songRepeat = iTunesERptAll; // Has no effect

On the other hand, I can change the volume without a problem

itunes.soundVolume += 20;

What's going on here? Could it be that I have to go through the currentPlaylist property?

EDIT: I've updated my iTunes.h file with

sdef /Applications/iTunes.app | sdp -fh --basename iTunes

and still no luck.

Était-ce utile?

La solution

After researching a bit, I learned I'm not the only person with this issue. It's a bug in iTunes. I've also filed a bug report and would encourage you to do the same!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top