From e2b9ea8fefbc0bc6f7755f987ed9dc26f8c1cd1c Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Thu, 9 Jun 2022 13:21:05 -0500 Subject: [PATCH] Store apps related to video as app links --- helpers/build-video-list.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/helpers/build-video-list.js b/helpers/build-video-list.js index 1ea7991..a3df213 100644 --- a/helpers/build-video-list.js +++ b/helpers/build-video-list.js @@ -140,13 +140,16 @@ async function handleFetchedVideo ( fetchedVideo, videoId, applist ) { // Build video slug const slug = makeSlug( `${fetchedVideo.title}-i-${videoId}` ) - const apps = [] + const appLinks = [] // Generate new tag set based on api data const tags = generateVideoTags(fetchedVideo) for ( const app of applist ) { if (videoFeaturesApp(app, fetchedVideo)) { - apps.push(app.slug) + appLinks.push({ + name: app.name, + endpoint: app.endpoint + }) tags.add(app.category.slug) } @@ -165,7 +168,7 @@ async function handleFetchedVideo ( fetchedVideo, videoId, applist ) { name: fetchedVideo.title, id: videoId, lastUpdated, - apps, + appLinks, slug, channel: { name: fetchedVideo.rawData.snippet.channelTitle,