Skip to content

Commit

Permalink
Put quickLookURL in metadata as string rather than NSURL too. #50
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeabdullah committed Oct 25, 2012
1 parent ed47637 commit 168ecdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion IMBFlickrNode.m
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ - (NSArray*) extractPhotosFromFlickrResponse: (NSDictionary*) response context:
[metadata setObject:[webPageURL absoluteString] forKey:@"webPageURL"];

NSURL *quickLookURL = [self imageURLForDesiredSize:kIMBFlickrSizeSpecifierMedium fromPhotoDict:photoDict context:context];
[metadata setObject:quickLookURL forKey:@"quickLookURL"];
[metadata setObject:[quickLookURL absoluteString] forKey:@"quickLookURL"];

// But give it a better 'description' without the nested item
NSString *descHTML = [[photoDict objectForKey:@"description"] objectForKey:@"_text"];
Expand Down
5 changes: 4 additions & 1 deletion IMBFlickrObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ @implementation IMBFlickrObject

- (NSURL*) previewItemURL
{
NSURL* quickLookURL = [self.metadata objectForKey:@"quickLookURL"];
NSString *quickLookURLString = [self.metadata objectForKey:@"quickLookURL"];
if (!quickLookURLString) return nil;

NSURL *quickLookURL = [NSURL URLWithString:quickLookURLString];
NSURL* previewItemURL = nil;

if (quickLookURL)
Expand Down

0 comments on commit 168ecdb

Please sign in to comment.