diff --git a/Application/AppController.m b/Application/AppController.m index 3a15c1a9e..e0ed5b3d0 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -8,6 +8,7 @@ #import "AppleRemote.h" #import "PlaylistLoader.h" #import "OpenURLPanel.h" +#import "SpotlightWindowController.h" @implementation AppController diff --git a/Spotlight/SpotlightSearchController.m b/Spotlight/SpotlightSearchController.m index fb52fb41e..6648d96b7 100644 --- a/Spotlight/SpotlightSearchController.m +++ b/Spotlight/SpotlightSearchController.m @@ -7,7 +7,7 @@ // #import "SpotlightSearchController.h" -//#import "SpotlightWindowController.h" +#import "SpotlightWindowController.h" #import "PlaylistLoader.h" // Store a class predicate for searching for music @@ -68,12 +68,16 @@ static NSPredicate * musicOnlyPredicate = nil; - (IBAction)addToPlaylist:(id)sender; { + [self.query disableUpdates]; + NSArray *songPaths = [[playlistController selectedObjects]valueForKey:@"kMDItemPath"]; NSMutableArray *songURLs = [NSMutableArray arrayWithCapacity:[songPaths count]]; for (NSString *songPath in songPaths) { [songURLs addObject:[NSURL fileURLWithPath:songPath]]; } -// [spotlightWindowController.playlistLoader addURLs:songURLs sort:NO]; + [spotlightWindowController.playlistLoader addURLs:songURLs sort:NO]; + + [self.query enableUpdates]; } @synthesize query;