Changeset 445
- Timestamp:
- 01/03/08 21:08:45 (1 year ago)
- Files:
-
- trunk/SapphireImporterDataMenu.m (modified) (1 diff)
- trunk/SapphireMarkMenu.m (modified) (4 diffs)
- trunk/SapphireMetaData.h (modified) (1 diff)
- trunk/SapphireMetaData.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/SapphireImporterDataMenu.m
r444 r445 173 173 } 174 174 SapphireDirectoryMetaData *meta = [metaCollection directoryForPath:path]; 175 [meta getSubFileMetasWithDelegate:self skipDirectories:[NSMutableSet set ]];175 [meta getSubFileMetasWithDelegate:self skipDirectories:[NSMutableSet setWithSet:[metaCollection skipDirectories]]]; 176 176 collectionIndex++; 177 177 } trunk/SapphireMarkMenu.m
r436 r445 57 57 /*Create the menu*/ 58 58 if(isDir) 59 { 59 60 names = [[NSMutableArray alloc] initWithObjects: 60 61 BRLocalizedString(@"Mark All as Watched", @"Mark whole directory as watched"), … … 66 67 BRLocalizedString(@"Mark All to Clear Metadata", @"Mark whole directory to delete the metadata"), 67 68 nil]; 69 SapphireMetaDataCollection *collection = [meta collection]; 70 NSString *path = [meta path]; 71 if([collection skipCollection:path]) 72 [names addObject:BRLocalizedString(@"Mark this Directory to Not Skip Import", @"Marks this directory to be no longer be skipped during import")]; 73 else 74 [names addObject:BRLocalizedString(@"Mark this Directory to Skip Import", @"Marks this directory to be skipped during import")]; 75 if([collection isCollectionDirectory:path]) 76 [names addObject:BRLocalizedString(@"Mark this Directory to Not be a Collection", @"Marks the directory to no longer be a collection")]; 77 else 78 [names addObject:BRLocalizedString(@"Mark this Directory as a Collection", @"Marks the directory to be a collection")]; 79 } 68 80 else if([meta isKindOfClass:[SapphireFileMetaData class]]) 69 81 { … … 307 319 { 308 320 SapphireDirectoryMetaData *dirMeta = (SapphireDirectoryMetaData *)metaData; 321 SapphireMetaDataCollection *collection = [dirMeta collection]; 322 NSString *path = [dirMeta path]; 309 323 switch(row) 310 324 { … … 326 340 [dirMeta setToImportFromSource:META_IMDB_IMPORT_KEY forPredicate:predicate]; 327 341 break; 342 case 6: 343 [dirMeta clearMetaDataForPredicate:predicate]; 344 break; 345 case 7: 346 [collection setSkip:![collection skipCollection:path] forCollection:path]; 347 break; 348 case 8: 349 if([collection isCollectionDirectory:path]) 350 [collection removeCollectionDirectory:path]; 351 else 352 [collection addCollectionDirectory:path]; 353 break; 328 354 } 329 355 } trunk/SapphireMetaData.h
r438 r445 389 389 390 390 /*! 391 * @brief The set of directories to skip during import 392 * 393 * @return An NSSet of directories to not import 394 */ 395 - (NSSet *)skipDirectories; 396 397 /*! 391 398 * @brief Add a collection 392 399 * trunk/SapphireMetaData.m
r438 r445 645 645 [skipCollection setObject:[NSNumber numberWithBool:skip] forKey:collection]; 646 646 [self writeMetaData]; 647 } 648 649 - (NSSet *)skipDirectories 650 { 651 NSMutableSet *ret = [NSMutableSet set]; 652 NSEnumerator *colEnum = [[self collectionDirectories] objectEnumerator]; 653 NSString *collection; 654 while((collection = [colEnum nextObject]) != nil) 655 { 656 if(![self skipCollection:collection]) 657 [ret addObject:collection]; 658 } 659 660 return ret; 647 661 } 648 662
