mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Add config option to keep original video file (basic first version) (#6157)
* testing not removing old file and adding columb to db * implement feature * remove unnecessary config changes * use only keptOriginalFileName, change keptOriginalFileName to keptOriginalFilename for consistency with with videoFile table, slight refactor with basename() * save original video files to dedicated directory original-video-files * begin implementing object storage (bucket) support --------- Co-authored-by: chagai.friedlander <chagai.friedlander@fairkom.eu> Co-authored-by: Ian <ian.kraft@hotmail.com> Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
parent
ae31e90c30
commit
e57c3024f4
75 changed files with 1653 additions and 801 deletions
|
@ -100,7 +100,7 @@ function generateLocalVideoMiniature (options: {
|
|||
video: MVideoThumbnail
|
||||
videoFile: MVideoFile
|
||||
types: ThumbnailType_Type[]
|
||||
ffprobe?: FfprobeData
|
||||
ffprobe: FfprobeData
|
||||
}): Promise<MThumbnail[]> {
|
||||
const { video, videoFile, types, ffprobe } = options
|
||||
|
||||
|
@ -223,7 +223,7 @@ function updateRemoteVideoThumbnail (options: {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function regenerateMiniaturesIfNeeded (video: MVideoWithAllFiles) {
|
||||
async function regenerateMiniaturesIfNeeded (video: MVideoWithAllFiles, ffprobe: FfprobeData) {
|
||||
const thumbnailsToGenerate: ThumbnailType_Type[] = []
|
||||
|
||||
if (video.getMiniature().automaticallyGenerated === true) {
|
||||
|
@ -237,6 +237,7 @@ async function regenerateMiniaturesIfNeeded (video: MVideoWithAllFiles) {
|
|||
const models = await generateLocalVideoMiniature({
|
||||
video,
|
||||
videoFile: video.getMaxQualityFile(),
|
||||
ffprobe,
|
||||
types: thumbnailsToGenerate
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue