[indices addObject:[curPlaylist objectAtIndex:2]];
}
ITDebugLog(@"Checking the current source.");
- if ( (source == ITMTRemoteSharedLibrarySource) || (source == ITMTRemoteiPodSource) || (source == ITMTRemoteGenericDeviceSource) || (source == ITMTRemoteCDSource) ){
- tempItem = [playlistsMenu itemAtIndex:[indices indexOfObject:[NSNumber numberWithInt:[[[MainController sharedController] currentRemote] currentSourceIndex]]] + [playlistsMenu numberOfItems] - 3];
+ if ( (source == ITMTRemoteSharedLibrarySource) || (source == ITMTRemoteiPodSource) || (source == ITMTRemoteGenericDeviceSource) || (source == ITMTRemoteCDSource) ) {
+ tempItem = [playlistsMenu itemAtIndex:[playlistsMenu numberOfItems] + [indices indexOfObject:[NSNumber numberWithInt:[[[MainController sharedController] currentRemote] currentSourceIndex]]] - [indices count]];
[tempItem setState:NSOnState];
[[[tempItem submenu] itemAtIndex:_currentPlaylist - 1] setState:NSOnState];
} else if (source == ITMTRemoteLibrarySource && _currentPlaylist) {
unsigned long class;
if (sourceName) {
NSMutableArray *aSource = [[NSMutableArray alloc] init];
- [aSource addObject:[[sourceName copy] autorelease]];
+ [aSource addObject:sourceName];
switch (fourcc) {
case 'kTun':
class = ITMTRemoteRadioSource;
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]];