Fixed mpcdec framework settings to get it to compile in debug configuration on case-sensitive FS. (Modified case from MPCDec to mpcdec, as I already did for release configuration).
parent
ca76dbab7d
commit
a5c8447b8d
|
@ -283,7 +283,7 @@
|
||||||
HEADER_SEARCH_PATHS = Files/include/;
|
HEADER_SEARCH_PATHS = Files/include/;
|
||||||
INFOPLIST_FILE = Info.plist;
|
INFOPLIST_FILE = Info.plist;
|
||||||
INSTALL_PATH = "@loader_path/../Frameworks";
|
INSTALL_PATH = "@loader_path/../Frameworks";
|
||||||
PRODUCT_NAME = MPCDec;
|
PRODUCT_NAME = mpcdec;
|
||||||
WRAPPER_EXTENSION = framework;
|
WRAPPER_EXTENSION = framework;
|
||||||
ZERO_LINK = YES;
|
ZERO_LINK = YES;
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,6 +16,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
+(SpotlightPlaylistEntry *)playlistEntryWithMetadataItem:(NSMetadataItem *)metadataItem;
|
+(SpotlightPlaylistEntry *)playlistEntryWithMetadataItem:(NSMetadataItem *)metadataItem;
|
||||||
|
+ (NSArray *)allmdKeys;
|
||||||
|
|
||||||
@property(copy) NSNumber *length;
|
@property(copy) NSNumber *length;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -20,7 +20,7 @@ static NSArray * extramdKeys;
|
||||||
// allmdKeys is a combined array of both mdKeys and entryKeys
|
// allmdKeys is a combined array of both mdKeys and entryKeys
|
||||||
static NSArray * allmdKeys;
|
static NSArray * allmdKeys;
|
||||||
|
|
||||||
// And the dictionary that matches them
|
// tags matches mdKeys and entryKeys for automated extraction
|
||||||
static NSDictionary * tags;
|
static NSDictionary * tags;
|
||||||
|
|
||||||
@implementation SpotlightPlaylistEntry
|
@implementation SpotlightPlaylistEntry
|
||||||
|
@ -51,6 +51,12 @@ static NSDictionary * tags;
|
||||||
tags = [NSDictionary dictionaryWithObjects:entryKeys forKeys:mdKeys];
|
tags = [NSDictionary dictionaryWithObjects:entryKeys forKeys:mdKeys];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use this to access the array of all the keys we want.
|
||||||
|
+ (NSArray *)allmdKeys
|
||||||
|
{
|
||||||
|
return allmdKeys;
|
||||||
|
}
|
||||||
|
|
||||||
+ (SpotlightPlaylistEntry *)playlistEntryWithMetadataItem:(NSMetadataItem *)metadataItem
|
+ (SpotlightPlaylistEntry *)playlistEntryWithMetadataItem:(NSMetadataItem *)metadataItem
|
||||||
{
|
{
|
||||||
// use the matching tag sets to generate a playlist entry
|
// use the matching tag sets to generate a playlist entry
|
||||||
|
@ -65,6 +71,7 @@ static NSDictionary * tags;
|
||||||
[entry setURL: [NSURL fileURLWithPath: [songAttributes objectForKey:@"kMDItemPath"]]];
|
[entry setURL: [NSURL fileURLWithPath: [songAttributes objectForKey:@"kMDItemPath"]]];
|
||||||
|
|
||||||
// Authors is an array, but we only care about the first item in it
|
// Authors is an array, but we only care about the first item in it
|
||||||
|
|
||||||
[entry setArtist: [[songAttributes objectForKey:@"kMDItemAuthors"] objectAtIndex:0]];
|
[entry setArtist: [[songAttributes objectForKey:@"kMDItemAuthors"] objectAtIndex:0]];
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,13 +22,14 @@ static NSPredicate * musicOnlyPredicate = nil;
|
||||||
@"kMDItemContentTypeTree==\'public.audio\'"] retain];
|
@"kMDItemContentTypeTree==\'public.audio\'"] retain];
|
||||||
|
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
|
// Set the home directory as the default search directory
|
||||||
NSString * homeDir = @"~";
|
NSString * homeDir = @"~";
|
||||||
homeDir = [homeDir stringByExpandingTildeInPath];
|
homeDir = [homeDir stringByExpandingTildeInPath];
|
||||||
homeDir = [[NSURL fileURLWithPath:homeDir isDirectory:YES] absoluteString];
|
homeDir = [[NSURL fileURLWithPath:homeDir isDirectory:YES] absoluteString];
|
||||||
NSDictionary *searchDefault =
|
NSDictionary *searchDefault =
|
||||||
[NSDictionary dictionaryWithObject:homeDir
|
[NSDictionary dictionaryWithObject:homeDir
|
||||||
forKey:@"spotlightSearchPath"];
|
forKey:@"spotlightSearchPath"];
|
||||||
|
|
||||||
[defaults registerDefaults:searchDefault];
|
[defaults registerDefaults:searchDefault];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,11 +47,14 @@ static NSPredicate * musicOnlyPredicate = nil;
|
||||||
{
|
{
|
||||||
unsigned options = (NSCaseInsensitivePredicateOption|
|
unsigned options = (NSCaseInsensitivePredicateOption|
|
||||||
NSDiacriticInsensitivePredicateOption);
|
NSDiacriticInsensitivePredicateOption);
|
||||||
|
|
||||||
|
// Set scope to contents of pathControl
|
||||||
[self.query setSearchScopes:[NSArray arrayWithObjects:pathControl.URL, nil]];
|
[self.query setSearchScopes:[NSArray arrayWithObjects:pathControl.URL, nil]];
|
||||||
|
|
||||||
NSString *processedKey = [NSString stringWithFormat: @"*%@*", self.searchString];
|
NSString *processedKey = [NSString stringWithFormat: @"*%@*", self.searchString];
|
||||||
|
|
||||||
NSPredicate *searchPredicate = [NSComparisonPredicate
|
NSPredicate *searchPredicate = [NSComparisonPredicate
|
||||||
predicateWithLeftExpression:[NSExpression expressionForKeyPath:@"*"]
|
predicateWithLeftExpression:[NSExpression expressionForKeyPath:@"kMDItemAuthors"]
|
||||||
rightExpression:[NSExpression expressionForConstantValue:processedKey]
|
rightExpression:[NSExpression expressionForConstantValue:processedKey]
|
||||||
modifier:NSDirectPredicateModifier
|
modifier:NSDirectPredicateModifier
|
||||||
type:NSLikePredicateOperatorType
|
type:NSLikePredicateOperatorType
|
||||||
|
|
Loading…
Reference in New Issue