Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add image thumbnail URL to rss feed parsing #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jocelynlih
Copy link

If media:thumbnail is available during parsing, added to the item's property.

@Colton
Copy link

Colton commented Jul 8, 2015

👍

Not sure why this hasn't been merged yet.

@badalpub1991
Copy link

How to use this in UITableview cellforrowatindexpath method ? i am not getting image in my imageview.
I am trying to use it in this way
MWfeeditem.m

(id)initWithCoder:(NSCoder *)decoder {
if ((self = [super init])) {
identifier = [decoder decodeObjectForKey:@"identifier"];
title = [decoder decodeObjectForKey:@"title"];
link = [decoder decodeObjectForKey:@"link"];
date = [decoder decodeObjectForKey:@"date"];
updated = [decoder decodeObjectForKey:@"updated"];
summary = [decoder decodeObjectForKey:@"summary"];
content = [decoder decodeObjectForKey:@"content"];
author = [decoder decodeObjectForKey:@"author"];
enclosures = [decoder decodeObjectForKey:@"enclosures"];
image = [decoder decodeObjectForKey:@"media:content"];
}
return self;
}

(void)encodeWithCoder:(NSCoder *)encoder {
if (identifier) [encoder encodeObject:identifier forKey:@"identifier"];
if (title) [encoder encodeObject:title forKey:@"title"];
if (link) [encoder encodeObject:link forKey:@"link"];
if (date) [encoder encodeObject:date forKey:@"date"];
if (updated) [encoder encodeObject:updated forKey:@"updated"];
if (summary) [encoder encodeObject:summary forKey:@"summary"];
if (content) [encoder encodeObject:content forKey:@"content"];
if (author) [encoder encodeObject:author forKey:@"author"];
if (enclosures) [encoder encodeObject:enclosures forKey:@"enclosures"];
if (image) [encoder encodeObject:image forKey:@"media:content"];
}

and

MWfeeditem.m
else if ([currentPath isEqualToString:@"/rss/channel/item/media:content"]) { if (processedText.length > 0) item.image = processedText; processed = YES;
}

in cellforrowatindexpath

NSURL *url = [NSURL URLWithString:item.image];
[cell.ImgMainView sd_setImageWithURL:url];

in UITableview method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants