From d9a2a03196275065c28f4a0b7d4d7bc9992d77a1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Feb 2021 10:15:11 +0100 Subject: Don't guess remote tracker URL --- shared/models/activitypub/objects/common-objects.ts | 14 +++++++++++--- shared/models/activitypub/objects/video-torrent-object.ts | 3 +++ 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'shared/models') diff --git a/shared/models/activitypub/objects/common-objects.ts b/shared/models/activitypub/objects/common-objects.ts index 43e8ea067..76f0e3bcf 100644 --- a/shared/models/activitypub/objects/common-objects.ts +++ b/shared/models/activitypub/objects/common-objects.ts @@ -30,7 +30,7 @@ export type ActivityPlaylistSegmentHashesObject = { href: string } -export type ActivityVideoFileMetadataObject = { +export type ActivityVideoFileMetadataUrlObject = { type: 'Link' rel: [ 'metadata', any ] mediaType: 'application/json' @@ -39,6 +39,13 @@ export type ActivityVideoFileMetadataObject = { fps: number } +export type ActivityTrackerUrlObject = { + type: 'Link' + rel: [ 'tracker', 'websocket' | 'http' ] + name: string + href: string +} + export type ActivityPlaylistInfohashesObject = { type: 'Infohash' name: string @@ -96,7 +103,7 @@ export type ActivityTagObject = | ActivityMentionObject | ActivityBitTorrentUrlObject | ActivityMagnetUrlObject - | ActivityVideoFileMetadataObject + | ActivityVideoFileMetadataUrlObject export type ActivityUrlObject = ActivityVideoUrlObject @@ -104,7 +111,8 @@ export type ActivityUrlObject = | ActivityBitTorrentUrlObject | ActivityMagnetUrlObject | ActivityHtmlUrlObject - | ActivityVideoFileMetadataObject + | ActivityVideoFileMetadataUrlObject + | ActivityTrackerUrlObject export interface ActivityPubAttributedTo { type: 'Group' | 'Person' diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts index 6d18e93d5..bfbcfb1a5 100644 --- a/shared/models/activitypub/objects/video-torrent-object.ts +++ b/shared/models/activitypub/objects/video-torrent-object.ts @@ -40,11 +40,14 @@ export interface VideoObject { icon: ActivityIconObject[] url: ActivityUrlObject[] + likes: string dislikes: string shares: string comments: string + attributedTo: ActivityPubAttributedTo[] + to?: string[] cc?: string[] } -- cgit v1.2.3