|
@@ -2230,7 +2230,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
}
|
|
|
if (string.Equals(name, ItemSortBy.OfficialRating, StringComparison.OrdinalIgnoreCase))
|
|
|
{
|
|
|
- return new Tuple<string, bool>("ParentalRatingValue", false);
|
|
|
+ return new Tuple<string, bool>("InheritedParentalRatingValue", false);
|
|
|
}
|
|
|
if (string.Equals(name, ItemSortBy.Studio, StringComparison.OrdinalIgnoreCase))
|
|
|
{
|
|
@@ -3473,7 +3473,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
|
using (var cmd = _connection.CreateCommand())
|
|
|
{
|
|
|
- cmd.CommandText = "select Guid,InheritedParentalRatingValue,(select Max(ParentalRatingValue, (select COALESCE(MAX(ParentalRatingValue),0) from TypedBaseItems where guid in (Select AncestorId from AncestorIds where ItemId=Outer.guid)))) as NewInheritedParentalRatingValue from typedbaseitems as Outer where InheritedParentalRatingValue <> NewInheritedParentalRatingValue";
|
|
|
+ cmd.CommandText = "select Guid,InheritedParentalRatingValue,(select Max(InheritedParentalRatingValue, (select COALESCE(MAX(InheritedParentalRatingValue),0) from TypedBaseItems where guid in (Select AncestorId from AncestorIds where ItemId=Outer.guid)))) as NewInheritedParentalRatingValue from typedbaseitems as Outer where InheritedParentalRatingValue <> NewInheritedParentalRatingValue";
|
|
|
|
|
|
using (var reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess | CommandBehavior.SingleResult))
|
|
|
{
|