X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/7f6104672f5d8a1ca5eb046ef7f5bac51a9acd80..f4138fee3ff009b89aba308c5736357d2245118b:/iTunesRemote.m?ds=sidebyside diff --git a/iTunesRemote.m b/iTunesRemote.m index d501091..a312eba 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 @@ -352,7 +354,6 @@ sendAEWithRequestedKeyForNumber:@"pPos" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]; finalString = [self formatTimeInSeconds:final]; - if ( [self currentPlaylistClass] == ITMTRemotePlayerRadioPlaylist ) { finalString = nil; } ITDebugLog(@"Getting current song elapsed time done."); return finalString; }