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/thumbnail.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/thumbnail.ts')
-rw-r--r-- | server/models/video/thumbnail.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts index 9533c8d19..319e1175a 100644 --- a/server/models/video/thumbnail.ts +++ b/server/models/video/thumbnail.ts | |||
@@ -15,7 +15,6 @@ import { | |||
15 | Table, | 15 | Table, |
16 | UpdatedAt | 16 | UpdatedAt |
17 | } from 'sequelize-typescript' | 17 | } from 'sequelize-typescript' |
18 | import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub' | ||
19 | import { afterCommitIfTransaction } from '@server/helpers/database-utils' | 18 | import { afterCommitIfTransaction } from '@server/helpers/database-utils' |
20 | import { MThumbnail, MThumbnailVideo, MVideoWithHost } from '@server/types/models' | 19 | import { MThumbnail, MThumbnailVideo, MVideoWithHost } from '@server/types/models' |
21 | import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' | 20 | import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' |
@@ -168,10 +167,8 @@ export class ThumbnailModel extends Model { | |||
168 | const staticPath = ThumbnailModel.types[this.type].staticPath + this.filename | 167 | const staticPath = ThumbnailModel.types[this.type].staticPath + this.filename |
169 | 168 | ||
170 | if (video.isOwned()) return WEBSERVER.URL + staticPath | 169 | if (video.isOwned()) return WEBSERVER.URL + staticPath |
171 | if (this.fileUrl) return this.fileUrl | ||
172 | 170 | ||
173 | // Fallback if we don't have a file URL | 171 | return this.fileUrl |
174 | return buildRemoteVideoBaseUrl(video, staticPath) | ||
175 | } | 172 | } |
176 | 173 | ||
177 | getPath () { | 174 | getPath () { |