X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/a9675e29f56fa57c2235b051669ea435bf8d0980..855ab31dc6f063368085f5f31c70882ef7370b66:/iTunesRemote.m diff --git a/iTunesRemote.m b/iTunesRemote.m index d11a29a..d0c2366 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -170,7 +170,7 @@ unsigned long class; if (sourceName) { NSMutableArray *aSource = [[NSMutableArray alloc] init]; - [aSource addObject:[[sourceName copy] autorelease]]; + [aSource addObject:sourceName]; switch (fourcc) { case 'kTun': class = ITMTRemoteRadioSource; @@ -202,7 +202,7 @@ NSString *theObj = [[ITAppleEventCenter sharedCenter] sendAEWithSendString:sendStr eventClass:@"core" eventID:@"getd" appPSN:savedPSN]; ITDebugLog(@" - Adding playlist %@", theObj); if (theObj) { - [aSource addObject:[[theObj copy] autorelease]]; + [aSource addObject:theObj]; } } [allSources addObject:[aSource autorelease]]; @@ -377,6 +377,19 @@ return ( ([temp1 length]) ? temp1 : nil ) ; } +- (NSString *)currentSongComposer +{ + NSString *temp1; + ITDebugLog(@"Getting current song artist."); + if ( [self currentPlaylistClass] != ITMTRemotePlayerRadioPlaylist ) { + temp1 = [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKey:@"pCmp" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]; + } else { + temp1 = @""; + } + ITDebugLog(@"Getting current song artist done."); + return ( ([temp1 length]) ? temp1 : nil ) ; +} + - (NSString *)currentSongAlbum { NSString *temp1; @@ -728,7 +741,7 @@ { if ([(NSString *)name isEqualToString:@"iTunes"]) { - ITDebugLog(@"iTunes' highLongOfPSN: %lu.", number.highLongOfPSN); + ITDebugLog(@"iTunes' highLPongOfPSN: %lu.", number.highLongOfPSN); ITDebugLog(@"iTunes' lowLongOfPSN: %lu.", number.lowLongOfPSN); ITDebugLog(@"Done getting iTunes' PSN."); return number;