aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
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
parent2fb5b3a55aeebcc77f4b3a0c029bbf0738ef0063 (diff)
downloadPeerTube-9cc8d43e37a61709e7275c2a799bdf976dd940ca.tar.gz
PeerTube-9cc8d43e37a61709e7275c2a799bdf976dd940ca.tar.zst
PeerTube-9cc8d43e37a61709e7275c2a799bdf976dd940ca.zip
Add migrations
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/thumbnail.ts6
-rw-r--r--server/models/video/video-format-utils.ts2
2 files changed, 4 insertions, 4 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
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 877fcbc57..b947eb16f 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -328,7 +328,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
328 subtitleLanguage, 328 subtitleLanguage,
329 icon: { 329 icon: {
330 type: 'Image', 330 type: 'Image',
331 url: miniature.getUrl(), 331 url: miniature.getFileUrl(),
332 mediaType: 'image/jpeg', 332 mediaType: 'image/jpeg',
333 width: miniature.width, 333 width: miniature.width,
334 height: miniature.height 334 height: miniature.height