- const reason = this.form.value[ 'reason' ] || undefined
- const unfederate = this.video.isLocal ? this.form.value[ 'unfederate' ] : undefined
+ const options = this.videos.map(v => ({
+ videoId: v.id,
+ reason: this.form.value['reason'] || undefined,
+ unfederate: v.isLocal
+ ? this.form.value['unfederate']
+ : undefined
+ }))
+
+ this.videoBlocklistService.blockVideo(options)
+ .subscribe({
+ next: () => {
+ const message = prepareIcu($localize`{count, plural, =1 {Blocked {videoName}.} other {Blocked {count} videos.}}`)(
+ { count: this.videos.length, videoName: this.getSingleVideo().name },
+ $localize`Blocked ${this.videos.length} videos.`
+ )