Hopefuly fixed the iPod playlists to be enabled at the right time.
[MenuTunes.git] / MenuController.m
index 4ab0bf4..1c8dd90 100755 (executable)
     if (_currentPlaylist && !_playingRadio) {
         if (numSongs > 0) {
             int i;
-
             for (i = _currentTrack + 1; i <= _currentTrack + numSongsInAdvance; i++) {
                 if (i <= numSongs) {
                     NSString *curSong;
     int i, j;
     NS_DURING
         playlists = [[[MainController sharedController] currentRemote] playlists];
+        /*playlists = [NSArray arrayWithObjects:
+                        [NSArray arrayWithObjects:@"Library", [NSNumber numberWithInt:-1], @"Library", @"Playlist", nil],
+                        [NSArray arrayWithObjects:@"Radio", [NSNumber numberWithInt:1], @"Radio", nil], nil];*/
     NS_HANDLER
         [[MainController sharedController] networkError:localException];
     NS_ENDHANDLER
         NSMenu *submenu = [[NSMenu alloc] init];
         ITDebugLog(@"Adding source: %@", name);
         
-        if ( ([[curPlaylist objectAtIndex:i] intValue] == ITMTRemoteiPodSource) && (![self iPodAtPathAutomaticallyUpdates:[curPlaylist objectAtIndex:j]]) ) {
+        if ( ([[curPlaylist objectAtIndex:i] intValue] == ITMTRemoteiPodSource) && [self iPodAtPathAutomaticallyUpdates:[curPlaylist objectAtIndex:j]]) ) {
             ITDebugLog(@"Invalid iPod source.");
         } else {
             for (j = 2; j < [curPlaylist count]; j++) {