From 784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jul 2023 09:21:13 +0200 Subject: Prefer web videos in favour of webtorrent --- server/lib/runners/job-handlers/shared/vod-helpers.ts | 4 ++-- .../runners/job-handlers/vod-audio-merge-transcoding-job-handler.ts | 2 +- server/lib/runners/job-handlers/vod-hls-transcoding-job-handler.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'server/lib/runners') diff --git a/server/lib/runners/job-handlers/shared/vod-helpers.ts b/server/lib/runners/job-handlers/shared/vod-helpers.ts index 93ae89ff8..1a2ad02ca 100644 --- a/server/lib/runners/job-handlers/shared/vod-helpers.ts +++ b/server/lib/runners/job-handlers/shared/vod-helpers.ts @@ -2,7 +2,7 @@ import { move } from 'fs-extra' import { dirname, join } from 'path' import { logger, LoggerTagsFn } from '@server/helpers/logger' import { onTranscodingEnded } from '@server/lib/transcoding/ended-transcoding' -import { onWebTorrentVideoFileTranscoding } from '@server/lib/transcoding/web-transcoding' +import { onWebVideoFileTranscoding } from '@server/lib/transcoding/web-transcoding' import { buildNewFile } from '@server/lib/video-file' import { VideoModel } from '@server/models/video/video' import { MVideoFullLight } from '@server/types/models' @@ -22,7 +22,7 @@ export async function onVODWebVideoOrAudioMergeTranscodingJob (options: { const newVideoFilePath = join(dirname(videoFilePath), videoFile.filename) await move(videoFilePath, newVideoFilePath) - await onWebTorrentVideoFileTranscoding({ + await onWebVideoFileTranscoding({ video, videoFile, videoOutputPath: newVideoFilePath diff --git a/server/lib/runners/job-handlers/vod-audio-merge-transcoding-job-handler.ts b/server/lib/runners/job-handlers/vod-audio-merge-transcoding-job-handler.ts index 5f247d792..905007db9 100644 --- a/server/lib/runners/job-handlers/vod-audio-merge-transcoding-job-handler.ts +++ b/server/lib/runners/job-handlers/vod-audio-merge-transcoding-job-handler.ts @@ -83,7 +83,7 @@ export class VODAudioMergeTranscodingJobHandler extends AbstractVODTranscodingJo // We can remove the old audio file const oldAudioFile = video.VideoFiles[0] - await video.removeWebTorrentFile(oldAudioFile) + await video.removeWebVideoFile(oldAudioFile) await oldAudioFile.destroy() video.VideoFiles = [] diff --git a/server/lib/runners/job-handlers/vod-hls-transcoding-job-handler.ts b/server/lib/runners/job-handlers/vod-hls-transcoding-job-handler.ts index cc94bcbda..02845952c 100644 --- a/server/lib/runners/job-handlers/vod-hls-transcoding-job-handler.ts +++ b/server/lib/runners/job-handlers/vod-hls-transcoding-job-handler.ts @@ -5,7 +5,7 @@ import { renameVideoFileInPlaylist } from '@server/lib/hls' import { getHlsResolutionPlaylistFilename } from '@server/lib/paths' import { onTranscodingEnded } from '@server/lib/transcoding/ended-transcoding' import { onHLSVideoFileTranscoding } from '@server/lib/transcoding/hls-transcoding' -import { buildNewFile, removeAllWebTorrentFiles } from '@server/lib/video-file' +import { buildNewFile, removeAllWebVideoFiles } from '@server/lib/video-file' import { VideoJobInfoModel } from '@server/models/video/video-job-info' import { MVideo } from '@server/types/models' import { MRunnerJob } from '@server/types/models/runners' @@ -106,7 +106,7 @@ export class VODHLSTranscodingJobHandler extends AbstractVODTranscodingJobHandle if (privatePayload.deleteWebVideoFiles === true) { logger.info('Removing web video files of %s now we have a HLS version of it.', video.uuid, this.lTags(video.uuid)) - await removeAllWebTorrentFiles(video) + await removeAllWebVideoFiles(video) } logger.info('Runner VOD HLS job %s for %s ended.', runnerJob.uuid, video.uuid, this.lTags(runnerJob.uuid, video.uuid)) -- cgit v1.2.3