Permalink
Browse files

supported ficia.com

  • Loading branch information...
1 parent 9722137 commit 47a1a57d14e9feca6397b3b331e3bc0343de19e1 @yappo committed Jan 14, 2011
Showing with 16 additions and 1 deletion.
  1. +16 −1 Classes/Views/Log/ImageURLParser.m
@@ -175,7 +175,22 @@ + (NSString*)imageURLForURL:(NSString*)url
return [NSString stringWithFormat:@"http://tn-skr%qi.smilevideo.jp/smile?i=%qi", (vidNum%4 + 1), vidNum];
}
}
-
+ else if ([host hasSuffix:@".ficia.com"]) {
+ NSString* fragment = u.fragment;
+ NSString* user = [host substringToIndex:host.length - 10];
+ if (path.length > 60) {
+ if ([path hasPrefix:@"/pl/album-photo/"]) {
+ NSString* s = [path substringFromIndex:53];
+ return [NSString stringWithFormat:@"http://%@.pst.ficia.com/p/%@.jpg", user, s];
+ }
+ }
+ else if (fragment.length > 60) {
+ if ([fragment hasPrefix:@"album-photo/"]) {
+ NSString* s = [fragment substringFromIndex:49];
+ return [NSString stringWithFormat:@"http://%@.pst.ficia.com/p/%@.jpg", user, s];
+ }
+ }
+ }
return nil;
}

0 comments on commit 47a1a57

Please sign in to comment.