1
0
Fork 0

Fix AP icon URL for imported videos

This commit is contained in:
Chocobozzz 2020-01-29 14:41:42 +01:00
parent 8ff604c7e3
commit 9c9a166783
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 3 additions and 3 deletions

View File

@ -126,8 +126,8 @@ export class ThumbnailModel extends Model<ThumbnailModel> {
return videoUUID + '.jpg'
}
getFileUrl () {
if (this.fileUrl) return this.fileUrl
getFileUrl (isLocal: boolean) {
if (isLocal === false) return this.fileUrl
const staticPath = ThumbnailModel.types[this.type].staticPath
return WEBSERVER.URL + staticPath + this.filename

View File

@ -338,7 +338,7 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
subtitleLanguage,
icon: {
type: 'Image',
url: miniature.getFileUrl(),
url: miniature.getFileUrl(video.isOwned()),
mediaType: 'image/jpeg',
width: miniature.width,
height: miniature.height