updating thumbnail getting... some instances fuck up their proxy
This commit is contained in:
parent
7c31cac0fb
commit
fce41a6190
|
@ -7,7 +7,7 @@ const upload = require('./upload.js')
|
||||||
async function createDatabaseVideo(id, videoUrl, playlistId) {
|
async function createDatabaseVideo(id, videoUrl, playlistId) {
|
||||||
const data = await metadata.getVideoMetadata(id)
|
const data = await metadata.getVideoMetadata(id)
|
||||||
const uploaderAvatar = await upload.uploadImage((data.uploaderUrl).replace('/channel/', ''), data.uploaderAvatar)
|
const uploaderAvatar = await upload.uploadImage((data.uploaderUrl).replace('/channel/', ''), data.uploaderAvatar)
|
||||||
const thumbnailUrl = await upload.uploadImage(id, data.thumbnailUrl)
|
const thumbnailUrl = await upload.uploadImage(id, `https://i.ytimg.com/vi_webp/${id}/maxresdefault.webp`)
|
||||||
|
|
||||||
await prisma.videos.create({
|
await prisma.videos.create({
|
||||||
data: {
|
data: {
|
||||||
|
|
Loading…
Reference in New Issue