Show
Ignore:
Timestamp:
02/24/10 14:49:10 (2 years ago)
Author:
gbooker
Message:

Moved all the #defines to the top; made sure files are created when testing.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/PlayerFramework/SapphireFrappliance/main_debug.m

    r1049 r1168  
    4343#import "SapphireMovieDirectory.h" 
    4444 
     45//#define TESTING_UPGRADE 
     46//#define LISTING_MOVIES 
     47//#define TESTING_XML_IMPORT 
     48//#define TESTING_FILE_SCANNING 
     49//#define TESTING_UPDATED_VALUES 
     50//#define TESTING_DIRECTORY_RESCAN 
     51//#define TESTING_AUTO_PRUNING 
     52#define TESTING_MOVIE_IMPORT 
     53//#define TESTING_TV_SHOW_IMPORT 
     54//#define TESTING_MULTIPLE_AND_SINGLE_TV_SHOW_IMPORT 
     55//#define TESTING_MOVIE_VIRTUAL_DIRS_IN_XML 
     56//#define TESTING_TV_IMPORT_THROUGH_XML 
     57 
    4558void overrideApplicationSupportdir(NSString *override); 
    4659 
     
    151164- (BOOL)canDisplayChooser 
    152165{ 
    153         return NO; 
     166        return YES; 
    154167} 
    155168 
     
    161174- (void)displayChooser:(BRLayerController <SapphireChooser> *)chooser forImporter:(id <SapphireImporter>)importer withContext:(id)context 
    162175{ 
     176        [chooser itemSelected:1]; 
     177        [importer exhumedChooser:chooser withContext:context]; 
    163178} 
    164179 
     
    181196         
    182197//      overrideApplicationSupportdir([NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Frontrow"]); 
    183 //#define TESTING_UPGRADE 
    184198#ifdef TESTING_UPGRADE 
    185199        { 
     
    202216         
    203217        //Debug code goes here: 
    204 //#define LISTING_MOVIES 
    205218#ifdef LISTING_MOVIES 
    206219        { 
     
    218231        } 
    219232#endif 
    220 //#define TESTING_XML_IMPORT 
    221233#ifdef TESTING_XML_IMPORT 
    222234        { 
     
    230242        } 
    231243#endif 
    232 //#define TESTING_FILE_SCANNING 
    233244#ifdef TESTING_FILE_SCANNING 
    234245        { 
     
    246257        } 
    247258#endif 
    248 //#define TESTING_UPDATED_VALUES 
    249259#ifdef TESTING_UPDATED_VALUES 
    250260        { 
     
    260270        } 
    261271#endif 
    262 //#define TESTING_DIRECTORY_RESCAN 
    263272#ifdef TESTING_DIRECTORY_RESCAN 
    264273        { 
     
    271280        } 
    272281#endif 
    273 //#define TESTING_AUTO_PRUNING 
    274282#ifdef TESTING_AUTO_PRUNING 
    275283        { 
     
    293301        } 
    294302#endif 
    295 #define TESTING_MOVIE_IMPORT 
    296303#ifdef TESTING_MOVIE_IMPORT 
    297304        { 
    298                 SapphireFileMetaData *file = [SapphireFileMetaData fileWithPath:@"/Users/gbooker/Movies/MovieTests/FIFTH_ELEMENT.mov" inContext:moc]; 
     305                SapphireFileMetaData *file = [SapphireFileMetaData createFileWithPath:@"/Users/gbooker/Movies/MovieTests/FIFTH_ELEMENT.mov" inContext:moc]; 
    299306                SapphireMovieImporter *import = [[SapphireMovieImporter alloc] init]; 
    300307                [file setToReimportFromMaskValue:IMPORT_TYPE_MOVIE_MASK]; 
     308                [file setToResetImportDecisions]; 
    301309                [importManager importer:import importMetaData:file path:[file path]]; 
    302310                [import release]; 
    303311        } 
    304312#endif 
    305 //#define TESTING_TV_SHOW_IMPORT 
    306313#ifdef TESTING_TV_SHOW_IMPORT 
    307314        { 
    308                 SapphireFileMetaData *file = [SapphireFileMetaData fileWithPath:@"/Users/gbooker/Movies/TVShowsTests/Doctor Who (2005) S03ES1 Voyage of the Damned.avi" inContext:moc]; 
     315                SapphireFileMetaData *file = [SapphireFileMetaData createFileWithPath:@"/Users/gbooker/Movies/TVShowsTests/Doctor Who (2005) S03ES1 Voyage of the Damned.avi" inContext:moc]; 
    309316                SapphireTVShowImporter *import = [[SapphireTVShowImporter alloc] init]; 
    310317                [file setToReimportFromMaskValue:IMPORT_TYPE_TVSHOW_MASK]; 
     
    313320        } 
    314321#endif 
    315 //#define TESTING_MULTIPLE_AND_SINGLE_TV_SHOW_IMPORT 
    316322#ifdef TESTING_MULTIPLE_AND_SINGLE_TV_SHOW_IMPORT 
    317323        { 
     
    328334        } 
    329335#endif 
    330 //#define TESTING_MOVIE_VIRTUAL_DIRS_IN_XML 
    331336#ifdef TESTING_MOVIE_VIRTUAL_DIRS_IN_XML 
    332337        { 
     
    337342        } 
    338343#endif 
    339 //#define TESTING_TV_IMPORT_THROUGH_XML 
    340344#ifdef TESTING_TV_IMPORT_THROUGH_XML 
    341345        {