1
Fork 0
mirror of https://github.com/diced/zipline.git synced 2025-04-04 23:21:17 -05:00

fix: unecessary stuff

This commit is contained in:
diced 2023-05-29 17:55:39 -07:00
parent e92d78f671
commit 88fdb2fcc1
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1
3 changed files with 10 additions and 22 deletions

View file

@ -1,5 +1,3 @@
-- AlterTable
ALTER TABLE "File" ADD COLUMN "thumbnailId" INTEGER;
-- CreateTable
CREATE TABLE "Thumbnail" (

View file

@ -1,8 +0,0 @@
/*
Warnings:
- You are about to drop the column `thumbnailId` on the `File` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "File" DROP COLUMN "thumbnailId";

View file

@ -1,16 +1,14 @@
import Logger from 'lib/logger';
import { isMainThread, workerData } from 'worker_threads';
// import ffmpeg from 'ffmpeg-static';
import prisma from 'lib/prisma';
import datasource from 'lib/datasource';
import config from 'lib/config';
import { spawn } from 'child_process';
import { join } from 'path';
import { createWriteStream } from 'fs';
import { File } from '@prisma/client';
import { spawn } from 'child_process';
import ffmpeg from 'ffmpeg-static';
import { createWriteStream } from 'fs';
import { rm } from 'fs/promises';
import config from 'lib/config';
import datasource from 'lib/datasource';
import Logger from 'lib/logger';
import prisma from 'lib/prisma';
import { join } from 'path';
import { isMainThread, workerData } from 'worker_threads';
const { id } = workerData as { id: number };
@ -26,12 +24,12 @@ async function loadThumbnail(path) {
const child = spawn(ffmpeg, args, { stdio: ['ignore', 'pipe', 'ignore'] });
const data = await new Promise((resolve, reject) => {
const data: Promise<Buffer> = new Promise((resolve, reject) => {
child.stdout.once('data', resolve);
child.once('error', reject);
});
return data as unknown as Buffer;
return data;
}
async function loadFileTmp(file: File) {