Skip to content

Commit

Permalink
feat: support media:content imgs
Browse files Browse the repository at this point in the history
  • Loading branch information
sparky-raccoon committed Mar 21, 2024
1 parent 24b539f commit e9de200
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const parseRssFeeds = async (sourceList: FSource[]): Promise<Publication[]> => {
const publications: Publication[] = [];
const parser = new Parser({
customFields: {
item: [['itunes:image', 'imageTag']],
item: [
['itunes:image', 'imageTag'],
['media:content', 'imageTag']
],
}
});

Expand Down Expand Up @@ -65,7 +68,7 @@ const parseRssFeeds = async (sourceList: FSource[]): Promise<Publication[]> => {
} else {
let imageUrl;
if (ENABLE_IMAGES && imageTag) {
imageUrl = imageTag.$.href;
imageUrl = imageTag.$.href || imageTag.$.url;
}

publications.push({
Expand Down

0 comments on commit e9de200

Please sign in to comment.