diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-06-10 17:43:40 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-06-10 17:46:29 +0200 |
commit | 00a446454d4721fc49517815655f6b4f8a17b554 (patch) | |
tree | 26f41fc11c059d5b051a98099857db971623b5d9 /client/src/app/videos/video-watch | |
parent | e822fdaeee90cb7c70d5678f19249198cd7aae8c (diff) | |
download | PeerTube-00a446454d4721fc49517815655f6b4f8a17b554.tar.gz PeerTube-00a446454d4721fc49517815655f6b4f8a17b554.tar.zst PeerTube-00a446454d4721fc49517815655f6b4f8a17b554.zip |
Add tags support to the video list
Diffstat (limited to 'client/src/app/videos/video-watch')
-rw-r--r-- | client/src/app/videos/video-watch/video-watch.component.ts | 10 |
1 files changed, 5 insertions, 5 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 05e844f60..99188bfb3 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, ElementRef, OnInit } from '@angular/core'; | 1 | import { Component, ElementRef, OnInit } from '@angular/core'; |
2 | import { CanDeactivate, ComponentInstruction, RouteParams } from '@angular/router-deprecated'; | 2 | import { CanDeactivate, RouteSegment } from '@angular/router'; |
3 | 3 | ||
4 | import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; | 4 | import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; |
5 | 5 | ||
@@ -30,7 +30,7 @@ export class VideoWatchComponent implements OnInit, CanDeactivate { | |||
30 | 30 | ||
31 | constructor( | 31 | constructor( |
32 | private elementRef: ElementRef, | 32 | private elementRef: ElementRef, |
33 | private routeParams: RouteParams, | 33 | private routeSegment: RouteSegment, |
34 | private videoService: VideoService, | 34 | private videoService: VideoService, |
35 | private webTorrentService: WebTorrentService | 35 | private webTorrentService: WebTorrentService |
36 | ) {} | 36 | ) {} |
@@ -74,7 +74,7 @@ export class VideoWatchComponent implements OnInit, CanDeactivate { | |||
74 | } | 74 | } |
75 | 75 | ||
76 | ngOnInit() { | 76 | ngOnInit() { |
77 | let id = this.routeParams.get('id'); | 77 | let id = this.routeSegment.getParam('id'); |
78 | this.videoService.getVideo(id).subscribe( | 78 | this.videoService.getVideo(id).subscribe( |
79 | video => { | 79 | video => { |
80 | this.video = video; | 80 | this.video = video; |
@@ -84,11 +84,11 @@ export class VideoWatchComponent implements OnInit, CanDeactivate { | |||
84 | ); | 84 | ); |
85 | } | 85 | } |
86 | 86 | ||
87 | routerCanDeactivate(next: ComponentInstruction, prev: ComponentInstruction) { | 87 | routerCanDeactivate() { |
88 | console.log('Removing video from webtorrent.'); | 88 | console.log('Removing video from webtorrent.'); |
89 | clearInterval(this.torrentInfosInterval); | 89 | clearInterval(this.torrentInfosInterval); |
90 | this.webTorrentService.remove(this.video.magnetUri); | 90 | this.webTorrentService.remove(this.video.magnetUri); |
91 | return true; | 91 | return Promise.resolve(true); |
92 | } | 92 | } |
93 | 93 | ||
94 | private loadTooLong() { | 94 | private loadTooLong() { |