Changeset 1146 for branches/PlayerFramework
- Timestamp:
- 02/18/10 21:54:49 (2 years ago)
- Location:
- branches/PlayerFramework
- Files:
-
- 8 modified
-
. (modified) (1 prop)
-
Doxyfile (modified) (1 prop)
-
SapphireCompatibilityClasses (modified) (1 prop)
-
SapphireFrappliance (modified) (1 prop)
-
SapphireFrappliance/MetaDataImporting/SapphireMovieImporter.m (modified) (1 diff)
-
SapphireFrappliance/MetaDataImporting/SapphireScraper.m (modified) (1 diff)
-
SapphireFrappliance/MetaDataImporting/Scrapers/tvrage.xml (modified) (2 diffs)
-
Software Loader (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/PlayerFramework
-
Property
svn:mergeinfo changed from
to/trunk 1094-1137* /trunk 1094-1145*
-
Property
svn:mergeinfo changed from
-
branches/PlayerFramework/Doxyfile
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/PlayerFramework/SapphireCompatibilityClasses
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/PlayerFramework/SapphireFrappliance
- Property svn:mergeinfo changed
/trunk/SapphireFrappliance merged: 1139,1141
- Property svn:mergeinfo changed
-
branches/PlayerFramework/SapphireFrappliance/MetaDataImporting/SapphireMovieImporter.m
r1138 r1146 284 284 thumbs = [thumbs arrayByAddingObjectsFromArray:[fanart elementsForName:@"thumb"]]; 285 285 286 if([thumbs count] && [delegate canDisplayChooser]) 286 BOOL canDisplay = [delegate canDisplayChooser]; 287 if(canDisplay && [thumbs count]) 287 288 [self getMoviePostersForState:state translation:tran thumbElements:thumbs]; 288 289 else 289 [self completeWithState:state withStatus:ImportStateUpdated importComplete: YES];290 [self completeWithState:state withStatus:ImportStateUpdated importComplete:canDisplay]; 290 291 } 291 292 -
branches/PlayerFramework/SapphireFrappliance/MetaDataImporting/SapphireScraper.m
r1138 r1146 315 315 NSString *cleanedString(NSString *str) 316 316 { 317 NSMutableString *mutStr = [[NSMutableString alloc] init]; 318 NSScanner *scanner = [NSScanner scannerWithString:str]; 319 [scanner setCharactersToBeSkipped:[NSCharacterSet characterSetWithCharactersInString:@""]]; 320 while(![scanner isAtEnd]) 321 { 322 NSString *append = nil; 323 [scanner scanUpToString:@"<" intoString:&append]; 324 if(append) 325 [mutStr appendString:append]; 326 NSString *tag = nil; 327 [scanner scanUpToString:@">" intoString:&tag]; 328 if([tag hasPrefix:@"<br"] && ([tag length] == 3 || [tag characterAtIndex:3] == ' ' || [tag characterAtIndex:3] == '/')) 329 [mutStr appendString:@"\n"]; 330 [scanner scanString:@">" intoString:nil]; 331 } 317 332 /*TV Rage doesn't understand that an & needs to be & in the HTML, not just '&', so we have to work around yet another instance of their stupidity. Decoding entities and then re-encoding them seems to be the safest way to do this*/ 318 NSString *decoded = (NSString *)CFXMLCreateStringByUnescapingEntities(NULL, (CFStringRef) str, NULL);333 NSString *decoded = (NSString *)CFXMLCreateStringByUnescapingEntities(NULL, (CFStringRef)mutStr, NULL); 319 334 NSString *reencoded = (NSString *)CFXMLCreateStringByEscapingEntities(NULL, (CFStringRef)decoded, NULL); 320 335 [decoded release]; 321 NSXMLDocument *doc = [[NSXMLDocument alloc] initWithXMLString:reencoded options:NSXMLDocumentTidyHTML error:nil]; 322 if(doc) 323 { 324 str = (NSString *)CFXMLCreateStringByEscapingEntities(NULL, (CFStringRef)[doc stringValue], NULL); 325 [str autorelease]; 326 [doc release]; 327 } 328 [reencoded release]; 329 return trimmedString(str); 336 [mutStr release]; 337 [reencoded autorelease]; 338 return trimmedString(reencoded); 330 339 } 331 340 -
branches/PlayerFramework/SapphireFrappliance/MetaDataImporting/Scrapers/tvrage.xml
r1138 r1146 25 25 <RegExp input="$$5" output="<details>\1</details>" dest="7"> 26 26 <RegExp input="$$1" output="<title>\1</title>" dest="5"> 27 <expression>< /a>"([^"]*)"Summary</h5></expression>27 <expression><a name='summary'>.*?</a>(.*?) Summary</h5></expression> 28 28 </RegExp> 29 29 <RegExp input="$$1" output="<plot>\1</plot>" dest="5+"> 30 <expression> \n</script><table.*?\n</td></tr></table>(.*)<br>&nbsp;</td></tr></expression>30 <expression> <td><table.*?\n</td></tr></table><br>.*?\n</script>(?:<div [^>]*id='sft_1'>)?(.*?)(?:\n<br>\n<a onclick=.*?|\n)<br>&nbsp;</td></tr></expression> 31 31 </RegExp> 32 32 <RegExp input="$$1" output="<rating>\1</rating><votes>\2</votes>" dest="5+"> … … 77 77 </RegExp> 78 78 <RegExp input="$$1" output="<plot>\1</plot>" dest="5+"> 79 <expression><td><table width= '100%'><tr><td valign='top'><table width='100%'><tr><td>.*?</script><br>([^<]*)</expression>79 <expression><td><table width='100%'><tr><td valign='top'><table width='100%'><tr><td>.*?</script><br>(.*?)<br>&nbsp;</td></tr><tr></expression> 80 80 </RegExp> 81 81 <RegExp input="$$1" output="<rating>\1</rating><votes>\2</votes>" dest="5+"> -
branches/PlayerFramework/Software Loader
- Property svn:mergeinfo changed (with no actual effect on merging)
