diff options
Diffstat (limited to 'client/src/app/videos/+video-watch')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index 874dd5997..bd98e877c 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -14,7 +14,7 @@ import { VideoMagnetComponent } from './video-magnet.component' | |||
14 | import { VideoShareComponent } from './video-share.component' | 14 | import { VideoShareComponent } from './video-share.component' |
15 | import { VideoReportComponent } from './video-report.component' | 15 | import { VideoReportComponent } from './video-report.component' |
16 | import { Video, VideoService } from '../shared' | 16 | import { Video, VideoService } from '../shared' |
17 | import { WebTorrentService } from './webtorrent.service' | 17 | import { VideoBlacklistService } from '../../shared' |
18 | import { UserVideoRateType, VideoRateType } from '../../../../../shared' | 18 | import { UserVideoRateType, VideoRateType } from '../../../../../shared' |
19 | 19 | ||
20 | @Component({ | 20 | @Component({ |
@@ -45,6 +45,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
45 | private route: ActivatedRoute, | 45 | private route: ActivatedRoute, |
46 | private router: Router, | 46 | private router: Router, |
47 | private videoService: VideoService, | 47 | private videoService: VideoService, |
48 | private videoBlacklistService: VideoBlacklistService, | ||
48 | private confirmService: ConfirmService, | 49 | private confirmService: ConfirmService, |
49 | private metaService: MetaService, | 50 | private metaService: MetaService, |
50 | private authService: AuthService, | 51 | private authService: AuthService, |
@@ -137,15 +138,15 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
137 | res => { | 138 | res => { |
138 | if (res === false) return | 139 | if (res === false) return |
139 | 140 | ||
140 | this.videoService.blacklistVideo(this.video.id) | 141 | this.videoBlacklistService.blacklistVideo(this.video.id) |
141 | .subscribe( | 142 | .subscribe( |
142 | status => { | 143 | status => { |
143 | this.notificationsService.success('Success', `Video ${this.video.name} had been blacklisted.`) | 144 | this.notificationsService.success('Success', `Video ${this.video.name} had been blacklisted.`) |
144 | this.router.navigate(['/videos/list']) | 145 | this.router.navigate(['/videos/list']) |
145 | }, | 146 | }, |
146 | 147 | ||
147 | error => this.notificationsService.error('Error', error.text) | 148 | error => this.notificationsService.error('Error', error.text) |
148 | ) | 149 | ) |
149 | } | 150 | } |
150 | ) | 151 | ) |
151 | } | 152 | } |