+ showBlacklistModal (event: Event) {
+ event.preventDefault()
+ this.videoBlacklistModal.show()
+ }
+
+ async unblacklistVideo (event: Event) {
+ event.preventDefault()
+
+ const confirmMessage = this.i18n(
+ 'Do you really want to remove this video from the blacklist? It will be available again in the videos list.'
+ )
+
+ const res = await this.confirmService.confirm(confirmMessage, this.i18n('Unblacklist'))
+ if (res === false) return
+
+ this.videoBlacklistService.removeVideoFromBlacklist(this.video.id).subscribe(
+ () => {
+ this.notificationsService.success(
+ this.i18n('Success'),
+ this.i18n('Video {{name}} removed from the blacklist.', { name: this.video.name })
+ )
+
+ this.video.blacklisted = false
+ this.video.blacklistedReason = null
+ },
+
+ err => this.notificationsService.error(this.i18n('Error'), err.message)
+ )
+ }
+