Skip to content

Commit

Permalink
Merge pull request #24 from sesamyab/ma/selling-point
Browse files Browse the repository at this point in the history
fix: selling point updates
  • Loading branch information
markusahlstrand authored May 20, 2024
2 parents 1c76800 + 51adabf commit 912bf6f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"vitest": "1.6.0"
},
"dependencies": {
"@sesamy/podcast-schemas": "^1.4.2",
"@sesamy/podcast-schemas": "^1.4.3",
"fast-xml-parser": "^4.4.0",
"sanitize-html": "^2.13.0",
"zod": "^3.23.8"
Expand Down
2 changes: 2 additions & 0 deletions src/feed-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export default async function parseFeedToJson(text: string): Promise<RssFeed> {
'itunes:category',
'sesamy:sesamy-item',
'sesamy:product',
'sesamy:selling-point',
'sesamy:price-override',
'enclosure',
];

Expand Down
2 changes: 1 addition & 1 deletion src/serialize-feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function generateRssFeed(feed: SesamyFeed): string {
'sesamy:period': product.period,
time: product.time,
'sesamy:time': product.time,
'sesamy:selling-points': product.sellingPoints || [],
'sesamy:selling-point': product.sellingPoints || [],
})),
'sesamy:sesamy-item': lockedEpisodes,
item: episodes,
Expand Down
3 changes: 2 additions & 1 deletion src/sesamy-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ export function parseFeedToSesamy(feed: RssFeed) {
title: item['sesamy:title'] || item.title,
description: item['sesamy:description'] || item.description,
type: item.type,
priceOverrides: item['sesamy:price-overrides'] ?? [],
priceOverrides: item['sesamy:price-override'] ?? [],
sellingPoints: item['sesamy:price-override'] ?? [],
price: item['sesamy:price'] || item.price,
currency: item['sesamy:currency'] || item.currency,
period: item['sesamy:period'] || item.period,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,10 @@
lodash-es "^4.17.21"
read-pkg-up "^11.0.0"

"@sesamy/podcast-schemas@^1.4.2":
version "1.4.2"
resolved "https://registry.yarnpkg.com/@sesamy/podcast-schemas/-/podcast-schemas-1.4.2.tgz#cab19af7df44a5a9d5f61dbced19dcd428fd7cd9"
integrity sha512-rMXjqbNXDSpyqTjtk9AiuFWDNl6hDlnjZzryzsdFIcK7hx8yQnpEQ6wjAlLFWt2HKAaq7U8xVw2b0g5O8+9/QA==
"@sesamy/podcast-schemas@^1.4.3":
version "1.4.3"
resolved "https://registry.yarnpkg.com/@sesamy/podcast-schemas/-/podcast-schemas-1.4.3.tgz#06749db85ba80eebe68fa95ba5634d9d099c5ae2"
integrity sha512-LU4fpCmuTXHT4OKatvxu/ZI/pebhFrtO/PlG/N0g+LSWj1WS4HUJltgWCpdkugF9O5GOhmOHQsf5nr2svdbPMA==
dependencies:
zod "^3.23.8"

Expand Down

0 comments on commit 912bf6f

Please sign in to comment.