From e551055fcae2f68bc03622d66d3998af8145b12f Mon Sep 17 00:00:00 2001 From: Jordan Koch Date: Sat, 16 May 2015 00:23:10 -0400 Subject: [PATCH] Update ImageURLParser.m Added support for images uploaded to leetfil.es --- Classes/Views/Log/ImageURLParser.m | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Classes/Views/Log/ImageURLParser.m b/Classes/Views/Log/ImageURLParser.m index 0cbc48b5..ed2c76f1 100644 --- a/Classes/Views/Log/ImageURLParser.m +++ b/Classes/Views/Log/ImageURLParser.m @@ -201,7 +201,17 @@ + (NSString*)serviceImageURLForURL:(NSString*)url if (path.length > 1) { return [NSString stringWithFormat:@"%@:small", url]; } - } else if ([host hasSuffix:@"movapic.com"]) { + } + else if ([host hasSuffix:@"leetfil.es"]) { + if ([path hasPrefix:@"/image/"]) { + NSString *s = [path substringFromIndex:7]; + + if ([s isAlphaNumOnly]) { + return [NSString stringWithFormat:@"https://i.leetfil.es/%@", s]; + } + } + } + else if ([host hasSuffix:@"movapic.com"]) { if ([path hasPrefix:@"/pic/"]) { NSString* s = [path substringFromIndex:5]; if ([s isAlphaNumOnly]) {