diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-22 16:25:03 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:53 +0100 |
commit | 40ff57078e15d5b86ee6b71e198b95d3feb78eaf (patch) | |
tree | 88031d4eac6a26597e8a1f2fc63674664e3eae26 /server/lib/activitypub/process/misc.ts | |
parent | c46edbc2f6ca310b2f0331f979ac6caf27f6eb92 (diff) | |
download | PeerTube-40ff57078e15d5b86ee6b71e198b95d3feb78eaf.tar.gz PeerTube-40ff57078e15d5b86ee6b71e198b95d3feb78eaf.tar.zst PeerTube-40ff57078e15d5b86ee6b71e198b95d3feb78eaf.zip |
Federate video views
Diffstat (limited to 'server/lib/activitypub/process/misc.ts')
-rw-r--r-- | server/lib/activitypub/process/misc.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/lib/activitypub/process/misc.ts b/server/lib/activitypub/process/misc.ts index e90a793fc..eefbe2884 100644 --- a/server/lib/activitypub/process/misc.ts +++ b/server/lib/activitypub/process/misc.ts | |||
@@ -33,13 +33,18 @@ async function videoActivityObjectToDBAttributes ( | |||
33 | else if (cc.indexOf(ACTIVITY_PUB.PUBLIC) !== -1) privacy = VideoPrivacy.UNLISTED | 33 | else if (cc.indexOf(ACTIVITY_PUB.PUBLIC) !== -1) privacy = VideoPrivacy.UNLISTED |
34 | 34 | ||
35 | const duration = videoObject.duration.replace(/[^\d]+/, '') | 35 | const duration = videoObject.duration.replace(/[^\d]+/, '') |
36 | let language = null | ||
37 | if (videoObject.language) { | ||
38 | language = parseInt(videoObject.language.identifier, 10) | ||
39 | } | ||
40 | |||
36 | const videoData: VideoAttributes = { | 41 | const videoData: VideoAttributes = { |
37 | name: videoObject.name, | 42 | name: videoObject.name, |
38 | uuid: videoObject.uuid, | 43 | uuid: videoObject.uuid, |
39 | url: videoObject.id, | 44 | url: videoObject.id, |
40 | category: parseInt(videoObject.category.identifier, 10), | 45 | category: parseInt(videoObject.category.identifier, 10), |
41 | licence: parseInt(videoObject.licence.identifier, 10), | 46 | licence: parseInt(videoObject.licence.identifier, 10), |
42 | language: parseInt(videoObject.language.identifier, 10), | 47 | language, |
43 | nsfw: videoObject.nsfw, | 48 | nsfw: videoObject.nsfw, |
44 | description: videoObject.content, | 49 | description: videoObject.content, |
45 | channelId: videoChannel.id, | 50 | channelId: videoChannel.id, |