diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-12 16:23:19 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-16 10:36:44 +0100 |
commit | a8b1b40485145ac1eae513a661d7dd6e0986ce96 (patch) | |
tree | 79436a042f1ed350278dd69e365f37ee623aa539 /server/types/models | |
parent | 0472d474fdadd05211fb4f90ce275801db515d08 (diff) | |
download | PeerTube-a8b1b40485145ac1eae513a661d7dd6e0986ce96.tar.gz PeerTube-a8b1b40485145ac1eae513a661d7dd6e0986ce96.tar.zst PeerTube-a8b1b40485145ac1eae513a661d7dd6e0986ce96.zip |
Generate a name for thumbnails
Allows aggressive caching
Diffstat (limited to 'server/types/models')
-rw-r--r-- | server/types/models/video/thumbnail.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/types/models/video/thumbnail.ts b/server/types/models/video/thumbnail.ts index c03ba55ac..81a29e062 100644 --- a/server/types/models/video/thumbnail.ts +++ b/server/types/models/video/thumbnail.ts | |||
@@ -1,3 +1,15 @@ | |||
1 | import { PickWith } from '@shared/core-utils' | ||
1 | import { ThumbnailModel } from '../../../models/video/thumbnail' | 2 | import { ThumbnailModel } from '../../../models/video/thumbnail' |
3 | import { MVideo } from './video' | ||
4 | |||
5 | type Use<K extends keyof ThumbnailModel, M> = PickWith<ThumbnailModel, K, M> | ||
6 | |||
7 | // ############################################################################ | ||
2 | 8 | ||
3 | export type MThumbnail = Omit<ThumbnailModel, 'Video' | 'VideoPlaylist'> | 9 | export type MThumbnail = Omit<ThumbnailModel, 'Video' | 'VideoPlaylist'> |
10 | |||
11 | // ############################################################################ | ||
12 | |||
13 | export type MThumbnailVideo = | ||
14 | MThumbnail & | ||
15 | Use<'Video', MVideo> | ||