mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Store apps related to video as app links
This commit is contained in:
parent
d755c6485d
commit
e2b9ea8fef
1 changed files with 6 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue