aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-06-06 15:59:51 +0200
committerChocobozzz <me@florianbigard.com>2023-06-29 10:19:33 +0200
commitf162d32da098aa55f6de2367142faa166edb7c08 (patch)
tree31c6a96972994171853cb6c4e0b88b63241f8979 /server/models
parenta673d9e848e51186602548a621e05925663b98be (diff)
downloadPeerTube-f162d32da098aa55f6de2367142faa166edb7c08.tar.gz
PeerTube-f162d32da098aa55f6de2367142faa166edb7c08.tar.zst
PeerTube-f162d32da098aa55f6de2367142faa166edb7c08.zip
Support lazy download thumbnails
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/sql/video/shared/video-table-attributes.ts1
-rw-r--r--server/models/video/thumbnail.ts4
2 files changed, 5 insertions, 0 deletions
diff --git a/server/models/video/sql/video/shared/video-table-attributes.ts b/server/models/video/sql/video/shared/video-table-attributes.ts
index 34967cd20..e0fa9d7c1 100644
--- a/server/models/video/sql/video/shared/video-table-attributes.ts
+++ b/server/models/video/sql/video/shared/video-table-attributes.ts
@@ -60,6 +60,7 @@ export class VideoTableAttributes {
60 'height', 60 'height',
61 'width', 61 'width',
62 'fileUrl', 62 'fileUrl',
63 'onDisk',
63 'automaticallyGenerated', 64 'automaticallyGenerated',
64 'videoId', 65 'videoId',
65 'videoPlaylistId', 66 'videoPlaylistId',
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts
index a4ac581e5..2a1f6a7b4 100644
--- a/server/models/video/thumbnail.ts
+++ b/server/models/video/thumbnail.ts
@@ -69,6 +69,10 @@ export class ThumbnailModel extends Model<Partial<AttributesOnly<ThumbnailModel>
69 @Column 69 @Column
70 automaticallyGenerated: boolean 70 automaticallyGenerated: boolean
71 71
72 @AllowNull(false)
73 @Column
74 onDisk: boolean
75
72 @ForeignKey(() => VideoModel) 76 @ForeignKey(() => VideoModel)
73 @Column 77 @Column
74 videoId: number 78 videoId: number