Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix AP icon URL for imported videos

Chocobozzz9c9a16678354
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts
index e68a6711fe..3b011b1d28 100644
--- a/server/models/video/thumbnail.ts
+++ b/server/models/video/thumbnail.ts
@@ -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
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 9fed2d49da..2aa5b8677c 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -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