Fixing Bugs & Adding subtitle to feeds

This commit is contained in:
relikd
2018-08-19 23:30:48 +02:00
parent 5ebeab17d2
commit 09794c92f7
6 changed files with 35 additions and 2 deletions

6
RSXML/RSRSSParser.m Normal file → Executable file
View File

@@ -31,6 +31,7 @@
@property (nonatomic) BOOL endRSSFound;
@property (nonatomic) NSString *link;
@property (nonatomic) NSString *title;
@property (nonatomic) NSString *subtitle;
@property (nonatomic) NSDate *dateParsed;
@end
@@ -105,6 +106,7 @@
[self parse];
RSParsedFeed *parsedFeed = [[RSParsedFeed alloc] initWithURLString:self.urlString title:self.title link:self.link articles:self.articles];
parsedFeed.subtitle = self.subtitle;
return parsedFeed;
}
@@ -236,6 +238,10 @@ static const NSInteger kTrueLength = 5;
else if (RSSAXEqualTags(localName, kTitle, kTitleLength)) {
self.title = self.parser.currentStringWithTrimmedWhitespace;
}
else if (RSSAXEqualTags(localName, kDescription, kDescriptionLength)) {
self.subtitle = self.parser.currentStringWithTrimmedWhitespace;
}
}