ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix audio file merge
Chocobozzzf686f5ed0aca
diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.tsindex 6654eaaee3..bc35cbe4e8 100644--- a/server/tests/api/server/stats.ts+++ b/server/tests/api/server/stats.ts@@ -26,7 +26,7 @@ describe('Test stats (excluding redundancy)', function () {}before(async function () {- this.timeout(60000)+ this.timeout(120000)servers = await createMultipleServers(3)diff --git a/shared/extra-utils/ffprobe.ts b/shared/extra-utils/ffprobe.tsindex dfacd251c6..b95202464f 100644--- a/shared/extra-utils/ffprobe.ts+++ b/shared/extra-utils/ffprobe.ts@@ -21,10 +21,19 @@ function ffprobePromise (path: string) {// Audio// ---------------------------------------------------------------------------+const imageCodecs = new Set([+ 'ansi', 'apng', 'bintext', 'bmp', 'brender_pix', 'dpx', 'exr', 'fits', 'gem', 'gif', 'jpeg2000', 'jpgls', 'mjpeg', 'mjpegb', 'msp2',+ 'pam', 'pbm', 'pcx', 'pfm', 'pgm', 'pgmyuv', 'pgx', 'photocd', 'pictor', 'png', 'ppm', 'psd', 'sgi', 'sunrast', 'svg', 'targa', 'tiff',+ 'txd', 'webp', 'xbin', 'xbm', 'xface', 'xpm', 'xwd'+])+async function isAudioFile (path: string, existingProbe?: FfprobeData) {const videoStream = await getVideoStream(path, existingProbe)+ if (!videoStream) return true++ if (imageCodecs.has(videoStream.codec_name)) return true- return !videoStream+ return false}async function hasAudioStream (path: string, existingProbe?: FfprobeData) {