Fix AP icon URL for imported videos
This commit is contained in:
parent
8ff604c7e3
commit
9c9a166783
2 changed files with 3 additions and 3 deletions
|
@ -126,8 +126,8 @@ export class ThumbnailModel extends Model<ThumbnailModel> {
|
||||||
return videoUUID + '.jpg'
|
return videoUUID + '.jpg'
|
||||||
}
|
}
|
||||||
|
|
||||||
getFileUrl () {
|
getFileUrl (isLocal: boolean) {
|
||||||
if (this.fileUrl) return this.fileUrl
|
if (isLocal === false) return this.fileUrl
|
||||||
|
|
||||||
const staticPath = ThumbnailModel.types[this.type].staticPath
|
const staticPath = ThumbnailModel.types[this.type].staticPath
|
||||||
return WEBSERVER.URL + staticPath + this.filename
|
return WEBSERVER.URL + staticPath + this.filename
|
||||||
|
|
|
@ -338,7 +338,7 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
|
||||||
subtitleLanguage,
|
subtitleLanguage,
|
||||||
icon: {
|
icon: {
|
||||||
type: 'Image',
|
type: 'Image',
|
||||||
url: miniature.getFileUrl(),
|
url: miniature.getFileUrl(video.isOwned()),
|
||||||
mediaType: 'image/jpeg',
|
mediaType: 'image/jpeg',
|
||||||
width: miniature.width,
|
width: miniature.width,
|
||||||
height: miniature.height
|
height: miniature.height
|
||||||
|
|
Loading…
Reference in a new issue