From d8b34ee55b654912f86bb8b472d391ced8c28f64 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Wed, 13 Jan 2021 09:16:15 +0100 Subject: Allow user to search through their watch history (#3576) * allow user to search through their watch history * add tests for search in watch history * Update client/src/app/shared/shared-main/users/user-history.service.ts --- server/models/video/video.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/models/video') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index abf823d4b..5027e980d 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -1087,6 +1087,7 @@ export class VideoModel extends Model { user?: MUserAccountId historyOfUser?: MUserId countVideos?: boolean + search?: string }) { if ((options.filter === 'all-local' || options.filter === 'all') && !options.user.hasRight(UserRight.SEE_ALL_VIDEOS)) { throw new Error('Try to filter all-local but no user has not the see all videos right') @@ -1123,7 +1124,8 @@ export class VideoModel extends Model { includeLocalVideos: options.includeLocalVideos, user: options.user, historyOfUser: options.historyOfUser, - trendingDays + trendingDays, + search: options.search } return VideoModel.getAvailableForApi(queryOptions, options.countVideos) -- cgit v1.2.3