From: Joseph Spiros Date: Fri, 5 Sep 2003 20:57:49 +0000 (+0000) Subject: Quick remote API change... everything builds and works fine, no need for X-Git-Tag: v1.0~80 X-Git-Url: http://git.ithinksw.org/MenuTunes.git/commitdiff_plain/d9ea951aa04106a979f9645cd996c9f297fef733 Quick remote API change... everything builds and works fine, no need for anyone to modify anything. --- diff --git a/ITMTRemote.h b/ITMTRemote.h index 0cb9b99..2c27199 100755 --- a/ITMTRemote.h +++ b/ITMTRemote.h @@ -220,9 +220,9 @@ typedef enum { - (int)currentSongTrack; /*! - * @method currentSongUniqueIdentifier: + * @method playerStateUniqueIdentifier: */ -- (NSString *)currentSongUniqueIdentifier; +- (NSString *)playerStateUniqueIdentifier; /*! * @method currentSongIndex diff --git a/ITMTRemote.m b/ITMTRemote.m index d5e0c62..3337e55 100755 --- a/ITMTRemote.m +++ b/ITMTRemote.m @@ -109,7 +109,7 @@ return nil; } -- (NSString *)currentSongUniqueIdentifier +- (NSString *)playerStateUniqueIdentifier { return nil; } diff --git a/MainController.m b/MainController.m index f91975f..eacfd0d 100755 --- a/MainController.m +++ b/MainController.m @@ -142,7 +142,7 @@ static MainController *sharedController; - (BOOL)songIsPlaying { - return ( ! ([[currentRemote currentSongUniqueIdentifier] isEqualToString:@"0-0"]) ); + return ( ! ([[currentRemote playerStateUniqueIdentifier] isEqualToString:@"0-0"]) ); } - (BOOL)radioIsPlaying @@ -152,7 +152,7 @@ static MainController *sharedController; - (BOOL)songChanged { - return ( ! [[currentRemote currentSongUniqueIdentifier] isEqualToString:_latestSongIdentifier] ); + return ( ! [[currentRemote playerStateUniqueIdentifier] isEqualToString:_latestSongIdentifier] ); } - (NSString *)latestSongIdentifier @@ -174,7 +174,7 @@ static MainController *sharedController; ( (! [self radioIsPlaying]) && (latestPlaylistClass == ITMTRemotePlayerRadioPlaylist) ) )*/ if ([self songChanged]) { - [self setLatestSongIdentifier:[currentRemote currentSongUniqueIdentifier]]; + [self setLatestSongIdentifier:[currentRemote playerStateUniqueIdentifier]]; latestPlaylistClass = [currentRemote currentPlaylistClass]; [menuController rebuildSubmenus]; diff --git a/OldMainController.m b/OldMainController.m index ea9bc47..87d184e 100755 --- a/OldMainController.m +++ b/OldMainController.m @@ -343,7 +343,7 @@ } //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) ) { @@ -507,7 +507,7 @@ - (void)timerUpdate { - NSString *currentIdentifier = [currentRemote currentSongUniqueIdentifier]; + NSString *currentIdentifier = [currentRemote playerStateUniqueIdentifier]; if (![lastSongIdentifier isEqualToString:currentIdentifier] || (!isPlayingRadio && ([currentRemote currentPlaylistClass] == ITMTRemotePlayerRadioPlaylist))) { // diff --git a/iTunesRemote.m b/iTunesRemote.m index 12926dc..5a64303 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -167,7 +167,7 @@ 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]]; }