1
0
Fork 0
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:
Chocobozzz 2018-09-18 11:02:51 +02:00
parent df182b373f
commit 098eb37797
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 455 additions and 403 deletions

View file

@ -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