mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
Add video aspect ratio in server
This commit is contained in:
parent
c75381208f
commit
b6b1aaa56f
52 changed files with 345 additions and 237 deletions
|
@ -23,6 +23,7 @@ import {
|
|||
replaceVideoSourceResumableValidator,
|
||||
videoSourceGetLatestValidator
|
||||
} from '../../../middlewares/index.js'
|
||||
import { buildAspectRatio } from '@peertube/peertube-core-utils'
|
||||
|
||||
const lTags = loggerTagsFactory('api', 'video')
|
||||
|
||||
|
@ -96,6 +97,7 @@ async function replaceVideoSourceResumable (req: express.Request, res: express.R
|
|||
video.state = buildNextVideoState()
|
||||
video.duration = videoPhysicalFile.duration
|
||||
video.inputFileUpdatedAt = inputFileUpdatedAt
|
||||
video.aspectRatio = buildAspectRatio({ width: videoFile.width, height: videoFile.height })
|
||||
await video.save({ transaction })
|
||||
|
||||
await autoBlacklistVideoIfNeeded({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue