aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/thumbnail.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/thumbnail.ts')
-rw-r--r--server/models/video/thumbnail.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts
index 4185ec5f2..9533c8d19 100644
--- a/server/models/video/thumbnail.ts
+++ b/server/models/video/thumbnail.ts
@@ -17,7 +17,7 @@ import {
17} from 'sequelize-typescript' 17} from 'sequelize-typescript'
18import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub' 18import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub'
19import { afterCommitIfTransaction } from '@server/helpers/database-utils' 19import { afterCommitIfTransaction } from '@server/helpers/database-utils'
20import { MThumbnail, MThumbnailVideo, MVideoAccountLight } from '@server/types/models' 20import { MThumbnail, MThumbnailVideo, MVideoWithHost } from '@server/types/models'
21import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' 21import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type'
22import { logger } from '../../helpers/logger' 22import { logger } from '../../helpers/logger'
23import { CONFIG } from '../../initializers/config' 23import { CONFIG } from '../../initializers/config'
@@ -164,7 +164,7 @@ export class ThumbnailModel extends Model {
164 return join(directory, filename) 164 return join(directory, filename)
165 } 165 }
166 166
167 getFileUrl (video: MVideoAccountLight) { 167 getFileUrl (video: MVideoWithHost) {
168 const staticPath = ThumbnailModel.types[this.type].staticPath + this.filename 168 const staticPath = ThumbnailModel.types[this.type].staticPath + this.filename
169 169
170 if (video.isOwned()) return WEBSERVER.URL + staticPath 170 if (video.isOwned()) return WEBSERVER.URL + staticPath