ActivityPub-federated video streaming platform using P2P directly in your web browser
Don't move the caption if it has the right name
Chocobozzz3f6b7aa1cfa2
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.tsindex 78948ff249..337795541c 100644--- a/server/controllers/api/videos/index.ts+++ b/server/controllers/api/videos/index.ts@@ -1,5 +1,5 @@import * as express from 'express'-import { extname, join } from 'path'+import { extname } from 'path'import { VideoCreate, VideoPrivacy, VideoState, VideoUpdate } from '../../../../shared'import { getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg-utils'import { logger } from '../../../helpers/logger'@@ -65,7 +65,7 @@ import { VideoTranscodingPayload } from '../../../lib/job-queue/handlers/video-timport { Hooks } from '../../../lib/plugins/hooks'import { MVideoDetails, MVideoFullLight } from '@server/typings/models'import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'-import { getVideoFilename, getVideoFilePath } from '@server/lib/video-paths'+import { getVideoFilePath } from '@server/lib/video-paths'const auditLogger = auditLoggerFactory('videos')const videosRouter = express.Router()diff --git a/server/helpers/captions-utils.ts b/server/helpers/captions-utils.tsindex 2830ae0177..73b6d166d9 100644--- a/server/helpers/captions-utils.ts+++ b/server/helpers/captions-utils.ts@@ -12,7 +12,7 @@ async function moveAndProcessCaptionFile (physicalFile: { filename: string, pathif (physicalFile.path.endsWith('.srt')) {await convertSrtToVtt(physicalFile.path, destination)await remove(physicalFile.path)- } else { // Just move the vtt file+ } else if (physicalFile.path !== destination) { // Just move the vtt fileawait move(physicalFile.path, destination, { overwrite: true })}