@ -3026,40 +3026,40 @@ namespace Emby.Server.Implementations.Data
if ( string . Equals ( name , ItemSortBy . AirTime , StringComparison . OrdinalIgnoreCase ) )
{
// TODO
return ( "SortName" , SortOrder . De scending) ;
return ( "SortName" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . Runtime , StringComparison . OrdinalIgnoreCase ) )
{
return ( "RuntimeTicks" , SortOrder . De scending) ;
return ( "RuntimeTicks" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . Random , StringComparison . OrdinalIgnoreCase ) )
{
return ( "RANDOM()" , SortOrder . De scending) ;
return ( "RANDOM()" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . DatePlayed , StringComparison . OrdinalIgnoreCase ) )
{
if ( query . GroupBySeriesPresentationUniqueKey )
{
return ( "MAX(LastPlayedDate)" , SortOrder . De scending) ;
return ( "MAX(LastPlayedDate)" , SortOrder . A scending) ;
}
return ( "LastPlayedDate" , SortOrder . De scending) ;
return ( "LastPlayedDate" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . PlayCount , StringComparison . OrdinalIgnoreCase ) )
{
return ( "PlayCount" , SortOrder . De scending) ;
return ( "PlayCount" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . IsFavoriteOrLiked , StringComparison . OrdinalIgnoreCase ) )
{
return ( "(Select Case When IsFavorite is null Then 0 Else IsFavorite End )" , SortOrder . A scending) ;
return ( "(Select Case When IsFavorite is null Then 0 Else IsFavorite End )" , SortOrder . De scending) ;
}
else if ( string . Equals ( name , ItemSortBy . IsFolder , StringComparison . OrdinalIgnoreCase ) )
{
return ( "IsFolder" , SortOrder . A scending) ;
return ( "IsFolder" , SortOrder . De scending) ;
}
else if ( string . Equals ( name , ItemSortBy . IsPlayed , StringComparison . OrdinalIgnoreCase ) )
{
return ( "played" , SortOrder . A scending) ;
return ( "played" , SortOrder . De scending) ;
}
else if ( string . Equals ( name , ItemSortBy . IsUnplayed , StringComparison . OrdinalIgnoreCase ) )
{
@ -3067,34 +3067,34 @@ namespace Emby.Server.Implementations.Data
}
else if ( string . Equals ( name , ItemSortBy . DateLastContentAdded , StringComparison . OrdinalIgnoreCase ) )
{
return ( "DateLastMediaAdded" , SortOrder . De scending) ;
return ( "DateLastMediaAdded" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . Artist , StringComparison . OrdinalIgnoreCase ) )
{
return ( "(select CleanValue from itemvalues where ItemId=Guid and Type=0 LIMIT 1)" , SortOrder . De scending) ;
return ( "(select CleanValue from itemvalues where ItemId=Guid and Type=0 LIMIT 1)" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . AlbumArtist , StringComparison . OrdinalIgnoreCase ) )
{
return ( "(select CleanValue from itemvalues where ItemId=Guid and Type=1 LIMIT 1)" , SortOrder . De scending) ;
return ( "(select CleanValue from itemvalues where ItemId=Guid and Type=1 LIMIT 1)" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . OfficialRating , StringComparison . OrdinalIgnoreCase ) )
{
return ( "InheritedParentalRatingValue" , SortOrder . De scending) ;
return ( "InheritedParentalRatingValue" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . Studio , StringComparison . OrdinalIgnoreCase ) )
{
return ( "(select CleanValue from itemvalues where ItemId=Guid and Type=3 LIMIT 1)" , SortOrder . De scending) ;
return ( "(select CleanValue from itemvalues where ItemId=Guid and Type=3 LIMIT 1)" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . SeriesDatePlayed , StringComparison . OrdinalIgnoreCase ) )
{
return ( "(Select MAX(LastPlayedDate) from TypedBaseItems B" + GetJoinUserDataText ( query ) + " where Played=1 and B.SeriesPresentationUniqueKey=A.PresentationUniqueKey)" , SortOrder . De scending) ;
return ( "(Select MAX(LastPlayedDate) from TypedBaseItems B" + GetJoinUserDataText ( query ) + " where Played=1 and B.SeriesPresentationUniqueKey=A.PresentationUniqueKey)" , SortOrder . A scending) ;
}
else if ( string . Equals ( name , ItemSortBy . SeriesSortName , StringComparison . OrdinalIgnoreCase ) )
{
return ( "SeriesName" , SortOrder . De scending) ;
return ( "SeriesName" , SortOrder . A scending) ;
}
return ( name , SortOrder . De scending) ;
return ( name , SortOrder . A scending) ;
}
public List < Guid > GetItemIdsList ( InternalItemsQuery query )