diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-18 10:15:11 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-18 13:38:09 +0100 |
commit | d9a2a03196275065c28f4a0b7d4d7bc9992d77a1 (patch) | |
tree | 14579db95cd07506bf3d8e5c0af3ef1630e8700c /server/models/video/video-caption.ts | |
parent | 2451916e45420fedf556913ce121f3964c4b57d6 (diff) | |
download | PeerTube-d9a2a03196275065c28f4a0b7d4d7bc9992d77a1.tar.gz PeerTube-d9a2a03196275065c28f4a0b7d4d7bc9992d77a1.tar.zst PeerTube-d9a2a03196275065c28f4a0b7d4d7bc9992d77a1.zip |
Don't guess remote tracker URL
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 | } |