mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-09 17:28:48 +01:00
Don't shuffle some types by default
This commit is contained in:
@@ -1580,15 +1580,15 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
return;
|
||||
}
|
||||
|
||||
var episodesToDelete = (librarySeries.GetItemList(new InternalItemsQuery
|
||||
var episodesToDelete = librarySeries.GetItemList(new InternalItemsQuery
|
||||
{
|
||||
OrderBy = new[] { new ValueTuple<string, SortOrder>(ItemSortBy.DateCreated, SortOrder.Descending) },
|
||||
OrderBy = new[] { (ItemSortBy.DateCreated, SortOrder.Descending) },
|
||||
IsVirtualItem = false,
|
||||
IsFolder = false,
|
||||
Recursive = true,
|
||||
DtoOptions = new DtoOptions(true)
|
||||
|
||||
}))
|
||||
})
|
||||
.Where(i => i.IsFileProtocol && File.Exists(i.Path))
|
||||
.Skip(seriesTimer.KeepUpTo - 1)
|
||||
.ToList();
|
||||
@@ -2258,7 +2258,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
},
|
||||
MinStartDate = startDateUtc.AddMinutes(-3),
|
||||
MaxStartDate = startDateUtc.AddMinutes(3),
|
||||
OrderBy = new[] { new ValueTuple<string, SortOrder>(ItemSortBy.StartDate, SortOrder.Ascending) }
|
||||
OrderBy = new[] { (ItemSortBy.StartDate, SortOrder.Ascending) }
|
||||
};
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(channelId))
|
||||
|
||||
@@ -209,16 +209,16 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
|
||||
var orderBy = internalQuery.OrderBy.ToList();
|
||||
|
||||
orderBy.AddRange(query.SortBy.Select(i => new ValueTuple<string, SortOrder>(i, query.SortOrder ?? SortOrder.Ascending)));
|
||||
orderBy.AddRange(query.SortBy.Select(i => (i, query.SortOrder ?? SortOrder.Ascending)));
|
||||
|
||||
if (query.EnableFavoriteSorting)
|
||||
{
|
||||
orderBy.Insert(0, new ValueTuple<string, SortOrder>(ItemSortBy.IsFavoriteOrLiked, SortOrder.Descending));
|
||||
orderBy.Insert(0, (ItemSortBy.IsFavoriteOrLiked, SortOrder.Descending));
|
||||
}
|
||||
|
||||
if (!internalQuery.OrderBy.Any(i => string.Equals(i.Item1, ItemSortBy.SortName, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
orderBy.Add(new ValueTuple<string, SortOrder>(ItemSortBy.SortName, SortOrder.Ascending));
|
||||
orderBy.Add((ItemSortBy.SortName, SortOrder.Ascending));
|
||||
}
|
||||
|
||||
internalQuery.OrderBy = orderBy.ToArray();
|
||||
@@ -772,22 +772,22 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
|
||||
var topFolder = GetInternalLiveTvFolder(cancellationToken);
|
||||
|
||||
if (query.OrderBy.Length == 0)
|
||||
if (query.OrderBy.Count == 0)
|
||||
{
|
||||
if (query.IsAiring ?? false)
|
||||
{
|
||||
// Unless something else was specified, order by start date to take advantage of a specialized index
|
||||
query.OrderBy = new ValueTuple<string, SortOrder>[]
|
||||
query.OrderBy = new[]
|
||||
{
|
||||
new ValueTuple<string, SortOrder>(ItemSortBy.StartDate, SortOrder.Ascending)
|
||||
(ItemSortBy.StartDate, SortOrder.Ascending)
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unless something else was specified, order by start date to take advantage of a specialized index
|
||||
query.OrderBy = new ValueTuple<string, SortOrder>[]
|
||||
query.OrderBy = new[]
|
||||
{
|
||||
new ValueTuple<string, SortOrder>(ItemSortBy.StartDate, SortOrder.Ascending)
|
||||
(ItemSortBy.StartDate, SortOrder.Ascending)
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -871,7 +871,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
IsSports = query.IsSports,
|
||||
IsKids = query.IsKids,
|
||||
EnableTotalRecordCount = query.EnableTotalRecordCount,
|
||||
OrderBy = new[] { new ValueTuple<string, SortOrder>(ItemSortBy.StartDate, SortOrder.Ascending) },
|
||||
OrderBy = new[] { (ItemSortBy.StartDate, SortOrder.Ascending) },
|
||||
TopParentIds = new[] { topFolder.Id },
|
||||
DtoOptions = options,
|
||||
GenreIds = query.GenreIds
|
||||
@@ -1393,7 +1393,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
IsVirtualItem = false,
|
||||
Limit = limit,
|
||||
StartIndex = query.StartIndex,
|
||||
OrderBy = new[] { new ValueTuple<string, SortOrder>(ItemSortBy.DateCreated, SortOrder.Descending) },
|
||||
OrderBy = new[] { (ItemSortBy.DateCreated, SortOrder.Descending) },
|
||||
EnableTotalRecordCount = query.EnableTotalRecordCount,
|
||||
IncludeItemTypes = includeItemTypes.ToArray(),
|
||||
ExcludeItemTypes = excludeItemTypes.ToArray(),
|
||||
@@ -1891,7 +1891,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
MaxStartDate = now,
|
||||
MinEndDate = now,
|
||||
Limit = channelIds.Length,
|
||||
OrderBy = new[] { new ValueTuple<string, SortOrder>(ItemSortBy.StartDate, SortOrder.Ascending) },
|
||||
OrderBy = new[] { (ItemSortBy.StartDate, SortOrder.Ascending) },
|
||||
TopParentIds = new[] { GetInternalLiveTvFolder(CancellationToken.None).Id },
|
||||
DtoOptions = options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user