aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-06 14:23:02 +0200
committerChocobozzz <me@florianbigard.com>2022-05-06 14:23:02 +0200
commitf40712abbbb74e51f06037ef02757c42736bccf8 (patch)
tree4b130c6387f9687d52d570907eb1bbac6bc04b61 /client/src/app/shared
parent49f0468d44468528c2fb2c8b0efd19cdaeeec43d (diff)
downloadPeerTube-f40712abbbb74e51f06037ef02757c42736bccf8.tar.gz
PeerTube-f40712abbbb74e51f06037ef02757c42736bccf8.tar.zst
PeerTube-f40712abbbb74e51f06037ef02757c42736bccf8.zip
Add ability to filter overall video stats by date
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/shared-video-live/live-video.service.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-video-live/live-video.service.ts b/client/src/app/shared/shared-video-live/live-video.service.ts
index 11b9dd739..89bfd84a0 100644
--- a/client/src/app/shared/shared-video-live/live-video.service.ts
+++ b/client/src/app/shared/shared-video-live/live-video.service.ts
@@ -4,6 +4,7 @@ import { Injectable } from '@angular/core'
4import { RestExtractor } from '@app/core' 4import { RestExtractor } from '@app/core'
5import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@shared/models' 5import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@shared/models'
6import { environment } from '../../../environments/environment' 6import { environment } from '../../../environments/environment'
7import { VideoService } from '../shared-main'
7 8
8@Injectable() 9@Injectable()
9export class LiveVideoService { 10export class LiveVideoService {
@@ -32,6 +33,12 @@ export class LiveVideoService {
32 .pipe(catchError(err => this.restExtractor.handleError(err))) 33 .pipe(catchError(err => this.restExtractor.handleError(err)))
33 } 34 }
34 35
36 findLiveSessionFromVOD (videoId: number | string) {
37 return this.authHttp
38 .get<LiveVideoSession>(VideoService.BASE_VIDEO_URL + '/' + videoId + '/live-session')
39 .pipe(catchError(err => this.restExtractor.handleError(err)))
40 }
41
35 updateLive (videoId: number | string, liveUpdate: LiveVideoUpdate) { 42 updateLive (videoId: number | string, liveUpdate: LiveVideoUpdate) {
36 return this.authHttp 43 return this.authHttp
37 .put(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId, liveUpdate) 44 .put(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId, liveUpdate)