Clip and Video share VideoFile

This commit is contained in:
Carl Pearson
2024-11-05 05:39:49 -07:00
parent 41d69c2fa4
commit ad7445b6f6
3 changed files with 27 additions and 13 deletions

View File

@@ -654,16 +654,18 @@ func startDownload(originalID uint, videoURL string, audioOnly bool) {
}
video := media.Video{
MediaFile: media.MediaFile{
Length: mediaMeta.length,
Size: mediaMeta.size,
Filename: dlFilename,
VideoFile: media.VideoFile{
MediaFile: media.MediaFile{
Length: mediaMeta.length,
Size: mediaMeta.size,
Filename: dlFilename,
},
FPS: mediaMeta.fps,
Width: mediaMeta.width,
Height: mediaMeta.height,
},
OriginalID: originalID,
Source: "original",
FPS: mediaMeta.fps,
Width: mediaMeta.width,
Height: mediaMeta.height,
}
log.Debugln("create Video", video)
if db.Create(&video).Error != nil {