X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/93a60b6d98f84d592631266e1ee0caabe3642551..fb7602562afcd4350ae64c7e2a81fdd7eb2b4a15:/iTunesRemote.m diff --git a/iTunesRemote.m b/iTunesRemote.m index c537975..82b3b09 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -351,6 +351,7 @@ newParent = test; } } + [[[nextNode parent] children] removeObject:nextNode]; [nextNode setParent:newParent]; [[newParent children] addObject:nextNode]; [newParent setType:ITMTFolderNode]; @@ -361,6 +362,7 @@ NSEnumerator *nestEnumerator = [nested objectEnumerator]; while ( (nextNode = [nestEnumerator nextObject]) ) { [[sourceNode children] removeObject:nextNode]; + [nested removeObject:nextNode]; } [nested release]; @@ -370,12 +372,10 @@ enumerator = [[sourceNode children] reverseObjectEnumerator]; while ( (nextNode = [enumerator nextObject]) ) { if ([nextNode type] == ITMTPodcastsNode) { - [nextNode retain]; [[sourceNode children] removeObject:nextNode]; [[sourceNode children] insertObject:nextNode atIndex:1]; movedPodcasts = YES; } else if ([nextNode type] == ITMTFolderNode) { - [nextNode retain]; [[sourceNode children] removeObject:nextNode]; [[sourceNode children] insertObject:nextNode atIndex:1 + movedPodcasts]; } @@ -525,6 +525,15 @@ return ( ([temp1 length]) ? temp1 : nil ) ; } +- (BOOL)songEnabledAtIndex:(int)index +{ + BOOL temp1; + ITDebugLog(@"Getting song enabled at index %i.", index); + temp1 = [ITSendAEWithString([NSString stringWithFormat:@"'----':obj { form:'prop', want:type('prop'), seld:type('enbl'), from:obj { form:'indx', want:type('cTrk'), seld:long(%lu), from:obj { form:'prop', want:type('prop'), seld:type('pPla'), from:'null'() } } }", index], 'core', 'getd', &savedPSN) booleanValue]; + ITDebugLog(@"Getting song enabled at index %i done.", index); + return temp1; +} + - (int)currentAlbumTrackCount { int temp1; @@ -1065,6 +1074,7 @@ ITDebugLog(@"iTunes' highLPongOfPSN: %lu.", number.highLongOfPSN); ITDebugLog(@"iTunes' lowLongOfPSN: %lu.", number.lowLongOfPSN); ITDebugLog(@"Done getting iTunes' PSN."); + [(NSString *)name release]; return number; } [(NSString *)name release];