From e27ff5da6ed7bc1f56f50f862b80fb0c7d8a6d98 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Oct 2018 08:48:24 +0200 Subject: AP mimeType -> mediaType --- server/models/redundancy/video-redundancy.ts | 1 + server/models/video/video-format-utils.ts | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'server/models') diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts index 2ebe23ef1..cbfc7f7fa 100644 --- a/server/models/redundancy/video-redundancy.ts +++ b/server/models/redundancy/video-redundancy.ts @@ -408,6 +408,7 @@ export class VideoRedundancyModel extends Model { url: { type: 'Link', mimeType: VIDEO_EXT_MIMETYPE[ this.VideoFile.extname ] as any, + mediaType: VIDEO_EXT_MIMETYPE[ this.VideoFile.extname ] as any, href: this.fileUrl, height: this.VideoFile.resolution, size: this.VideoFile.size, diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 905e84449..e3f8d525b 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts @@ -208,6 +208,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject { url.push({ type: 'Link', mimeType: VIDEO_EXT_MIMETYPE[ file.extname ] as any, + mediaType: VIDEO_EXT_MIMETYPE[ file.extname ] as any, href: video.getVideoFileUrl(file, baseUrlHttp), height: file.resolution, size: file.size, @@ -217,6 +218,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject { url.push({ type: 'Link', mimeType: 'application/x-bittorrent' as 'application/x-bittorrent', + mediaType: 'application/x-bittorrent' as 'application/x-bittorrent', href: video.getTorrentUrl(file, baseUrlHttp), height: file.resolution }) @@ -224,6 +226,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject { url.push({ type: 'Link', mimeType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet', + mediaType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet', href: video.generateMagnetUri(file, baseUrlHttp, baseUrlWs), height: file.resolution }) @@ -233,6 +236,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject { url.push({ type: 'Link', mimeType: 'text/html', + mediaType: 'text/html', href: CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid }) -- cgit v1.2.3