diff options
Diffstat (limited to 'server/models/video/video-caption.ts')
-rw-r--r-- | server/models/video/video-caption.ts | 5 |
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' |
18 | import { v4 as uuidv4 } from 'uuid' | 18 | import { v4 as uuidv4 } from 'uuid' |
19 | import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub' | ||
20 | import { MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo, MVideoWithHost } from '@server/types/models' | 19 | import { MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo, MVideoWithHost } from '@server/types/models' |
21 | import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' | 20 | import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' |
22 | import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' | 21 | import { 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 | } |