1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Type toFormattedJSON

This commit is contained in:
Chocobozzz 2019-08-20 19:05:31 +02:00
parent 0283eaac2a
commit 1ca9f7c3f7
No known key found for this signature in database
GPG key ID: 583A612D890159BE
54 changed files with 401 additions and 147 deletions

View file

@ -2,9 +2,9 @@ import { join } from 'path'
import { CONFIG } from '../initializers/config'
import * as srt2vtt from 'srt-to-vtt'
import { createReadStream, createWriteStream, move, remove } from 'fs-extra'
import { MVideoCaption } from '@server/typings/models'
import { MVideoCaptionFormattable } from '@server/typings/models'
async function moveAndProcessCaptionFile (physicalFile: { filename: string, path: string }, videoCaption: MVideoCaption) {
async function moveAndProcessCaptionFile (physicalFile: { filename: string, path: string }, videoCaption: MVideoCaptionFormattable) {
const videoCaptionsDir = CONFIG.STORAGE.CAPTIONS_DIR
const destination = join(videoCaptionsDir, videoCaption.getCaptionName())