aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-23 14:39:52 +0200
committerChocobozzz <me@florianbigard.com>2018-04-23 14:39:52 +0200
commit9d3ef9fe052ed29bd67566754cb28662bd122234 (patch)
tree7b704dbc0b2c8b4ca18bef2409d640d0019c3d0a /server/lib
parent2a2c19dfef7a9aa313c6ca0798f271c9a63449a9 (diff)
downloadPeerTube-9d3ef9fe052ed29bd67566754cb28662bd122234.tar.gz
PeerTube-9d3ef9fe052ed29bd67566754cb28662bd122234.tar.zst
PeerTube-9d3ef9fe052ed29bd67566754cb28662bd122234.zip
Use ISO 639 for languages
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/activitypub/videos.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index ffba1570b..7cb1fe240 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -58,19 +58,19 @@ async function videoActivityObjectToDBAttributes (videoChannel: VideoChannelMode
58 videoObject: VideoTorrentObject, 58 videoObject: VideoTorrentObject,
59 to: string[] = []) { 59 to: string[] = []) {
60 const privacy = to.indexOf(ACTIVITY_PUB.PUBLIC) !== -1 ? VideoPrivacy.PUBLIC : VideoPrivacy.UNLISTED 60 const privacy = to.indexOf(ACTIVITY_PUB.PUBLIC) !== -1 ? VideoPrivacy.PUBLIC : VideoPrivacy.UNLISTED
61
62 const duration = videoObject.duration.replace(/[^\d]+/, '') 61 const duration = videoObject.duration.replace(/[^\d]+/, '')
63 let language = null 62
63 let language: string = null
64 if (videoObject.language) { 64 if (videoObject.language) {
65 language = parseInt(videoObject.language.identifier, 10) 65 language = videoObject.language.identifier
66 } 66 }
67 67
68 let category = null 68 let category: number = null
69 if (videoObject.category) { 69 if (videoObject.category) {
70 category = parseInt(videoObject.category.identifier, 10) 70 category = parseInt(videoObject.category.identifier, 10)
71 } 71 }
72 72
73 let licence = null 73 let licence: number = null
74 if (videoObject.licence) { 74 if (videoObject.licence) {
75 licence = parseInt(videoObject.licence.identifier, 10) 75 licence = parseInt(videoObject.licence.identifier, 10)
76 } 76 }