mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Federate video views
This commit is contained in:
parent
c46edbc2f6
commit
40ff57078e
19 changed files with 188 additions and 44 deletions
|
@ -33,13 +33,18 @@ async function videoActivityObjectToDBAttributes (
|
|||
else if (cc.indexOf(ACTIVITY_PUB.PUBLIC) !== -1) privacy = VideoPrivacy.UNLISTED
|
||||
|
||||
const duration = videoObject.duration.replace(/[^\d]+/, '')
|
||||
let language = null
|
||||
if (videoObject.language) {
|
||||
language = parseInt(videoObject.language.identifier, 10)
|
||||
}
|
||||
|
||||
const videoData: VideoAttributes = {
|
||||
name: videoObject.name,
|
||||
uuid: videoObject.uuid,
|
||||
url: videoObject.id,
|
||||
category: parseInt(videoObject.category.identifier, 10),
|
||||
licence: parseInt(videoObject.licence.identifier, 10),
|
||||
language: parseInt(videoObject.language.identifier, 10),
|
||||
language,
|
||||
nsfw: videoObject.nsfw,
|
||||
description: videoObject.content,
|
||||
channelId: videoChannel.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue