aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/client-html.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-18 11:02:51 +0200
committerChocobozzz <me@florianbigard.com>2018-09-19 09:54:35 +0200
commit098eb37797fdadd4adf660b76867da68061fd588 (patch)
tree8d7b78b31d5186eb54bfc868e55fbb6540317e4a /server/lib/client-html.ts
parentdf182b373fc49f20188d531494e1bff1a9ad247e (diff)
downloadPeerTube-098eb37797fdadd4adf660b76867da68061fd588.tar.gz
PeerTube-098eb37797fdadd4adf660b76867da68061fd588.tar.zst
PeerTube-098eb37797fdadd4adf660b76867da68061fd588.zip
Reduce video.ts file size by moving some methods in other files
Diffstat (limited to 'server/lib/client-html.ts')
-rw-r--r--server/lib/client-html.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index a69e09c32..b1088c096 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -8,6 +8,7 @@ import { VideoModel } from '../models/video/video'
8import * as validator from 'validator' 8import * as validator from 'validator'
9import { VideoPrivacy } from '../../shared/models/videos' 9import { VideoPrivacy } from '../../shared/models/videos'
10import { readFile } from 'fs-extra' 10import { readFile } from 'fs-extra'
11import { getActivityStreamDuration } from '../models/video/video-format-utils'
11 12
12export class ClientHtml { 13export class ClientHtml {
13 14
@@ -150,7 +151,7 @@ export class ClientHtml {
150 description: videoDescriptionEscaped, 151 description: videoDescriptionEscaped,
151 thumbnailUrl: previewUrl, 152 thumbnailUrl: previewUrl,
152 uploadDate: video.createdAt.toISOString(), 153 uploadDate: video.createdAt.toISOString(),
153 duration: video.getActivityStreamDuration(), 154 duration: getActivityStreamDuration(video.duration),
154 contentUrl: videoUrl, 155 contentUrl: videoUrl,
155 embedUrl: embedUrl, 156 embedUrl: embedUrl,
156 interactionCount: video.views 157 interactionCount: video.views