diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-11 09:21:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-11 09:21:13 +0200 |
commit | 784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428 (patch) | |
tree | 29c46cfd6344065eb805680ed080cb05592ee1d4 /server/lib/runners | |
parent | c3030e944ad03c7fd7b5d668a2d88ff03e4cdf19 (diff) | |
download | PeerTube-784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428.tar.gz PeerTube-784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428.tar.zst PeerTube-784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428.zip |
Prefer web videos in favour of webtorrent
Diffstat (limited to 'server/lib/runners')
3 files changed, 5 insertions, 5 deletions
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' | |||
2 | import { dirname, join } from 'path' | 2 | import { dirname, join } from 'path' |
3 | import { logger, LoggerTagsFn } from '@server/helpers/logger' | 3 | import { logger, LoggerTagsFn } from '@server/helpers/logger' |
4 | import { onTranscodingEnded } from '@server/lib/transcoding/ended-transcoding' | 4 | import { onTranscodingEnded } from '@server/lib/transcoding/ended-transcoding' |
5 | import { onWebTorrentVideoFileTranscoding } from '@server/lib/transcoding/web-transcoding' | 5 | import { onWebVideoFileTranscoding } from '@server/lib/transcoding/web-transcoding' |
6 | import { buildNewFile } from '@server/lib/video-file' | 6 | import { buildNewFile } from '@server/lib/video-file' |
7 | import { VideoModel } from '@server/models/video/video' | 7 | import { VideoModel } from '@server/models/video/video' |
8 | import { MVideoFullLight } from '@server/types/models' | 8 | import { MVideoFullLight } from '@server/types/models' |
@@ -22,7 +22,7 @@ export async function onVODWebVideoOrAudioMergeTranscodingJob (options: { | |||
22 | const newVideoFilePath = join(dirname(videoFilePath), videoFile.filename) | 22 | const newVideoFilePath = join(dirname(videoFilePath), videoFile.filename) |
23 | await move(videoFilePath, newVideoFilePath) | 23 | await move(videoFilePath, newVideoFilePath) |
24 | 24 | ||
25 | await onWebTorrentVideoFileTranscoding({ | 25 | await onWebVideoFileTranscoding({ |
26 | video, | 26 | video, |
27 | videoFile, | 27 | videoFile, |
28 | videoOutputPath: newVideoFilePath | 28 | 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 | |||
83 | 83 | ||
84 | // We can remove the old audio file | 84 | // We can remove the old audio file |
85 | const oldAudioFile = video.VideoFiles[0] | 85 | const oldAudioFile = video.VideoFiles[0] |
86 | await video.removeWebTorrentFile(oldAudioFile) | 86 | await video.removeWebVideoFile(oldAudioFile) |
87 | await oldAudioFile.destroy() | 87 | await oldAudioFile.destroy() |
88 | video.VideoFiles = [] | 88 | video.VideoFiles = [] |
89 | 89 | ||
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' | |||
5 | import { getHlsResolutionPlaylistFilename } from '@server/lib/paths' | 5 | import { getHlsResolutionPlaylistFilename } from '@server/lib/paths' |
6 | import { onTranscodingEnded } from '@server/lib/transcoding/ended-transcoding' | 6 | import { onTranscodingEnded } from '@server/lib/transcoding/ended-transcoding' |
7 | import { onHLSVideoFileTranscoding } from '@server/lib/transcoding/hls-transcoding' | 7 | import { onHLSVideoFileTranscoding } from '@server/lib/transcoding/hls-transcoding' |
8 | import { buildNewFile, removeAllWebTorrentFiles } from '@server/lib/video-file' | 8 | import { buildNewFile, removeAllWebVideoFiles } from '@server/lib/video-file' |
9 | import { VideoJobInfoModel } from '@server/models/video/video-job-info' | 9 | import { VideoJobInfoModel } from '@server/models/video/video-job-info' |
10 | import { MVideo } from '@server/types/models' | 10 | import { MVideo } from '@server/types/models' |
11 | import { MRunnerJob } from '@server/types/models/runners' | 11 | import { MRunnerJob } from '@server/types/models/runners' |
@@ -106,7 +106,7 @@ export class VODHLSTranscodingJobHandler extends AbstractVODTranscodingJobHandle | |||
106 | if (privatePayload.deleteWebVideoFiles === true) { | 106 | if (privatePayload.deleteWebVideoFiles === true) { |
107 | logger.info('Removing web video files of %s now we have a HLS version of it.', video.uuid, this.lTags(video.uuid)) | 107 | logger.info('Removing web video files of %s now we have a HLS version of it.', video.uuid, this.lTags(video.uuid)) |
108 | 108 | ||
109 | await removeAllWebTorrentFiles(video) | 109 | await removeAllWebVideoFiles(video) |
110 | } | 110 | } |
111 | 111 | ||
112 | logger.info('Runner VOD HLS job %s for %s ended.', runnerJob.uuid, video.uuid, this.lTags(runnerJob.uuid, video.uuid)) | 112 | logger.info('Runner VOD HLS job %s for %s ended.', runnerJob.uuid, video.uuid, this.lTags(runnerJob.uuid, video.uuid)) |