mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Pull video data from payload
This commit is contained in:
parent
bca074498e
commit
147bf74190
13 changed files with 167 additions and 65 deletions
55
helpers/build-payload.js
Normal file
55
helpers/build-payload.js
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
|
||||||
|
|
||||||
|
import { appsRelatedToVideo, videosRelatedToVideo, videosRelatedToApp } from './related.js'
|
||||||
|
// import videoList from '~/static/video-list.json'
|
||||||
|
|
||||||
|
|
||||||
|
export function buildVideoPayload ( video, allVideoAppsList, videoList ) {
|
||||||
|
// const { appsRelatedToVideo, videosRelatedToVideo } = await import('~/helpers/related.js')
|
||||||
|
// const { default: videoList } = await import('~/static/video-list.json')
|
||||||
|
|
||||||
|
// Find the video for our current page
|
||||||
|
// const video = videoList.find(video => (video.slug === slug))
|
||||||
|
|
||||||
|
// Get featured apps
|
||||||
|
const featuredApps = appsRelatedToVideo( video, allVideoAppsList )
|
||||||
|
|
||||||
|
// Get related videos
|
||||||
|
const relatedVideos = videosRelatedToVideo( video, allVideoAppsList, videoList )
|
||||||
|
|
||||||
|
return {
|
||||||
|
video,
|
||||||
|
featuredApps,
|
||||||
|
// If no related video found just get the 12 newest ones
|
||||||
|
relatedVideos: (relatedVideos.length !== 0) ? relatedVideos : videoList.slice(0, 12)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function buildAppBenchmarkPayload ( app, allVideoAppsList, videoList ) {
|
||||||
|
// const { allVideoAppsList } = await import('~/helpers/get-list.js')
|
||||||
|
|
||||||
|
// const { videosRelatedToApp } = await import('~/helpers/related.js')
|
||||||
|
|
||||||
|
// const app = allVideoAppsList.find(app => (app.slug === slug))
|
||||||
|
|
||||||
|
const submitVideoCard = {
|
||||||
|
endpoint: `https://docs.google.com/forms/d/e/1FAIpQLSeEVGM9vE7VcfLMy6fJkfU70X2VZ60rHDyhDQLtnAN4nso0WA/viewform?usp=pp_url&entry.1018125313=${app.name}`
|
||||||
|
}
|
||||||
|
|
||||||
|
// const featuredApps = []
|
||||||
|
|
||||||
|
const relatedVideos = videosRelatedToApp( app, videoList ).map(video => {
|
||||||
|
// console.log('video', video)
|
||||||
|
return {
|
||||||
|
...video,
|
||||||
|
// endpoint: `#${video.id}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
app,
|
||||||
|
allVideos: relatedVideos,
|
||||||
|
submitVideoCard
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -21,9 +21,9 @@ export const allList = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
export function makeAppSearchLinks (app) {
|
export function makeAppSearchLinks ( app, videoList ) {
|
||||||
|
|
||||||
const videos = videosRelatedToApp(app)
|
const videos = videosRelatedToApp( app, videoList )
|
||||||
|
|
||||||
// If there are no videos
|
// If there are no videos
|
||||||
// then skip
|
// then skip
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,16 @@
|
||||||
import { allVideoAppsList } from '~/helpers/get-list.js'
|
// import { allVideoAppsList } from '~/helpers/get-list.js'
|
||||||
import videoList from '~/static/video-list.json'
|
// import videoList from '~/static/video-list.json'
|
||||||
|
|
||||||
export function matchesWholeWord (needle, haystack) {
|
export function matchesWholeWord (needle, haystack) {
|
||||||
return new RegExp('\\b' + needle + '\\b').test(haystack)
|
return new RegExp('\\b' + needle + '\\b').test(haystack)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function appsRelatedToVideo ( video ) {
|
export function appsRelatedToVideo ( video, allVideoAppsList ) {
|
||||||
const relatedApps = []
|
const relatedApps = []
|
||||||
|
|
||||||
// Find the apps listed in this video
|
// Find the apps listed in this video
|
||||||
for (const app of allVideoAppsList) {
|
for (const app of allVideoAppsList) {
|
||||||
|
// console.log('video', video)
|
||||||
// Skip this app if it's not listed in the videos apps
|
// Skip this app if it's not listed in the videos apps
|
||||||
if (!video.apps.includes(app.slug)) continue
|
if (!video.apps.includes(app.slug)) continue
|
||||||
|
|
||||||
|
|
@ -20,14 +21,18 @@ export function appsRelatedToVideo ( video ) {
|
||||||
return relatedApps
|
return relatedApps
|
||||||
}
|
}
|
||||||
|
|
||||||
export function videosRelatedToVideo ( video ) {
|
export function videosRelatedToVideo ( video, allVideoAppsList, videoList ) {
|
||||||
const relatedVideos = {}
|
const relatedVideos = {}
|
||||||
|
|
||||||
const featuredApps = appsRelatedToVideo( video )
|
// console.log('videoList', videoList[0])
|
||||||
|
// console.log('allVideoAppsList', allVideoAppsList[0])
|
||||||
|
|
||||||
|
const featuredApps = appsRelatedToVideo( video, allVideoAppsList )
|
||||||
|
|
||||||
// Find other videos that also feature this video's app
|
// Find other videos that also feature this video's app
|
||||||
for (const otherVideo of videoList) {
|
for (const otherVideo of videoList) {
|
||||||
for (const app of featuredApps) {
|
for (const app of featuredApps) {
|
||||||
|
// console.log('otherVideo', otherVideo)
|
||||||
// Skip if this app is not in the other video's apps
|
// Skip if this app is not in the other video's apps
|
||||||
if (!otherVideo.apps.includes(app.slug)) continue
|
if (!otherVideo.apps.includes(app.slug)) continue
|
||||||
|
|
||||||
|
|
@ -43,7 +48,8 @@ export function videosRelatedToVideo ( video ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function videosRelatedToApp ( app ) {
|
export function videosRelatedToApp ( app, videoList ) {
|
||||||
|
|
||||||
const relatedVideos = {}
|
const relatedVideos = {}
|
||||||
|
|
||||||
// Find other videos that also feature this video's app
|
// Find other videos that also feature this video's app
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ import buildGamesList from './helpers/build-game-list.js'
|
||||||
import buildHomebrewList from './helpers/build-homebrew-list.js'
|
import buildHomebrewList from './helpers/build-homebrew-list.js'
|
||||||
import buildVideoList from './helpers/build-video-list.js'
|
import buildVideoList from './helpers/build-video-list.js'
|
||||||
|
|
||||||
|
import { buildVideoPayload, buildAppBenchmarkPayload } from './helpers/build-payload.js'
|
||||||
|
|
||||||
import { categories } from './helpers/categories.js'
|
import { categories } from './helpers/categories.js'
|
||||||
import { getAppEndpoint, getVideoEndpoint } from './helpers/app-derived.js'
|
import { getAppEndpoint, getVideoEndpoint } from './helpers/app-derived.js'
|
||||||
|
|
||||||
|
|
@ -75,12 +77,12 @@ const storeAppLists = async function (builder) {
|
||||||
] = lists
|
] = lists
|
||||||
|
|
||||||
// Build a video app list with apps and games only
|
// Build a video app list with apps and games only
|
||||||
const videoAppList = [
|
const allVideoAppsList = [
|
||||||
...appList,
|
...appList,
|
||||||
...gameList
|
...gameList
|
||||||
].flat(1)
|
].flat(1)
|
||||||
|
|
||||||
return await saveList(videoListOptions, videoAppList)
|
return await saveList(videoListOptions, allVideoAppsList)
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('Build Lists finished')
|
console.log('Build Lists finished')
|
||||||
|
|
@ -142,11 +144,29 @@ export default {
|
||||||
.then(( lists ) => {
|
.then(( lists ) => {
|
||||||
// console.log('appList', appList)
|
// console.log('appList', appList)
|
||||||
|
|
||||||
|
// Break out lists
|
||||||
|
const [
|
||||||
|
appList,
|
||||||
|
gameList,
|
||||||
|
_,//homebrewList,
|
||||||
|
|
||||||
|
videoList
|
||||||
|
] = lists
|
||||||
|
|
||||||
|
const allVideoAppsList = [
|
||||||
|
...appList,
|
||||||
|
...gameList
|
||||||
|
]
|
||||||
|
|
||||||
|
// console.log('allVideoAppsList', allVideoAppsList[0])
|
||||||
|
// console.log('videoList', videoList[0])
|
||||||
|
|
||||||
const [
|
const [
|
||||||
appRoutes,
|
appRoutes,
|
||||||
gameRoutes,
|
gameRoutes,
|
||||||
videoRoutes,
|
homebrewRoutes,
|
||||||
homebrewRoutes
|
|
||||||
|
videoRoutes
|
||||||
] = lists.map((list, listI) => {
|
] = lists.map((list, listI) => {
|
||||||
return list.map( app => {
|
return list.map( app => {
|
||||||
|
|
||||||
|
|
@ -155,7 +175,7 @@ export default {
|
||||||
if (isVideo) {
|
if (isVideo) {
|
||||||
return {
|
return {
|
||||||
route: getVideoEndpoint(app),
|
route: getVideoEndpoint(app),
|
||||||
payload: { video: app }
|
payload: buildVideoPayload(app, allVideoAppsList, videoList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -169,8 +189,11 @@ export default {
|
||||||
// Build routes for app types that support benchmark endpoints
|
// Build routes for app types that support benchmark endpoints
|
||||||
const benchmarkRoutes = [
|
const benchmarkRoutes = [
|
||||||
...appRoutes,
|
...appRoutes,
|
||||||
// ...gameRoutes,
|
...gameRoutes,
|
||||||
].flat(1).map( route => `${route}/benchmarks`)
|
].flat(1).map( ({ route, payload: { app } }) => ({
|
||||||
|
route: `${route}/benchmarks`,
|
||||||
|
payload: buildAppBenchmarkPayload( app, allVideoAppsList, videoList )
|
||||||
|
}))
|
||||||
|
|
||||||
// console.log('homebrewRoutes', homebrewRoutes)
|
// console.log('homebrewRoutes', homebrewRoutes)
|
||||||
|
|
||||||
|
|
@ -179,7 +202,8 @@ export default {
|
||||||
// payload: appList
|
// payload: appList
|
||||||
}))
|
}))
|
||||||
|
|
||||||
return [
|
// Merge endpoints into set to ensure no duplicates
|
||||||
|
const allEndpointsSet = new Set([
|
||||||
...appRoutes,
|
...appRoutes,
|
||||||
...gameRoutes,
|
...gameRoutes,
|
||||||
...homebrewRoutes,
|
...homebrewRoutes,
|
||||||
|
|
@ -188,7 +212,9 @@ export default {
|
||||||
...videoRoutes,
|
...videoRoutes,
|
||||||
...categoryRoutes,
|
...categoryRoutes,
|
||||||
...benchmarkRoutes
|
...benchmarkRoutes
|
||||||
]
|
])
|
||||||
|
|
||||||
|
return Array.from(allEndpointsSet)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -107,32 +107,32 @@ export default {
|
||||||
VideoPlayer,
|
VideoPlayer,
|
||||||
ChannelCredit
|
ChannelCredit
|
||||||
},
|
},
|
||||||
async asyncData ({ params: { slug } }) {
|
async asyncData ({ params: { slug }, payload: { app, allVideos, submitVideoCard } }) {
|
||||||
|
|
||||||
const { allVideoAppsList } = await import('~/helpers/get-list.js')
|
// const { allVideoAppsList } = await import('~/helpers/get-list.js')
|
||||||
// const { default: videoList } = await import('~/static/video-list.json')
|
// // const { default: videoList } = await import('~/static/video-list.json')
|
||||||
|
|
||||||
const { videosRelatedToApp } = await import('~/helpers/related.js')
|
// const { videosRelatedToApp } = await import('~/helpers/related.js')
|
||||||
|
|
||||||
const app = allVideoAppsList.find(app => (app.slug === slug))
|
// const app = allVideoAppsList.find(app => (app.slug === slug))
|
||||||
|
|
||||||
const submitVideoCard = {
|
// const submitVideoCard = {
|
||||||
endpoint: `https://docs.google.com/forms/d/e/1FAIpQLSeEVGM9vE7VcfLMy6fJkfU70X2VZ60rHDyhDQLtnAN4nso0WA/viewform?usp=pp_url&entry.1018125313=${app.name}`
|
// endpoint: `https://docs.google.com/forms/d/e/1FAIpQLSeEVGM9vE7VcfLMy6fJkfU70X2VZ60rHDyhDQLtnAN4nso0WA/viewform?usp=pp_url&entry.1018125313=${app.name}`
|
||||||
}
|
// }
|
||||||
|
|
||||||
// const featuredApps = []
|
// // const featuredApps = []
|
||||||
|
|
||||||
const relatedVideos = videosRelatedToApp( app ).map(video => {
|
// const relatedVideos = videosRelatedToApp( app ).map(video => {
|
||||||
// console.log('video', video)
|
// // console.log('video', video)
|
||||||
return {
|
// return {
|
||||||
...video,
|
// ...video,
|
||||||
// endpoint: `#${video.id}`
|
// // endpoint: `#${video.id}`
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
return {
|
return {
|
||||||
app,
|
app,
|
||||||
allVideos: relatedVideos,
|
allVideos,
|
||||||
submitVideoCard
|
submitVideoCard
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ export default {
|
||||||
|
|
||||||
const app = appList.find(app => (app.slug === slug))
|
const app = appList.find(app => (app.slug === slug))
|
||||||
|
|
||||||
const relatedVideos = videosRelatedToApp(app)
|
const relatedVideos = videosRelatedToApp( app, videoList )
|
||||||
|
|
||||||
// Find other videos that also feature this video's app
|
// Find other videos that also feature this video's app
|
||||||
// for (const video of videoList) {
|
// for (const video of videoList) {
|
||||||
|
|
|
||||||
|
|
@ -99,12 +99,13 @@ export default {
|
||||||
|
|
||||||
const { appsRelatedToVideo } = await import('~/helpers/related.js')
|
const { appsRelatedToVideo } = await import('~/helpers/related.js')
|
||||||
const { default: videoList } = await import('~/static/video-list.json')
|
const { default: videoList } = await import('~/static/video-list.json')
|
||||||
|
const { allVideoAppsList } = await import('~/helpers/get-list.js')
|
||||||
|
|
||||||
// Get featured apps
|
// Get featured apps
|
||||||
const featuredAppsSet = new Set()
|
const featuredAppsSet = new Set()
|
||||||
|
|
||||||
videoList.slice(0, 24).forEach( video => {
|
videoList.slice(0, 24).forEach( video => {
|
||||||
appsRelatedToVideo(video).forEach( app => {
|
appsRelatedToVideo(video, allVideoAppsList).forEach( app => {
|
||||||
featuredAppsSet.add(app)
|
featuredAppsSet.add(app)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -72,32 +72,38 @@ export default {
|
||||||
VideoPlayer,
|
VideoPlayer,
|
||||||
ChannelCredit
|
ChannelCredit
|
||||||
},
|
},
|
||||||
async asyncData ({ params: { slug } }) {
|
async asyncData ({ params: { slug }, payload: { app, allVideos } }) {
|
||||||
|
|
||||||
const { allVideoAppsList } = await import('~/helpers/get-list.js')
|
// const { allVideoAppsList } = await import('~/helpers/get-list.js')
|
||||||
// const { default: videoList } = await import('~/static/video-list.json')
|
// const { default: videoList } = await import('~/static/video-list.json')
|
||||||
|
|
||||||
const { videosRelatedToApp } = await import('~/helpers/related.js')
|
// const { videosRelatedToApp } = await import('~/helpers/related.js')
|
||||||
|
|
||||||
const app = allVideoAppsList.find(app => (app.slug === slug))
|
// const app = allVideoAppsList.find(app => (app.slug === slug))
|
||||||
|
|
||||||
// const submitVideoCard = {
|
// // const submitVideoCard = {
|
||||||
// endpoint: `https://docs.google.com/forms/d/e/1FAIpQLSeEVGM9vE7VcfLMy6fJkfU70X2VZ60rHDyhDQLtnAN4nso0WA/viewform?usp=pp_url&entry.1018125313=${app.name}`
|
// // endpoint: `https://docs.google.com/forms/d/e/1FAIpQLSeEVGM9vE7VcfLMy6fJkfU70X2VZ60rHDyhDQLtnAN4nso0WA/viewform?usp=pp_url&entry.1018125313=${app.name}`
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // const featuredApps = []
|
||||||
|
|
||||||
|
// const relatedVideos = videosRelatedToApp( app, videoList ).map(video => {
|
||||||
|
// // console.log('video', video)
|
||||||
|
// return {
|
||||||
|
// ...video,
|
||||||
|
// // endpoint: `#${video.id}`
|
||||||
// }
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
// const featuredApps = []
|
// console.log({
|
||||||
|
// app,
|
||||||
const relatedVideos = videosRelatedToApp( app ).map(video => {
|
// allVideos,
|
||||||
// console.log('video', video)
|
// // submitVideoCard
|
||||||
return {
|
// })
|
||||||
...video,
|
|
||||||
// endpoint: `#${video.id}`
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
app,
|
app,
|
||||||
allVideos: relatedVideos,
|
allVideos,
|
||||||
// submitVideoCard
|
// submitVideoCard
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ export default {
|
||||||
|
|
||||||
const app = gameList.find(app => (app.slug === slug))
|
const app = gameList.find(app => (app.slug === slug))
|
||||||
|
|
||||||
const relatedVideos = videosRelatedToApp(app)
|
const relatedVideos = videosRelatedToApp( app, videoList )
|
||||||
|
|
||||||
// Find other videos that also feature this video's app
|
// Find other videos that also feature this video's app
|
||||||
// for (const video of videoList) {
|
// for (const video of videoList) {
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ export default {
|
||||||
async asyncData () {
|
async asyncData () {
|
||||||
const { sortedAppList, allList, allVideoAppsList, makeAppSearchLinks } = await import('~/helpers/get-list.js')
|
const { sortedAppList, allList, allVideoAppsList, makeAppSearchLinks } = await import('~/helpers/get-list.js')
|
||||||
const { default: gameList } = await import('~/static/game-list.json')
|
const { default: gameList } = await import('~/static/game-list.json')
|
||||||
|
const { default: videoList } = await import('~/static/video-list.json')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// Map game list
|
// Map game list
|
||||||
|
|
@ -50,7 +51,7 @@ export default {
|
||||||
text: app.text,
|
text: app.text,
|
||||||
lastUpdated: app.lastUpdated,
|
lastUpdated: app.lastUpdated,
|
||||||
category: app.category,
|
category: app.category,
|
||||||
searchLinks: makeAppSearchLinks(app)
|
searchLinks: makeAppSearchLinks( app, videoList )
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ export default {
|
||||||
// const { default: gamelist } = await import('~/static/game-list.json')
|
// const { default: gamelist } = await import('~/static/game-list.json')
|
||||||
|
|
||||||
const { sortedAppList, allList, allVideoAppsList, makeAppSearchLinks } = await import('~/helpers/get-list.js')
|
const { sortedAppList, allList, allVideoAppsList, makeAppSearchLinks } = await import('~/helpers/get-list.js')
|
||||||
|
const { default: videoList } = await import('~/static/video-list.json')
|
||||||
|
|
||||||
const allAppSearchLinks = {}
|
const allAppSearchLinks = {}
|
||||||
|
|
||||||
|
|
@ -79,7 +80,7 @@ export default {
|
||||||
|
|
||||||
allVideoAppsList.forEach( app => {
|
allVideoAppsList.forEach( app => {
|
||||||
// Make the search links
|
// Make the search links
|
||||||
const searchLinks = makeAppSearchLinks(app)
|
const searchLinks = makeAppSearchLinks( app, videoList )
|
||||||
|
|
||||||
// If there are more than zero
|
// If there are more than zero
|
||||||
// add them to our list
|
// add them to our list
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ export default {
|
||||||
async asyncData ({ params: { slug } }) {
|
async asyncData ({ params: { slug } }) {
|
||||||
const { sortedAppList, allList, allVideoAppsList, makeAppSearchLinks } = await import('~/helpers/get-list.js')
|
const { sortedAppList, allList, allVideoAppsList, makeAppSearchLinks } = await import('~/helpers/get-list.js')
|
||||||
const { default: gameList } = await import('~/static/game-list.json')
|
const { default: gameList } = await import('~/static/game-list.json')
|
||||||
|
const { default: videoList } = await import('~/static/video-list.json')
|
||||||
|
|
||||||
const filteredList = allList.filter(app => {
|
const filteredList = allList.filter(app => {
|
||||||
return app.category.slug === slug
|
return app.category.slug === slug
|
||||||
|
|
@ -77,7 +78,7 @@ export default {
|
||||||
text: app.text,
|
text: app.text,
|
||||||
lastUpdated: app.lastUpdated,
|
lastUpdated: app.lastUpdated,
|
||||||
category: app.category,
|
category: app.category,
|
||||||
searchLinks: makeAppSearchLinks(app)
|
searchLinks: makeAppSearchLinks( app, videoList )
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,25 +86,30 @@ export default {
|
||||||
VideoPlayer,
|
VideoPlayer,
|
||||||
ChannelCredit
|
ChannelCredit
|
||||||
},
|
},
|
||||||
async asyncData ({ params: { slug } }) {
|
async asyncData ({ params: { slug }, payload: { video, featuredApps, relatedVideos } }) {
|
||||||
|
|
||||||
const { appsRelatedToVideo, videosRelatedToVideo } = await import('~/helpers/related.js')
|
// const { appsRelatedToVideo, videosRelatedToVideo } = await import('~/helpers/related.js')
|
||||||
const { default: videoList } = await import('~/static/video-list.json')
|
// const { default: videoList } = await import('~/static/video-list.json')
|
||||||
|
|
||||||
// Find the video for our current page
|
// Find the video for our current page
|
||||||
const video = videoList.find(video => (video.slug === slug))
|
// const video = videoList.find(video => (video.slug === slug))
|
||||||
|
|
||||||
// Get featured apps
|
// Get featured apps
|
||||||
const featuredApps = appsRelatedToVideo(video)
|
// const featuredApps = appsRelatedToVideo(video)
|
||||||
|
|
||||||
// Get related videos
|
// // Get related videos
|
||||||
const relatedVideos = videosRelatedToVideo(video)
|
// const relatedVideos = videosRelatedToVideo(video)
|
||||||
|
|
||||||
|
// console.log({
|
||||||
|
// video,
|
||||||
|
// featuredApps,
|
||||||
|
// relatedVideos
|
||||||
|
// })
|
||||||
|
|
||||||
return {
|
return {
|
||||||
video,
|
video,
|
||||||
featuredApps,
|
featuredApps,
|
||||||
// If no related video found just get the 12 newest ones
|
relatedVideos
|
||||||
relatedVideos: (relatedVideos.length !== 0) ? relatedVideos : videoList.slice(0, 12)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue