diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-18 11:28:00 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-18 13:38:09 +0100 |
commit | 8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769 (patch) | |
tree | 863daf231cf4a66d9e5abf1cfe4fbe2b742cd856 /server/models/video/video-caption.ts | |
parent | f66db4d5c851fe87bb71cccee96926000f59a15b (diff) | |
download | PeerTube-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.ts | 4 |
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' |
18 | import { v4 as uuidv4 } from 'uuid' | 18 | import { v4 as uuidv4 } from 'uuid' |
19 | import { MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo, MVideoWithHost } from '@server/types/models' | 19 | import { MVideo, MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models' |
20 | import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' | 20 | import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' |
21 | import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' | 21 | import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' |
22 | import { logger } from '../../helpers/logger' | 22 | import { 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() |