aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-18 08:48:24 +0200
committerChocobozzz <me@florianbigard.com>2018-10-18 10:44:15 +0200
commite27ff5da6ed7bc1f56f50f862b80fb0c7d8a6d98 (patch)
tree81b45623621952bd75efa3f701e5a8bd37a50f03 /server/models
parent244b4ae3973bc1511464a08158a123767f83179c (diff)
downloadPeerTube-e27ff5da6ed7bc1f56f50f862b80fb0c7d8a6d98.tar.gz
PeerTube-e27ff5da6ed7bc1f56f50f862b80fb0c7d8a6d98.tar.zst
PeerTube-e27ff5da6ed7bc1f56f50f862b80fb0c7d8a6d98.zip
AP mimeType -> mediaType
Diffstat (limited to 'server/models')
-rw-r--r--server/models/redundancy/video-redundancy.ts1
-rw-r--r--server/models/video/video-format-utils.ts4
2 files changed, 5 insertions, 0 deletions
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<VideoRedundancyModel> {
408 url: { 408 url: {
409 type: 'Link', 409 type: 'Link',
410 mimeType: VIDEO_EXT_MIMETYPE[ this.VideoFile.extname ] as any, 410 mimeType: VIDEO_EXT_MIMETYPE[ this.VideoFile.extname ] as any,
411 mediaType: VIDEO_EXT_MIMETYPE[ this.VideoFile.extname ] as any,
411 href: this.fileUrl, 412 href: this.fileUrl,
412 height: this.VideoFile.resolution, 413 height: this.VideoFile.resolution,
413 size: this.VideoFile.size, 414 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 {
208 url.push({ 208 url.push({
209 type: 'Link', 209 type: 'Link',
210 mimeType: VIDEO_EXT_MIMETYPE[ file.extname ] as any, 210 mimeType: VIDEO_EXT_MIMETYPE[ file.extname ] as any,
211 mediaType: VIDEO_EXT_MIMETYPE[ file.extname ] as any,
211 href: video.getVideoFileUrl(file, baseUrlHttp), 212 href: video.getVideoFileUrl(file, baseUrlHttp),
212 height: file.resolution, 213 height: file.resolution,
213 size: file.size, 214 size: file.size,
@@ -217,6 +218,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
217 url.push({ 218 url.push({
218 type: 'Link', 219 type: 'Link',
219 mimeType: 'application/x-bittorrent' as 'application/x-bittorrent', 220 mimeType: 'application/x-bittorrent' as 'application/x-bittorrent',
221 mediaType: 'application/x-bittorrent' as 'application/x-bittorrent',
220 href: video.getTorrentUrl(file, baseUrlHttp), 222 href: video.getTorrentUrl(file, baseUrlHttp),
221 height: file.resolution 223 height: file.resolution
222 }) 224 })
@@ -224,6 +226,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
224 url.push({ 226 url.push({
225 type: 'Link', 227 type: 'Link',
226 mimeType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet', 228 mimeType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet',
229 mediaType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet',
227 href: video.generateMagnetUri(file, baseUrlHttp, baseUrlWs), 230 href: video.generateMagnetUri(file, baseUrlHttp, baseUrlWs),
228 height: file.resolution 231 height: file.resolution
229 }) 232 })
@@ -233,6 +236,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
233 url.push({ 236 url.push({
234 type: 'Link', 237 type: 'Link',
235 mimeType: 'text/html', 238 mimeType: 'text/html',
239 mediaType: 'text/html',
236 href: CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid 240 href: CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid
237 }) 241 })
238 242