Changeset 331

Show
Ignore:
Timestamp:
11/28/07 00:31:26 (11 months ago)
Author:
pmerrill
Message:
  • Movie Import updated for IMDB's code changes.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Sapphire.xcodeproj/project.pbxproj

    r322 r331  
    532532                        isa = PBXProject; 
    533533                        buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "Sapphire" */; 
    534                         compatibilityVersion = "Xcode 2.4"; 
    535534                        hasScannedForEncodings = 1; 
    536535                        mainGroup = 089C166AFE841209C02AAC07 /* ApplianceBase */; 
  • trunk/SapphireMovieImporter.m

    r310 r331  
    539539                                        continue; 
    540540                                NSString *URLSubPath =[resultURL path] ; 
    541                                 if([URLSubPath hasPrefix:@"/rg/title-tease/"]) 
    542                                 { 
    543                                         URLSubPath=[[URLSubPath stringByReplacingAllOccurancesOf:@"/rg/title-tease/" withString:@""]stringByDeletingLastPathComponent]; 
    544                                         NSScanner * snipPrefix=[NSScanner scannerWithString:URLSubPath]; 
    545                                         NSString *snip=nil ; 
    546                                         [snipPrefix scanUpToString:@"/" intoString:&snip] ; 
    547                                         URLSubPath=[URLSubPath stringByReplacingAllOccurancesOf:snip withString:@""]; 
     541                                if([URLSubPath hasSuffix:@"/releaseinfo"]) 
     542                                { 
     543                                        URLSubPath=[URLSubPath stringByReplacingAllOccurancesOf:@"/releaseinfo" withString:@"/"]; 
     544                                        URLSubPath=[URLSubPath substringFromIndex:1]; 
    548545                                        [ret addObject:[NSDictionary dictionaryWithObjectsAndKeys: 
    549546                                                resultTitle, @"name", 
     
    558555                                NSURL *resultURL = [NSURL URLWithString:[[[result objectsForXQuery:IMDB_RESULT_LINK_XPATH error:&error] objectAtIndex:0] stringValue]] ; 
    559556                                NSString * resultTitleValue=[result stringValue]; 
    560                                 if(resultURL == nil) 
     557                                /* Deal with AKA titles */ 
     558                                if([resultTitleValue hasPrefix:@"\n"]) 
     559                                { 
     560                                        resultTitleValue=[resultTitleValue substringFromIndex:3]; 
     561                                        resultTitle=[resultTitle stringByReplacingAllOccurancesOf:@"\n" withString:@" "]; 
     562                                //      NSString *enumeratedResultTitle=[resultTitleValue substringFromIndex:3]; 
     563                                //      resultTitleValue=enumeratedResultTitle ; 
     564                                } 
     565                                /* Skip image links */ 
     566                                else if(resultURL == nil || [resultTitleValue compare:@" "]) 
    561567                                        continue; 
    562568                                /*Skip Video Game titles (VG) */