diff --git a/helpers/build-video-list.js b/helpers/build-video-list.js index 19c43a8..53ba4a5 100644 --- a/helpers/build-video-list.js +++ b/helpers/build-video-list.js @@ -1,4 +1,4 @@ - +import fs from 'fs-extra' import axios from 'axios' import { PromisePool } from '@supercharge/promise-pool' @@ -7,6 +7,7 @@ import { byTimeThenNull } from './sort-list.js' import { getVideoEndpoint } from './app-derived.js' import parseDate from './parse-date' import { makeSlug } from './slug.js' +import { youtubeVideoPath } from '~/helpers/api/youtube/build.js' const inTimestamps = ( name, video ) => { @@ -184,12 +185,12 @@ async function handleFetchedVideo ( fetchedVideo, videoId, applist ) { export default async function ( applist ) { - const videosJsonUrl = process.env.VIDEO_SOURCE || `${process.env.VFUNCTIONS_URL}/videos.json` + // const videosJsonUrl = process.env.VIDEO_SOURCE || `${process.env.VFUNCTIONS_URL}/videos.json` // Fetch Commits - const response = await axios.get( videosJsonUrl ) + // const response = await axios.get( videosJsonUrl ) // Extract commit from response data - const fetchedVideos = response.data + const fetchedVideos = await fs.readJson( youtubeVideoPath )//response.data const videos = []