Changeset 606
- Timestamp:
- 07/01/08 19:21:57 (6 months ago)
- Files:
-
- branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.h (modified) (1 diff)
- branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.m (modified) (2 diffs)
- branches/CoreData/SapphireFrappliance/MetaData/Support/SapphireMetaDataSupport.m (modified) (1 diff)
- branches/CoreData/SapphireFrappliance/MetaDataImporting/SapphireImporterDataMenu.m (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.h
r540 r606 5 5 + (SapphireCollectionDirectory *)collectionAtPath:(NSString *)path inContext:(NSManagedObjectContext *)moc; 6 6 + (NSArray *)availableCollectionDirectoriesInContext:(NSManagedObjectContext *)moc; 7 + (NSArray *)skippedCollectionDirectoriesInContext:(NSManagedObjectContext *)moc; 7 8 @end branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.m
r580 r606 16 16 SapphireCollectionDirectory *ret = dir.collectionDirectory; 17 17 if(ret != nil) 18 { 19 if(isMount) 20 ret.isMountValue = isMount; 18 21 return ret; 22 } 19 23 20 24 ret = [NSEntityDescription insertNewObjectForEntityForName:MY_NAME inManagedObjectContext:moc]; … … 67 71 return ret; 68 72 } 73 74 + (NSArray *)skippedCollectionDirectoriesInContext:(NSManagedObjectContext *)moc 75 { 76 NSPredicate *predicate = [NSPredicate predicateWithFormat:@"skip == YES"]; 77 NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"directory.path" ascending:YES]; 78 NSArray *ret = doSortedFetchRequest(MY_NAME, moc, predicate, sort); 79 80 [sort release]; 81 return ret; 82 } 69 83 @end branches/CoreData/SapphireFrappliance/MetaData/Support/SapphireMetaDataSupport.m
r595 r606 174 174 while((collectionPath = [collectionEnum nextObject]) != nil) 175 175 { 176 [SapphireCollectionDirectory collectionAtPath:collectionPath mount:([custom containsObject:collectionPath] == nil) skip:[[skipped objectForKey:collectionPath] boolValue] hidden:[[hidden objectForKey:collectionPath] boolValue] inContext:context]; 177 } 178 179 // NSArray *mountedCollections = [SapphireCollectionDirectory availableCollectionDirectoriesInContext:context]; 176 [SapphireCollectionDirectory collectionAtPath:collectionPath 177 mount:NO 178 skip:[[skipped objectForKey:collectionPath] boolValue] 179 hidden:[[hidden objectForKey:collectionPath] boolValue] 180 inContext:context]; 181 } 182 //Set the mount values for all 183 [SapphireCollectionDirectory availableCollectionDirectoriesInContext:context]; 180 184 181 185 [display setCurrentFile:BRLocalizedString(@"Upgrading Movie Translations", @"")]; branches/CoreData/SapphireFrappliance/MetaDataImporting/SapphireImporterDataMenu.m
r558 r606 22 22 #import <BackRow/BackRow.h> 23 23 #import "SapphireDirectoryMetaData.h" 24 #import "SapphireFileMetaData.h" 24 25 #import "SapphireCollectionDirectory.h" 25 26 #import <SapphireCompatClasses/SapphireFrontRowCompat.h> … … 170 171 return; 171 172 } 172 NSArray *collections = [SapphireCollectionDirectory availableCollectionDirectoriesInContext:moc]; 173 NSArray *skipCol = [collections filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"skip == YES"]]; 173 NSArray *skipCol = [SapphireCollectionDirectory skippedCollectionDirectoriesInContext:moc]; 174 174 NSMutableSet *skipSet = [NSMutableSet setWithSet:[skipCol valueForKeyPath:@"directory.path"]]; 175 175 [meta getSubFileMetasWithDelegate:self skipDirectories:skipSet]; … … 259 259 { 260 260 BOOL ret = NO; 261 SapphireFileMetaData *file = [importItems objectAtIndex:0]; 262 if(file.joinedToFile != nil) 263 return NO; 261 264 @try { 262 ImportState result = [importer importMetaData: [importItems objectAtIndex:0]];265 ImportState result = [importer importMetaData:file]; 263 266 switch(result) 264 267 { … … 458 461 return YES; 459 462 break; 463 case kBREventTapMenu: 464 [self cancel]; 465 break; 460 466 } 461 467 return [super brEventAction:event];
