Created
May 6, 2010 21:09
-
-
Save ykzts/392708 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Classes/Views/Log/ImageURLParser.m.orig 2010-05-07 03:46:46.000000000 +0900 | |
+++ Classes/Views/Log/ImageURLParser.m 2010-05-07 06:08:33.000000000 +0900 | |
@@ -80,6 +80,14 @@ | |
} | |
} | |
} | |
+ else if ([host hasSuffix:@"tumblr.com"]) { | |
+ NSArray* ary1 = [host componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"."]]; | |
+ NSArray* ary2 = [path componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]]; | |
+ NSString* userId = [ary1 objectAtIndex:0]; | |
+ NSString* photoId = [ary2 objectAtIndex:2]; | |
+ | |
+ return [NSString stringWithFormat:@"http://api.desire.sh/tumblr-photo/%@/%@", userId, photoId]; | |
+ } | |
return nil; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment