]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-edit/video-update.resolver.ts
Refactor modal buttons style
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / video-update.resolver.ts
index 3a82324c3ea5477bca546b5034aab85f6a430894..276548b797a18cd202d6c7673e7d6520e30652b6 100644 (file)
@@ -2,13 +2,14 @@ import { forkJoin, of } from 'rxjs'
 import { map, switchMap } from 'rxjs/operators'
 import { Injectable } from '@angular/core'
 import { ActivatedRouteSnapshot, Resolve } from '@angular/router'
-import { VideoCaptionService, VideoChannelService, VideoDetails, VideoLiveService, VideoService } from '@app/shared/shared-main'
+import { VideoCaptionService, VideoChannelService, VideoDetails, VideoService } from '@app/shared/shared-main'
+import { LiveVideoService } from '@app/shared/shared-video-live'
 
 @Injectable()
 export class VideoUpdateResolver implements Resolve<any> {
   constructor (
     private videoService: VideoService,
-    private videoLiveService: VideoLiveService,
+    private liveVideoService: LiveVideoService,
     private videoChannelService: VideoChannelService,
     private videoCaptionService: VideoCaptionService
   ) {
@@ -20,7 +21,7 @@ export class VideoUpdateResolver implements Resolve<any> {
     return this.videoService.getVideo({ videoId: uuid })
                .pipe(
                  switchMap(video => forkJoin(this.buildVideoObservables(video))),
-                 map(([ video, videoChannels, videoCaptions, videoLive ]) => ({ video, videoChannels, videoCaptions, videoLive }))
+                 map(([ video, videoChannels, videoCaptions, liveVideo ]) => ({ video, videoChannels, videoCaptions, liveVideo }))
                )
   }
 
@@ -49,7 +50,7 @@ export class VideoUpdateResolver implements Resolve<any> {
         ),
 
       video.isLive
-          ? this.videoLiveService.getVideoLive(video.id)
+          ? this.liveVideoService.getVideoLive(video.id)
           : of(undefined)
     ]
   }