mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Use YouTube videos from local JSON
This commit is contained in:
parent
69eefc0a34
commit
ea6f8d480c
1 changed files with 5 additions and 4 deletions
|
|
@ -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 = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue