diff options
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 && |