From 9cc8d43e37a61709e7275c2a799bdf976dd940ca Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Apr 2019 10:28:57 +0200 Subject: Add migrations --- server/models/video/thumbnail.ts | 6 +++--- server/models/video/video-format-utils.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/models/video') 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 { @AllowNull(true) @Column - url: string + fileUrl: string @ForeignKey(() => VideoModel) @Column @@ -100,8 +100,8 @@ export class ThumbnailModel extends Model { return videoUUID + '.jpg' } - getUrl () { - if (this.url) return this.url + getFileUrl () { + if (this.fileUrl) return this.fileUrl const staticPath = ThumbnailModel.types[this.type].staticPath 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 { subtitleLanguage, icon: { type: 'Image', - url: miniature.getUrl(), + url: miniature.getFileUrl(), mediaType: 'image/jpeg', width: miniature.width, height: miniature.height -- cgit v1.2.3