]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-video-miniature/video-miniature.component.ts
Fix notification on create transcoding job
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-miniature / video-miniature.component.ts
index fe161c977e51c31f3453b1fc001f1e30092eaf6b..cb81ba3bd7ef1348cf21622173b9ff73d5c6dc06 100644 (file)
@@ -85,7 +85,7 @@ export class VideoMiniatureComponent implements OnInit {
     playlistElementId?: number
   }
 
-  videoRouterLink: any[] = []
+  videoRouterLink: string | any[] = []
   videoHref: string
   videoTarget: string
 
@@ -120,7 +120,7 @@ export class VideoMiniatureComponent implements OnInit {
 
   buildVideoLink () {
     if (this.videoLinkType === 'internal' || !this.video.url) {
-      this.videoRouterLink = [ '/w', this.video.uuid ]
+      this.videoRouterLink = Video.buildWatchUrl(this.video)
       return
     }
 
@@ -214,11 +214,12 @@ export class VideoMiniatureComponent implements OnInit {
   addToWatchLater () {
     const body = { videoId: this.video.id }
 
-    this.videoPlaylistService.addVideoInPlaylist(this.watchLaterPlaylist.id, body).subscribe(
-      res => {
-        this.watchLaterPlaylist.playlistElementId = res.videoPlaylistElement.id
-      }
-    )
+    this.videoPlaylistService.addVideoInPlaylist(this.watchLaterPlaylist.id, body)
+      .subscribe(
+        res => {
+          this.watchLaterPlaylist.playlistElementId = res.videoPlaylistElement.id
+        }
+      )
   }
 
   removeFromWatchLater () {