From: Joseph Spiros Date: Thu, 2 Oct 2003 00:18:26 +0000 (+0000) Subject: Adding "Continuous" track length support for streams. X-Git-Tag: v1.0~11 X-Git-Url: http://git.ithinksw.org/MenuTunes.git/commitdiff_plain/8f4789164f5c41e2cc4cd23c12b830fc71aa51d4?ds=inline Adding "Continuous" track length support for streams. --- diff --git a/iTunesRemote.m b/iTunesRemote.m index d501091..1ff763c 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -309,12 +309,14 @@ - (NSString *)currentSongLength { - NSString *temp1; + int temp1; + NSString *temp2; ITDebugLog(@"Getting current song length."); - temp1 = [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKey:@"pTim" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]; - if ( [self currentPlaylistClass] == ITMTRemotePlayerRadioPlaylist ) { temp1 = nil; } + temp1 = [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pcls" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]; + temp2 = [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKey:@"pTim" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]; + if ( ([self currentPlaylistClass] == ITMTRemotePlayerRadioPlaylist) || (temp1 == 'cURT') ) { temp2 = @"Continuous"; } ITDebugLog(@"Getting current song length done."); - return temp1; + return temp2; } - (NSString *)currentSongRemaining