Skip to content

Commit 12919c1

Browse files
authored
Merge pull request #1 from aerian-studios/prioritise-itunes-images
prioritise images from itunes over the node.images
2 parents 6c0a895 + bfee64e commit 12919c1

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,14 @@ const buildOptions = exports.buildOptions = function (params) {
104104

105105
const GET = exports.GET = {
106106
imageURL: function (node) {
107+
if (node["itunes:image"]) {
108+
return node["itunes:image"][0]['$'].href
109+
}
107110

108111
if (node.image) {
109112
return node.image[0].url[0]
110113
}
111114

112-
if (node["itunes:image"]) {
113-
return node["itunes:image"][0]['$'].href
114-
}
115-
116115
return undefined
117116
},
118117

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "podcast-feed-parser",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "A highly customizable package for fetching and parsing podcast feeds into simple and manageable JavaScript objects. For use with node and in the browser.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)