diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-03 17:00:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-06 11:19:16 +0200 |
commit | b2977eecb8eb5d599df0c6a7ab99a437a6a969c7 (patch) | |
tree | ee5f59a932f4395a2e4148e84cdde02cdc32e26f /server/helpers | |
parent | 590fb5069038e69898123bb795f789683216d837 (diff) | |
download | PeerTube-b2977eecb8eb5d599df0c6a7ab99a437a6a969c7.tar.gz PeerTube-b2977eecb8eb5d599df0c6a7ab99a437a6a969c7.tar.zst PeerTube-b2977eecb8eb5d599df0c6a7ab99a437a6a969c7.zip |
Fix fps federation
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/activitypub.ts | 1 | ||||
-rw-r--r-- | server/helpers/custom-validators/activitypub/videos.ts | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index d710f5c97..a9de11fb0 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -24,6 +24,7 @@ function activityPubContextify <T> (data: T) { | |||
24 | views: 'http://schema.org/Number', | 24 | views: 'http://schema.org/Number', |
25 | stats: 'http://schema.org/Number', | 25 | stats: 'http://schema.org/Number', |
26 | size: 'http://schema.org/Number', | 26 | size: 'http://schema.org/Number', |
27 | fps: 'http://schema.org/Number', | ||
27 | commentsEnabled: 'http://schema.org/Boolean', | 28 | commentsEnabled: 'http://schema.org/Boolean', |
28 | waitTranscoding: 'http://schema.org/Boolean', | 29 | waitTranscoding: 'http://schema.org/Boolean', |
29 | support: 'http://schema.org/Text' | 30 | support: 'http://schema.org/Text' |
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts index c6a350236..b8075f3c7 100644 --- a/server/helpers/custom-validators/activitypub/videos.ts +++ b/server/helpers/custom-validators/activitypub/videos.ts | |||
@@ -153,7 +153,8 @@ function isRemoteVideoUrlValid (url: any) { | |||
153 | ACTIVITY_PUB.URL_MIME_TYPES.VIDEO.indexOf(url.mimeType) !== -1 && | 153 | ACTIVITY_PUB.URL_MIME_TYPES.VIDEO.indexOf(url.mimeType) !== -1 && |
154 | isActivityPubUrlValid(url.href) && | 154 | isActivityPubUrlValid(url.href) && |
155 | validator.isInt(url.width + '', { min: 0 }) && | 155 | validator.isInt(url.width + '', { min: 0 }) && |
156 | validator.isInt(url.size + '', { min: 0 }) | 156 | validator.isInt(url.size + '', { min: 0 }) && |
157 | (!url.fps || validator.isInt(url.fps + '', { min: 0 })) | ||
157 | ) || | 158 | ) || |
158 | ( | 159 | ( |
159 | ACTIVITY_PUB.URL_MIME_TYPES.TORRENT.indexOf(url.mimeType) !== -1 && | 160 | ACTIVITY_PUB.URL_MIME_TYPES.TORRENT.indexOf(url.mimeType) !== -1 && |