From bfbd912886eba17b4aa9a40dcef2fddc685d85bf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 31 Jul 2019 15:57:32 +0200 Subject: Fix broken playlist api --- client/src/app/shared/video/video.model.ts | 6 +----- client/src/app/shared/video/video.service.ts | 18 ------------------ 2 files changed, 1 insertion(+), 23 deletions(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts index 6f9de9241..fb98d5382 100644 --- a/client/src/app/shared/video/video.model.ts +++ b/client/src/app/shared/video/video.model.ts @@ -1,5 +1,5 @@ import { User } from '../' -import { PlaylistElement, UserRight, Video as VideoServerModel, VideoPrivacy, VideoState } from '../../../../../shared' +import { UserRight, Video as VideoServerModel, VideoPrivacy, VideoState } from '../../../../../shared' import { Avatar } from '../../../../../shared/models/avatars/avatar.model' import { VideoConstant } from '../../../../../shared/models/videos/video-constant.model' import { durationToString, getAbsoluteAPIUrl } from '../misc/utils' @@ -48,8 +48,6 @@ export class Video implements VideoServerModel { blacklisted?: boolean blacklistedReason?: string - playlistElement?: PlaylistElement - account: { id: number name: string @@ -126,8 +124,6 @@ export class Video implements VideoServerModel { this.blacklistedReason = hash.blacklistedReason this.userHistory = hash.userHistory - - this.playlistElement = hash.playlistElement } isVideoNSFWForUser (user: User, serverConfig: ServerConfig) { diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index 114b014ad..45366e3e3 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts @@ -31,7 +31,6 @@ import { ServerService } from '@app/core' import { UserSubscriptionService } from '@app/shared/user-subscription/user-subscription.service' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { I18n } from '@ngx-translate/i18n-polyfill' -import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' export interface VideosProvider { getVideos (parameters: { @@ -172,23 +171,6 @@ export class VideoService implements VideosProvider { ) } - getPlaylistVideos ( - videoPlaylistId: number | string, - videoPagination: ComponentPagination - ): Observable> { - const pagination = this.restService.componentPaginationToRestPagination(videoPagination) - - let params = new HttpParams() - params = this.restService.addRestGetParams(params, pagination) - - return this.authHttp - .get>(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + videoPlaylistId + '/videos', { params }) - .pipe( - switchMap(res => this.extractVideos(res)), - catchError(err => this.restExtractor.handleError(err)) - ) - } - getUserSubscriptionVideos (parameters: { videoPagination: ComponentPagination, sort: VideoSortField -- cgit v1.2.3