/// <summary> /// Gets the specified request. /// </summary> /// <param name="request">The request.</param> /// <returns>System.Object.</returns> public async Task <object> Get(GetSimilarMovies request) { var result = await GetSimilarItemsResult( request, SimilarItemsHelper.GetSimiliarityScore).ConfigureAwait(false); return(ToOptimizedSerializedResultUsingCache(result)); }
/// <summary> /// Gets the specified request. /// </summary> /// <param name="request">The request.</param> /// <returns>System.Object.</returns> public async Task <object> Get(GetSimilarMovies request) { var result = await GetSimilarItemsResult( // Strip out secondary versions request, item => (item is Movie) && !((Video)item).PrimaryVersionId.HasValue, SimilarItemsHelper.GetSimiliarityScore).ConfigureAwait(false); return(ToOptimizedSerializedResultUsingCache(result)); }
/// <summary> /// Gets the specified request. /// </summary> /// <param name="request">The request.</param> /// <returns>System.Object.</returns> public object Get(GetSimilarMovies request) { var result = SimilarItemsHelper.GetSimilarItemsResult(_userManager, _itemRepo, _libraryManager, _userDataRepository, _dtoService, Logger, // Strip out secondary versions request, item => (item is Movie || (item is Trailer && request.IncludeTrailers)) && !((Video)item).PrimaryVersionId.HasValue, SimilarItemsHelper.GetSimiliarityScore); return ToOptimizedSerializedResultUsingCache(result); }
/// <summary> /// Gets the specified request. /// </summary> /// <param name="request">The request.</param> /// <returns>System.Object.</returns> public object Get(GetSimilarMovies request) { var result = GetSimilarItemsResult(request); return(ToOptimizedResult(result)); }