+ explainedPrivacyLabels (privacies: VideoConstant<VideoPrivacy>[]) {
+ const base = [
+ {
+ id: VideoPrivacy.PRIVATE,
+ label: this.i18n('Only I can see this video')
+ },
+ {
+ id: VideoPrivacy.UNLISTED,
+ label: this.i18n('Only people with the private link can see this video')
+ },
+ {
+ id: VideoPrivacy.PUBLIC,
+ label: this.i18n('Anyone can see this video')
+ },
+ {
+ id: VideoPrivacy.INTERNAL,
+ label: this.i18n('Only users of this instance can see this video')
+ }
+ ]
+
+ return base.filter(o => !!privacies.find(p => p.id === o.id))
+ }
+
+ nsfwPolicyToParam (nsfwPolicy: NSFWPolicyType) {
+ return nsfwPolicy === 'do_not_list'
+ ? 'false'
+ : 'both'
+ }
+
+ private setVideoRate (id: number, rateType: UserVideoRateType) {