X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fvideo%2Fvideo.service.ts;h=5c0674e583763c5d13c30ed550cccdb5317f2f55;hb=7f5f4152a4cd4fc328d6ae177d281ebe7e792dd3;hp=558db95431119c5e4a69daf5242bbeec07d31b47;hpb=f5b0af50c85e2f8b6b2b054ac1f47123cacbe08d;p=oweals%2Fpeertube.git diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index 558db9543..5c0674e58 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts @@ -23,8 +23,17 @@ import { ServerService } from '@app/core' import { UserSubscriptionService } from '@app/shared/user-subscription' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' +export interface VideosProvider { + getVideos ( + videoPagination: ComponentPagination, + sort: VideoSortField, + filter?: VideoFilter, + categoryOneOf?: number + ): Observable<{ videos: Video[], totalVideos: number }> +} + @Injectable() -export class VideoService { +export class VideoService implements VideosProvider { static BASE_VIDEO_URL = environment.apiUrl + '/api/v1/videos/' static BASE_FEEDS_URL = environment.apiUrl + '/feeds/videos.' @@ -51,14 +60,6 @@ export class VideoService { ) } - viewVideo (uuid: string): Observable { - return this.authHttp.post(this.getVideoViewUrl(uuid), {}) - .pipe( - map(this.restExtractor.extractDataBool), - catchError(err => this.restExtractor.handleError(err)) - ) - } - updateVideo (video: VideoEdit) { const language = video.language || null const licence = video.licence || null