diff options
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/video/video.service.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts index c8a3ec043..b81540e8d 100644 --- a/client/src/app/shared/shared-main/video/video.service.ts +++ b/client/src/app/shared/shared-main/video/video.service.ts | |||
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs' | |||
2 | import { catchError, map, switchMap } from 'rxjs/operators' | 2 | import { catchError, map, switchMap } from 'rxjs/operators' |
3 | import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http' | 3 | import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http' |
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { ComponentPaginationLight, RestExtractor, RestService, ServerService, UserService } from '@app/core' | 5 | import { ComponentPaginationLight, RestExtractor, RestService, ServerService, UserService, AuthService } from '@app/core' |
6 | import { objectToFormData } from '@app/helpers' | 6 | import { objectToFormData } from '@app/helpers' |
7 | import { | 7 | import { |
8 | FeedFormat, | 8 | FeedFormat, |
@@ -49,7 +49,8 @@ export class VideoService implements VideosProvider { | |||
49 | private authHttp: HttpClient, | 49 | private authHttp: HttpClient, |
50 | private restExtractor: RestExtractor, | 50 | private restExtractor: RestExtractor, |
51 | private restService: RestService, | 51 | private restService: RestService, |
52 | private serverService: ServerService | 52 | private serverService: ServerService, |
53 | private authService: AuthService | ||
53 | ) {} | 54 | ) {} |
54 | 55 | ||
55 | getVideoViewUrl (uuid: string) { | 56 | getVideoViewUrl (uuid: string) { |
@@ -293,6 +294,16 @@ export class VideoService implements VideosProvider { | |||
293 | return this.buildBaseFeedUrls(params) | 294 | return this.buildBaseFeedUrls(params) |
294 | } | 295 | } |
295 | 296 | ||
297 | async getVideoSubscriptionFeedUrls (accountId: number) { | ||
298 | let params = this.restService.addRestGetParams(new HttpParams()) | ||
299 | params = params.set('accountId', accountId.toString()) | ||
300 | |||
301 | const { feedToken } = await this.authService.getScopedTokens() | ||
302 | params = params.set('token', feedToken) | ||
303 | |||
304 | return this.buildBaseFeedUrls(params) | ||
305 | } | ||
306 | |||
296 | getVideoFileMetadata (metadataUrl: string) { | 307 | getVideoFileMetadata (metadataUrl: string) { |
297 | return this.authHttp | 308 | return this.authHttp |
298 | .get<VideoFileMetadata>(metadataUrl) | 309 | .get<VideoFileMetadata>(metadataUrl) |