X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-search%2Fadvanced-search.model.ts;h=29fe3e8dc9e7ed3b348cf48d6c23c1f8fb50af68;hb=52798aa5f277492d4dd2482bca9396d2e982fa19;hp=e8bb00fd326618b745948af417b07f5f3d1bd3ce;hpb=690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-search/advanced-search.model.ts b/client/src/app/shared/shared-search/advanced-search.model.ts index e8bb00fd3..29fe3e8dc 100644 --- a/client/src/app/shared/shared-search/advanced-search.model.ts +++ b/client/src/app/shared/shared-search/advanced-search.model.ts @@ -40,6 +40,8 @@ export class AdvancedSearch { searchTarget: SearchTargetType resultType: AdvancedSearchResultType + excludeAlreadyWatched?: boolean + constructor (options?: { startDate?: string endDate?: string @@ -62,6 +64,8 @@ export class AdvancedSearch { sort?: string searchTarget?: SearchTargetType resultType?: AdvancedSearchResultType + + excludeAlreadyWatched?: boolean }) { if (!options) return @@ -87,6 +91,8 @@ export class AdvancedSearch { this.resultType = options.resultType || undefined + this.excludeAlreadyWatched = options.excludeAlreadyWatched || undefined + if (!this.resultType && this.hasVideoFilter()) { this.resultType = 'videos' } @@ -138,7 +144,8 @@ export class AdvancedSearch { host: this.host, sort: this.sort, searchTarget: this.searchTarget, - resultType: this.resultType + resultType: this.resultType, + excludeAlreadyWatched: this.excludeAlreadyWatched } } @@ -162,7 +169,8 @@ export class AdvancedSearch { host: this.host, isLive, sort: this.sort, - searchTarget: this.searchTarget + searchTarget: this.searchTarget, + excludeAlreadyWatched: this.excludeAlreadyWatched } }