- showDownloadModal (event: Event) {
- event.preventDefault()
- this.videoDownloadModal.show()
- }
-
- 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.notifier.success(this.i18n('Video {{name}} removed from the blacklist.', { name: this.video.name }))
-
- this.video.blacklisted = false
- this.video.blacklistedReason = null
- },
-
- err => this.notifier.error(err.message)
- )
- }
-