Skip to content

Commit

Permalink
bug: transform new_feed_url
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Jun 17, 2020
1 parent 9384d74 commit c7341ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jsonfeed-to-rss-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ module.exports = function jsonfeedToAtomObject (jf, opts) {
'itunes:explicit': existy(get(jf, '_itunes.explicit')) ? truthy(get(jf, '_itunes.explicit')) ? 'yes' : 'no' : null,
'itunes:block': get(jf, '_itunes.block') ? 'Yes' : null,
'itunes:complete': get(jf, '_itunes.complete') ? 'Yes' : null,
'itunes:new-feed-url': get(jf, '_itunes.new_feed_url'),
'itunes:new-feed-url': get(jf, '_itunes.new_feed_url') ? opts.feedURLFn(get(jf, '_itunes.new_feed_url'), jf) : null,
description: truncate4k(rss.description),
title: truncate250(rss.title)
})
Expand Down
1 change: 1 addition & 0 deletions snapshots/extended-feed-rss.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@text": "Football"
}
},
"itunes:new-feed-url": "https://some-other-domain.com/snapshots/extended-feed-rss.xml",
"item": [
{
"title": "A title, giving some simple context to the episode",
Expand Down
1 change: 1 addition & 0 deletions snapshots/extended-feed-rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ If there is more than one paragraph, it gets truncated in some contexts.</descri
<itunes:category text="Sports">
<itunes:category text="Football"/>
</itunes:category>
<itunes:new-feed-url>https://some-other-domain.com/snapshots/extended-feed-rss.xml</itunes:new-feed-url>
<item>
<title>A title, giving some simple context to the episode</title>
<dc:creator>Bret Comnes</dc:creator>
Expand Down
3 changes: 2 additions & 1 deletion snapshots/extended-feed.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"image": "https://jsonfeed-to-rss.netlify.com/icon-3000x3000.png",
"category": "Sports",
"subcategory": "Football"
"subcategory": "Football",
"new_feed_url": "https://some-other-domain.com/snapshots/extended-feed.json"
},
"items":[
{
Expand Down

0 comments on commit c7341ad

Please sign in to comment.