aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/SimilarItemsHelper.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2020-06-17 11:43:38 +0100
committerGitHub <noreply@github.com>2020-06-17 11:43:38 +0100
commitb2e1d7019130f7bf7e74c8af29927226fb30d46c (patch)
tree9ffd21ce2ee2e62b6d296cb8e6c20a5ae81b46b8 /MediaBrowser.Api/SimilarItemsHelper.cs
parent862bcdba67d3b992fc7e68a7428fc225c898fce3 (diff)
parentfde63e16cb4fc5db355833eb8623375c553a678e (diff)
Merge pull request #24 from jellyfin/master
Updating my master
Diffstat (limited to 'MediaBrowser.Api/SimilarItemsHelper.cs')
-rw-r--r--MediaBrowser.Api/SimilarItemsHelper.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/MediaBrowser.Api/SimilarItemsHelper.cs b/MediaBrowser.Api/SimilarItemsHelper.cs
index 90c324ff3..84abf7b8d 100644
--- a/MediaBrowser.Api/SimilarItemsHelper.cs
+++ b/MediaBrowser.Api/SimilarItemsHelper.cs
@@ -14,7 +14,7 @@ using Microsoft.Extensions.Logging;
namespace MediaBrowser.Api
{
/// <summary>
- /// Class BaseGetSimilarItemsFromItem
+ /// Class BaseGetSimilarItemsFromItem.
/// </summary>
public class BaseGetSimilarItemsFromItem : BaseGetSimilarItems
{
@@ -50,14 +50,14 @@ namespace MediaBrowser.Api
public Guid UserId { get; set; }
/// <summary>
- /// The maximum number of items to return
+ /// The maximum number of items to return.
/// </summary>
/// <value>The limit.</value>
[ApiMember(Name = "Limit", Description = "Optional. The maximum number of records to return", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
public int? Limit { get; set; }
/// <summary>
- /// Fields to return within the items, in addition to basic information
+ /// Fields to return within the items, in addition to basic information.
/// </summary>
/// <value>The fields.</value>
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
@@ -65,7 +65,7 @@ namespace MediaBrowser.Api
}
/// <summary>
- /// Class SimilarItemsHelper
+ /// Class SimilarItemsHelper.
/// </summary>
public static class SimilarItemsHelper
{
@@ -179,18 +179,22 @@ namespace MediaBrowser.Api
{
return 5;
}
+
if (string.Equals(i.Type, PersonType.Actor, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Role, PersonType.Actor, StringComparison.OrdinalIgnoreCase))
{
return 3;
}
+
if (string.Equals(i.Type, PersonType.Composer, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Role, PersonType.Composer, StringComparison.OrdinalIgnoreCase))
{
return 3;
}
+
if (string.Equals(i.Type, PersonType.GuestStar, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Role, PersonType.GuestStar, StringComparison.OrdinalIgnoreCase))
{
return 3;
}
+
if (string.Equals(i.Type, PersonType.Writer, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Role, PersonType.Writer, StringComparison.OrdinalIgnoreCase))
{
return 2;