X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/955343cfbfebf6b68b127629d9b6a76f80ba023a..8f4789164f5c41e2cc4cd23c12b830fc71aa51d4:/iTunesRemote.m?ds=sidebyside 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