Changeset 389

Show
Ignore:
Timestamp:
12/09/07 12:21:50 (1 year ago)
Author:
pmerrill
Message:
  • Movie Importer will no longer give the user an empty title chooser.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/SapphireMovieImporter.m

    r388 r389  
    572572                        } 
    573573                } 
    574                 if(!uniqueResult)return ret; 
     574                if(!uniqueResult && [ret count]>0)return ret; 
    575575        } 
    576576        return nil ; 
     
    602602} 
    603603 
    604 - (BOOL) importMetaData:(id <SapphireFileMetaDataProtocol>)metaData 
     604/* - (BOOL) importMetaData:(id <SapphireFileMetaDataProtocol>)metaData */ 
     605- (BOOL) importMetaData:(SapphireFileMetaData *)metaData  
    605606{ 
    606607        currentData = metaData; 
     
    632633                /*Ask the user what movie this is*/ 
    633634                NSArray *movies = [self searchResultsForMovie:fileName]; 
     635                /* No need to prompt the user for an empty set */ 
     636                if(movies==nil) 
     637                { 
     638                        /* We tried to import but found nothing - mark this file to be skipped on future imports */ 
     639                        [metaData importInfo:[NSMutableDictionary dictionary] fromSource:META_IMDB_IMPORT_KEY withTime:[[NSDate date] timeIntervalSince1970]]; 
     640                        [metaData setFileClass:FILE_CLASS_OTHER]; 
     641                        return YES; 
     642                } 
    634643                /*Pause for the user's input*/ 
    635644                [dataMenu pause];