)
}
- listAccountPlaylists (account: Account, componentPagination: ComponentPagination, sort: string): Observable<ResultList<VideoPlaylist>> {
+ listAccountPlaylists (
+ account: Account,
+ componentPagination: ComponentPagination,
+ sort: string,
+ search?: string
+ ): Observable<ResultList<VideoPlaylist>> {
const url = AccountService.BASE_ACCOUNT_URL + account.nameWithHost + '/video-playlists'
const pagination = componentPagination
? this.restService.componentPaginationToRestPagination(componentPagination)
let params = new HttpParams()
params = this.restService.addRestGetParams(params, pagination, sort)
+ if (search) params = this.restService.addObjectParams(params, { search })
return this.authHttp.get<ResultList<VideoPlaylist>>(url, { params })
.pipe(
}
extractPlaylists (result: ResultList<VideoPlaylistServerModel>) {
- return this.serverService.localeObservable
+ return this.serverService.getServerLocale()
.pipe(
map(translations => {
const playlistsJSON = result.data
}
extractPlaylist (playlist: VideoPlaylistServerModel) {
- return this.serverService.localeObservable
+ return this.serverService.getServerLocale()
.pipe(map(translations => new VideoPlaylist(playlist, translations)))
}
extractVideoPlaylistElements (result: ResultList<ServerVideoPlaylistElement>) {
- return this.serverService.localeObservable
+ return this.serverService.getServerLocale()
.pipe(
map(translations => {
const elementsJson = result.data
private doVideosExistInPlaylist (videoIds: number[]): Observable<VideoExistInPlaylist> {
const url = VideoPlaylistService.MY_VIDEO_PLAYLIST_URL + 'videos-exist'
- let params = new HttpParams()
+ let params = new HttpParams()
params = this.restService.addObjectParams(params, { videoIds })
return this.authHttp.get<VideoExistInPlaylist>(url, { params })