/// <summary>
        /// Gets the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>System.Object.</returns>
        public object Get(GetSimilarShows request)
        {
            var result = SimilarItemsHelper.GetSimilarItems(_userManager,
                                                            _itemRepo,
                                                            _libraryManager,
                                                            _userDataRepository,
                                                            Logger,
                                                            request, item => item is Series,
                                                            SimilarItemsHelper.GetSimiliarityScore);

            return(ToOptimizedResult(result));
        }
Exemple #2
0
        /// <summary>
        /// Gets the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>System.Object.</returns>
        public object Get(GetSimilarMovies request)
        {
            var result = SimilarItemsHelper.GetSimilarItems(_userManager,
                                                            _itemRepo,
                                                            _libraryManager,
                                                            _userDataRepository,
                                                            Logger,
                                                            request, item => item is Movie || (item is Trailer && request.IncludeTrailers),
                                                            SimilarItemsHelper.GetSimiliarityScore);

            return(ToOptimizedResult(result));
        }