From 2760b454a761f6af3138b2fb5f34340772ab0d1e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 27 Oct 2021 14:37:04 +0200 Subject: Deprecate filter video query Introduce include and isLocal instead --- client/src/app/shared/shared-custom-markup/custom-markup.service.ts | 3 +-- .../peertube-custom-tags/videos-list-markup.component.ts | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'client/src/app/shared/shared-custom-markup') diff --git a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts index ab640d348..a959b336d 100644 --- a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts +++ b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts @@ -7,7 +7,6 @@ import { ContainerMarkupData, EmbedMarkupData, PlaylistMiniatureMarkupData, - VideoFilter, VideoMiniatureMarkupData, VideosListMarkupData } from '@shared/models' @@ -193,7 +192,7 @@ export class CustomMarkupService { isLive: this.buildBoolean(data.isLive), - filter: this.buildBoolean(data.onlyLocal) ? 'local' as VideoFilter : undefined + isLocal: this.buildBoolean(data.onlyLocal) ? true : undefined } this.dynamicElementService.setModel(component, model) diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts index 856e43681..0e4d5fb12 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts @@ -1,7 +1,7 @@ import { finalize } from 'rxjs/operators' import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' import { AuthService, Notifier } from '@app/core' -import { VideoFilter, VideoSortField } from '@shared/models' +import { VideoSortField } from '@shared/models' import { Video, VideoService } from '../../shared-main' import { MiniatureDisplayOptions } from '../../shared-video-miniature' import { CustomMarkupComponent } from './shared' @@ -21,7 +21,7 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInit @Input() languageOneOf: string[] @Input() count: number @Input() onlyDisplayTitle: boolean - @Input() filter: VideoFilter + @Input() isLocal: boolean @Input() isLive: boolean @Input() maxRows: number @Input() channelHandle: string @@ -86,7 +86,7 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInit }, categoryOneOf: this.categoryOneOf, languageOneOf: this.languageOneOf, - filter: this.filter, + isLocal: this.isLocal, isLive: this.isLive, sort: this.sort as VideoSortField, account: { nameWithHost: this.accountHandle }, -- cgit v1.2.3