- return [[ITAppleEventCenter sharedCenter] sendAEWithSendString:[NSString stringWithFormat:@"'----':obj { form:'prop', want:type('prop'), seld:type('pnam'), from:obj { form:'indx', want:type('cTrk'), seld:long(%lu), from:obj { form:'prop', want:type('prop'), seld:type('pPla'), from:'null'() } } }",index] eventClass:@"core" eventID:@"getd" appPSN:iTunesPSN];
+ NSString *temp1;
+ ITDebugLog(@"Getting song title at index %i.", index);
+ temp1 = [[ITAppleEventCenter sharedCenter] sendAEWithSendString:[NSString stringWithFormat:@"'----':obj { form:'prop', want:type('prop'), seld:type('pnam'), from:obj { form:'indx', want:type('cTrk'), seld:long(%lu), from:obj { form:'prop', want:type('prop'), seld:type('pPla'), from:'null'() } } }",index] eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
+ ITDebugLog(@"Getting song title at index %i done.", index);
+ return temp1;
+}
+
+- (int)currentAlbumTrackCount
+{
+ int temp1;
+ ITDebugLog(@"Getting current album track count.");
+ temp1 = [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pTrC" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
+ ITDebugLog(@"Getting current album track count done.");
+ return temp1;
+}
+
+- (int)currentSongTrack
+{
+ int temp1;
+ ITDebugLog(@"Getting current song track.");
+ temp1 = [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pTrN" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
+ ITDebugLog(@"Getting current song track done.");
+ return temp1;
+}
+
+- (NSString *)playerStateUniqueIdentifier
+{
+ NSString *temp1;
+ ITDebugLog(@"Getting current unique identifier.");
+ temp1 = [NSString stringWithFormat:@"%i-%i", [self currentPlaylistIndex], [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pDID" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]];
+ ITDebugLog(@"Getting current unique identifier done.");
+ return temp1;