diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-18 11:28:00 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-18 13:38:09 +0100 |
commit | 8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769 (patch) | |
tree | 863daf231cf4a66d9e5abf1cfe4fbe2b742cd856 /server/models/video/thumbnail.ts | |
parent | f66db4d5c851fe87bb71cccee96926000f59a15b (diff) | |
download | PeerTube-8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769.tar.gz PeerTube-8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769.tar.zst PeerTube-8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769.zip |
Cleanup
Diffstat (limited to 'server/models/video/thumbnail.ts')
-rw-r--r-- | server/models/video/thumbnail.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts index 319e1175a..f1187c8d6 100644 --- a/server/models/video/thumbnail.ts +++ b/server/models/video/thumbnail.ts | |||
@@ -16,7 +16,7 @@ import { | |||
16 | UpdatedAt | 16 | UpdatedAt |
17 | } from 'sequelize-typescript' | 17 | } from 'sequelize-typescript' |
18 | import { afterCommitIfTransaction } from '@server/helpers/database-utils' | 18 | import { afterCommitIfTransaction } from '@server/helpers/database-utils' |
19 | import { MThumbnail, MThumbnailVideo, MVideoWithHost } from '@server/types/models' | 19 | import { MThumbnail, MThumbnailVideo, MVideo } from '@server/types/models' |
20 | import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' | 20 | import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' |
21 | import { logger } from '../../helpers/logger' | 21 | import { logger } from '../../helpers/logger' |
22 | import { CONFIG } from '../../initializers/config' | 22 | import { CONFIG } from '../../initializers/config' |
@@ -163,7 +163,7 @@ export class ThumbnailModel extends Model { | |||
163 | return join(directory, filename) | 163 | return join(directory, filename) |
164 | } | 164 | } |
165 | 165 | ||
166 | getFileUrl (video: MVideoWithHost) { | 166 | getFileUrl (video: MVideo) { |
167 | const staticPath = ThumbnailModel.types[this.type].staticPath + this.filename | 167 | const staticPath = ThumbnailModel.types[this.type].staticPath + this.filename |
168 | 168 | ||
169 | if (video.isOwned()) return WEBSERVER.URL + staticPath | 169 | if (video.isOwned()) return WEBSERVER.URL + staticPath |