1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Regenerate miniature on live save

This commit is contained in:
Chocobozzz 2020-11-06 10:57:40 +01:00 committed by Chocobozzz
parent 3bc68dfd61
commit 053aed43fb
12 changed files with 61 additions and 69 deletions

View file

@ -9,7 +9,7 @@ import { extractVideo } from '@server/helpers/video'
function getVideoFilename (videoOrPlaylist: MVideo | MStreamingPlaylistVideo, videoFile: MVideoFile) {
const video = extractVideo(videoOrPlaylist)
if (isStreamingPlaylist(videoOrPlaylist)) {
if (videoFile.isHLS()) {
return generateVideoStreamingPlaylistName(video.uuid, videoFile.resolution)
}
@ -25,7 +25,7 @@ function generateWebTorrentVideoName (uuid: string, resolution: number, extname:
}
function getVideoFilePath (videoOrPlaylist: MVideo | MStreamingPlaylistVideo, videoFile: MVideoFile, isRedundancy = false) {
if (isStreamingPlaylist(videoOrPlaylist)) {
if (videoFile.isHLS()) {
const video = extractVideo(videoOrPlaylist)
return join(getHLSDirectory(video), getVideoFilename(videoOrPlaylist, videoFile))