mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Reduce video.ts file size by moving some methods in other files
This commit is contained in:
parent
df182b373f
commit
098eb37797
7 changed files with 455 additions and 403 deletions
|
@ -8,6 +8,7 @@ import { VideoModel } from '../models/video/video'
|
|||
import * as validator from 'validator'
|
||||
import { VideoPrivacy } from '../../shared/models/videos'
|
||||
import { readFile } from 'fs-extra'
|
||||
import { getActivityStreamDuration } from '../models/video/video-format-utils'
|
||||
|
||||
export class ClientHtml {
|
||||
|
||||
|
@ -150,7 +151,7 @@ export class ClientHtml {
|
|||
description: videoDescriptionEscaped,
|
||||
thumbnailUrl: previewUrl,
|
||||
uploadDate: video.createdAt.toISOString(),
|
||||
duration: video.getActivityStreamDuration(),
|
||||
duration: getActivityStreamDuration(video.duration),
|
||||
contentUrl: videoUrl,
|
||||
embedUrl: embedUrl,
|
||||
interactionCount: video.views
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue