aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/thumbnail.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-24 10:28:57 +0200
committerChocobozzz <me@florianbigard.com>2019-04-24 16:26:22 +0200
commit9cc8d43e37a61709e7275c2a799bdf976dd940ca (patch)
tree0d8d8967d39d6ecebbc480be53c528e696ce30e7 /server/models/video/thumbnail.ts
parent2fb5b3a55aeebcc77f4b3a0c029bbf0738ef0063 (diff)
downloadPeerTube-9cc8d43e37a61709e7275c2a799bdf976dd940ca.tar.gz
PeerTube-9cc8d43e37a61709e7275c2a799bdf976dd940ca.tar.zst
PeerTube-9cc8d43e37a61709e7275c2a799bdf976dd940ca.zip
Add migrations
Diffstat (limited to 'server/models/video/thumbnail.ts')
-rw-r--r--server/models/video/thumbnail.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts
index ec945893f..206e9a3d6 100644
--- a/server/models/video/thumbnail.ts
+++ b/server/models/video/thumbnail.ts
@@ -42,7 +42,7 @@ export class ThumbnailModel extends Model<ThumbnailModel> {
42 42
43 @AllowNull(true) 43 @AllowNull(true)
44 @Column 44 @Column
45 url: string 45 fileUrl: string
46 46
47 @ForeignKey(() => VideoModel) 47 @ForeignKey(() => VideoModel)
48 @Column 48 @Column
@@ -100,8 +100,8 @@ export class ThumbnailModel extends Model<ThumbnailModel> {
100 return videoUUID + '.jpg' 100 return videoUUID + '.jpg'
101 } 101 }
102 102
103 getUrl () { 103 getFileUrl () {
104 if (this.url) return this.url 104 if (this.fileUrl) return this.fileUrl
105 105
106 const staticPath = ThumbnailModel.types[this.type].staticPath 106 const staticPath = ThumbnailModel.types[this.type].staticPath
107 return WEBSERVER.URL + staticPath + this.filename 107 return WEBSERVER.URL + staticPath + this.filename