|
|
|
@ -156,10 +156,10 @@ namespace MediaBrowser.Api
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Find common genres
|
|
|
|
|
points += item1.Genres.Where(i => item2.Genres.Contains(i, StringComparer.OrdinalIgnoreCase)).Sum(i => 5);
|
|
|
|
|
points += item1.Genres.Where(i => item2.Genres.Contains(i, StringComparer.OrdinalIgnoreCase)).Sum(i => 10);
|
|
|
|
|
|
|
|
|
|
// Find common tags
|
|
|
|
|
points += item1.Tags.Where(i => item2.Tags.Contains(i, StringComparer.OrdinalIgnoreCase)).Sum(i => 5);
|
|
|
|
|
points += item1.Tags.Where(i => item2.Tags.Contains(i, StringComparer.OrdinalIgnoreCase)).Sum(i => 10);
|
|
|
|
|
|
|
|
|
|
// Find common studios
|
|
|
|
|
points += item1.Studios.Where(i => item2.Studios.Contains(i, StringComparer.OrdinalIgnoreCase)).Sum(i => 3);
|
|
|
|
@ -168,23 +168,23 @@ namespace MediaBrowser.Api
|
|
|
|
|
|
|
|
|
|
points += item1.People.Where(i => item2PeopleNames.Contains(i.Name, StringComparer.OrdinalIgnoreCase)).Sum(i =>
|
|
|
|
|
{
|
|
|
|
|
if (string.Equals(i.Type, PersonType.Director, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (string.Equals(i.Type, PersonType.Director, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Role, PersonType.Director, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return 5;
|
|
|
|
|
}
|
|
|
|
|
if (string.Equals(i.Type, PersonType.Actor, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
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))
|
|
|
|
|
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))
|
|
|
|
|
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))
|
|
|
|
|
if (string.Equals(i.Type, PersonType.Writer, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Role, PersonType.Writer, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return 2;
|
|
|
|
|
}
|
|
|
|
|