aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-caption.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-18 11:28:00 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-02-18 13:38:09 +0100
commit8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769 (patch)
tree863daf231cf4a66d9e5abf1cfe4fbe2b742cd856 /server/models/video/video-caption.ts
parentf66db4d5c851fe87bb71cccee96926000f59a15b (diff)
downloadPeerTube-8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769.tar.gz
PeerTube-8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769.tar.zst
PeerTube-8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769.zip
Cleanup
Diffstat (limited to 'server/models/video/video-caption.ts')
-rw-r--r--server/models/video/video-caption.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/video-caption.ts b/server/models/video/video-caption.ts
index 0bbe9b752..bfdec73e9 100644
--- a/server/models/video/video-caption.ts
+++ b/server/models/video/video-caption.ts
@@ -16,7 +16,7 @@ import {
16 UpdatedAt 16 UpdatedAt
17} from 'sequelize-typescript' 17} from 'sequelize-typescript'
18import { v4 as uuidv4 } from 'uuid' 18import { v4 as uuidv4 } from 'uuid'
19import { MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo, MVideoWithHost } from '@server/types/models' 19import { MVideo, MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models'
20import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' 20import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model'
21import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' 21import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions'
22import { logger } from '../../helpers/logger' 22import { logger } from '../../helpers/logger'
@@ -203,7 +203,7 @@ export class VideoCaptionModel extends Model {
203 return remove(CONFIG.STORAGE.CAPTIONS_DIR + this.filename) 203 return remove(CONFIG.STORAGE.CAPTIONS_DIR + this.filename)
204 } 204 }
205 205
206 getFileUrl (video: MVideoWithHost) { 206 getFileUrl (video: MVideo) {
207 if (!this.Video) this.Video = video as VideoModel 207 if (!this.Video) this.Video = video as VideoModel
208 208
209 if (video.isOwned()) return WEBSERVER.URL + this.getCaptionStaticPath() 209 if (video.isOwned()) return WEBSERVER.URL + this.getCaptionStaticPath()