Skip to content

Commit 1d6c789

Browse files
committed
add checks for spotify and youtube
1 parent 0927f39 commit 1d6c789

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/codingcatdev/scripts/podcast-dev-to.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ for await (const file of g) {
3333
fm?.slug &&
3434
fm?.title &&
3535
fm?.cover &&
36+
fm?.spotify &&
37+
fm?.youtube &&
3638
fm?.published === 'published' &&
3739
new Date(fm?.start) < new Date() &&
3840
!fm?.devto
@@ -53,7 +55,7 @@ for await (const file of g) {
5355
organization_id: '1009',
5456
body_markdown: `Original: https://codingcat.dev/${TYPE}/${fm.slug}
5557
{% youtube ${fm?.youtube} %}
56-
{% spotify spotify:episode:${fm?.spotify.split('/').at(-1).split('?').at(0)} %}
58+
{% spotify spotify:episode:${fm?.spotify?.split('/')?.at(-1)?.split('?')?.at(0)} %}
5759
${content}`
5860
}
5961
});

0 commit comments

Comments
 (0)