anyone to modify anything.
- (int)currentSongTrack;
/*!
- * @method currentSongUniqueIdentifier:
+ * @method playerStateUniqueIdentifier:
*/
-- (NSString *)currentSongUniqueIdentifier;
+- (NSString *)playerStateUniqueIdentifier;
/*!
* @method currentSongIndex
return nil;
}
-- (NSString *)currentSongUniqueIdentifier
+- (NSString *)playerStateUniqueIdentifier
{
return nil;
}
- (BOOL)songIsPlaying
{
- return ( ! ([[currentRemote currentSongUniqueIdentifier] isEqualToString:@"0-0"]) );
+ return ( ! ([[currentRemote playerStateUniqueIdentifier] isEqualToString:@"0-0"]) );
}
- (BOOL)radioIsPlaying
- (BOOL)songChanged
{
- return ( ! [[currentRemote currentSongUniqueIdentifier] isEqualToString:_latestSongIdentifier] );
+ return ( ! [[currentRemote playerStateUniqueIdentifier] isEqualToString:_latestSongIdentifier] );
}
- (NSString *)latestSongIdentifier
( (! [self radioIsPlaying]) && (latestPlaylistClass == ITMTRemotePlayerRadioPlaylist) ) )*/
if ([self songChanged]) {
- [self setLatestSongIdentifier:[currentRemote currentSongUniqueIdentifier]];
+ [self setLatestSongIdentifier:[currentRemote playerStateUniqueIdentifier]];
latestPlaylistClass = [currentRemote currentPlaylistClass];
[menuController rebuildSubmenus];
}
//Set the new unique song identifier
- lastSongIdentifier = [[currentRemote currentSongUniqueIdentifier] retain];
+ lastSongIdentifier = [[currentRemote playerStateUniqueIdentifier] retain];
//If we're in a playlist or radio mode
if ( ![lastSongIdentifier isEqualToString:@"0-0"] && (trackInfoIndex > -1) ) {
- (void)timerUpdate
{
- NSString *currentIdentifier = [currentRemote currentSongUniqueIdentifier];
+ NSString *currentIdentifier = [currentRemote playerStateUniqueIdentifier];
if (![lastSongIdentifier isEqualToString:currentIdentifier] ||
(!isPlayingRadio && ([currentRemote currentPlaylistClass] == ITMTRemotePlayerRadioPlaylist))) {
//
return [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pTrN" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
}
-- (NSString *)currentSongUniqueIdentifier
+- (NSString *)playerStateUniqueIdentifier
{
return [NSString stringWithFormat:@"%i-%i", [self currentPlaylistIndex], [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pDID" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]];
}