aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-caption.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-caption.ts')
-rw-r--r--server/models/video/video-caption.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/server/models/video/video-caption.ts b/server/models/video/video-caption.ts
index 71b067335..0bbe9b752 100644
--- a/server/models/video/video-caption.ts
+++ b/server/models/video/video-caption.ts
@@ -16,7 +16,6 @@ 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 { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub'
20import { MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo, MVideoWithHost } from '@server/types/models' 19import { MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo, MVideoWithHost } from '@server/types/models'
21import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' 20import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model'
22import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' 21import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions'
@@ -208,9 +207,7 @@ export class VideoCaptionModel extends Model {
208 if (!this.Video) this.Video = video as VideoModel 207 if (!this.Video) this.Video = video as VideoModel
209 208
210 if (video.isOwned()) return WEBSERVER.URL + this.getCaptionStaticPath() 209 if (video.isOwned()) return WEBSERVER.URL + this.getCaptionStaticPath()
211 if (this.fileUrl) return this.fileUrl
212 210
213 // Fallback if we don't have a file URL 211 return this.fileUrl
214 return buildRemoteVideoBaseUrl(video, this.getCaptionStaticPath())
215 } 212 }
216} 213}