diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-18 11:02:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-19 09:54:35 +0200 |
commit | 098eb37797fdadd4adf660b76867da68061fd588 (patch) | |
tree | 8d7b78b31d5186eb54bfc868e55fbb6540317e4a /server/lib/client-html.ts | |
parent | df182b373fc49f20188d531494e1bff1a9ad247e (diff) | |
download | PeerTube-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.ts | 3 |
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' | |||
8 | import * as validator from 'validator' | 8 | import * as validator from 'validator' |
9 | import { VideoPrivacy } from '../../shared/models/videos' | 9 | import { VideoPrivacy } from '../../shared/models/videos' |
10 | import { readFile } from 'fs-extra' | 10 | import { readFile } from 'fs-extra' |
11 | import { getActivityStreamDuration } from '../models/video/video-format-utils' | ||
11 | 12 | ||
12 | export class ClientHtml { | 13 | export 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 |