Skip to content

Commit

Permalink
Merge pull request #114 from lepolt/master
Browse files Browse the repository at this point in the history
Fix issue with missing <itunes:title> tag
  • Loading branch information
Tarja Morgado authored Apr 4, 2020
2 parents 7dcec40 + 4c40696 commit 97276bb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Sources/FeedKit/Models/RSS/RSSFeed + mapAttributes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ extension RSSFeed {
.rssChannelItemItunesExplicit,
.rssChannelItemItunesIsClosedCaptioned,
.rssChannelItemItunesOrder,
.rssChannelItemItunesTitle,
.rssChannelItemItunesSubtitle,
.rssChannelItemItunesSummary,
.rssChannelItemItunesKeywords:
Expand Down
1 change: 1 addition & 0 deletions Sources/FeedKit/Models/RSS/RSSFeed + mapCharacters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ extension RSSFeed {
case .rssChannelItemItunesExplicit: self.items?.last?.iTunes?.iTunesExplicit = self.items?.last?.iTunes?.iTunesExplicit?.appending(string) ?? string
case .rssChannelItemItunesIsClosedCaptioned: self.items?.last?.iTunes?.isClosedCaptioned = self.items?.last?.iTunes?.isClosedCaptioned?.appending(string) ?? string
case .rssChannelItemItunesOrder: self.items?.last?.iTunes?.iTunesOrder = Int(string)
case .rssChannelItemItunesTitle: self.items?.last?.iTunes?.iTunesTitle = self.items?.last?.iTunes?.iTunesTitle?.appending(string) ?? string
case .rssChannelItemItunesSubtitle: self.items?.last?.iTunes?.iTunesSubtitle = self.items?.last?.iTunes?.iTunesSubtitle?.appending(string) ?? string
case .rssChannelItemItunesSummary: self.items?.last?.iTunes?.iTunesSummary = self.items?.last?.iTunes?.iTunesSummary?.appending(string) ?? string
case .rssChannelItemItunesKeywords: self.items?.last?.iTunes?.iTunesKeywords = self.items?.last?.iTunes?.iTunesKeywords?.appending(string) ?? string
Expand Down
1 change: 1 addition & 0 deletions Sources/FeedKit/Models/RSS/RSSPath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ enum RSSPath: String {
case rssChannelItemItunesExplicit = "/rss/channel/item/itunes:explicit"
case rssChannelItemItunesIsClosedCaptioned = "/rss/channel/item/itunes:isClosedCaptioned"
case rssChannelItemItunesOrder = "/rss/channel/item/itunes:order"
case rssChannelItemItunesTitle = "/rss/channel/item/itunes:title"
case rssChannelItemItunesSubtitle = "/rss/channel/item/itunes:subtitle"
case rssChannelItemItunesSummary = "/rss/channel/item/itunes:summary"
case rssChannelItemItunesKeywords = "/rss/channel/item/itunes:keywords"
Expand Down
1 change: 1 addition & 0 deletions Tests/iTunesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class iTunesTests: BaseTestCase {

// Then
XCTAssertNotNil(feed?.items?.first?.iTunes)
XCTAssertEqual(feed?.items?.first?.iTunes?.iTunesTitle, "Dan Carlin's Hardcore History")
XCTAssertEqual(feed?.items?.first?.iTunes?.iTunesAuthor, "Dan Carlin")
XCTAssertEqual(feed?.items?.first?.iTunes?.iTunesBlock, "No")
XCTAssertEqual(feed?.items?.first?.iTunes?.isClosedCaptioned, "Yes")
Expand Down

0 comments on commit 97276bb

Please sign in to comment.