aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/activitypub.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-26 10:55:40 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-03-18 11:17:59 +0100
commit418d092afa81e2c8fe8ac6838fc4b5eb0af6a782 (patch)
tree5e9bc5604fd5d66a006cfebb7acdbdd5486e5d1e /server/helpers/activitypub.ts
parentb427febb4d5cebf03b815bca2c59af6e82491569 (diff)
downloadPeerTube-418d092afa81e2c8fe8ac6838fc4b5eb0af6a782.tar.gz
PeerTube-418d092afa81e2c8fe8ac6838fc4b5eb0af6a782.tar.zst
PeerTube-418d092afa81e2c8fe8ac6838fc4b5eb0af6a782.zip
Playlist server API
Diffstat (limited to 'server/helpers/activitypub.ts')
-rw-r--r--server/helpers/activitypub.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts
index e850efe13..31c6187d1 100644
--- a/server/helpers/activitypub.ts
+++ b/server/helpers/activitypub.ts
@@ -28,6 +28,9 @@ function activityPubContextify <T> (data: T) {
28 state: 'sc:Number', 28 state: 'sc:Number',
29 size: 'sc:Number', 29 size: 'sc:Number',
30 fps: 'sc:Number', 30 fps: 'sc:Number',
31 startTimestamp: 'sc:Number',
32 stopTimestamp: 'sc:Number',
33 position: 'sc:Number',
31 commentsEnabled: 'sc:Boolean', 34 commentsEnabled: 'sc:Boolean',
32 downloadEnabled: 'sc:Boolean', 35 downloadEnabled: 'sc:Boolean',
33 waitTranscoding: 'sc:Boolean', 36 waitTranscoding: 'sc:Boolean',
@@ -46,6 +49,10 @@ function activityPubContextify <T> (data: T) {
46 '@id': 'as:dislikes', 49 '@id': 'as:dislikes',
47 '@type': '@id' 50 '@type': '@id'
48 }, 51 },
52 playlists: {
53 '@id': 'pt:playlists',
54 '@type': '@id'
55 },
49 shares: { 56 shares: {
50 '@id': 'as:shares', 57 '@id': 'as:shares',
51 '@type': '@id' 58 '@type': '@id'
@@ -67,7 +74,7 @@ async function activityPubCollectionPagination (baseUrl: string, handler: Activi
67 74
68 return { 75 return {
69 id: baseUrl, 76 id: baseUrl,
70 type: 'OrderedCollection', 77 type: 'OrderedCollectionPage',
71 totalItems: result.total, 78 totalItems: result.total,
72 first: baseUrl + '?page=1' 79 first: baseUrl + '?page=1'
73 } 80 }