mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 15:48:03 +00:00
Merge branch 'master' into upd-contributors
This commit is contained in:
@@ -206,6 +206,7 @@
|
||||
- [TokerX](https://github.com/TokerX)
|
||||
- [GeneMarks](https://github.com/GeneMarks)
|
||||
- [Kirill Nikiforov](https://github.com/allmazz)
|
||||
- [bjorntp](https://github.com/bjorntp)
|
||||
|
||||
# Emby Contributors
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
"ScheduledTaskFailedWithName": "{0} falló",
|
||||
"ScheduledTaskStartedWithName": "{0} iniciado",
|
||||
"ServerNameNeedsToBeRestarted": "{0} necesita ser reiniciado",
|
||||
"Shows": "Programas",
|
||||
"Shows": "Series",
|
||||
"Songs": "Canciones",
|
||||
"StartupEmbyServerIsLoading": "El servidor Jellyfin se está cargando. Vuelve a intentarlo en breve.",
|
||||
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
|
||||
|
||||
@@ -125,8 +125,8 @@
|
||||
"TaskKeyframeExtractorDescription": "Wyodrębnia klatki kluczowe z plików wideo w celu utworzenia bardziej precyzyjnych list odtwarzania HLS. To zadanie może trwać przez długi czas.",
|
||||
"TaskKeyframeExtractor": "Ekstraktor klatek kluczowych",
|
||||
"HearingImpaired": "Niedosłyszący",
|
||||
"TaskRefreshTrickplayImages": "Generuj obrazy trickplay",
|
||||
"TaskRefreshTrickplayImagesDescription": "Tworzy podglądy trickplay dla filmów we włączonych bibliotekach.",
|
||||
"TaskRefreshTrickplayImages": "Generuj obrazy Trickplay",
|
||||
"TaskRefreshTrickplayImagesDescription": "Tworzy podglądy Trickplay dla filmów we włączonych bibliotekach.",
|
||||
"TaskCleanCollectionsAndPlaylistsDescription": "Usuwa elementy z kolekcji i list odtwarzania, które już nie istnieją.",
|
||||
"TaskCleanCollectionsAndPlaylists": "Oczyść kolekcje i listy odtwarzania",
|
||||
"TaskAudioNormalization": "Normalizacja dźwięku",
|
||||
|
||||
@@ -38,6 +38,7 @@ public class ActivityLogController : BaseJellyfinApiController
|
||||
/// <param name="startIndex">The record index to start at. All items with a lower index will be dropped from the results.</param>
|
||||
/// <param name="limit">The maximum number of records to return.</param>
|
||||
/// <param name="minDate">The minimum date.</param>
|
||||
/// <param name="maxDate">The maximum date.</param>
|
||||
/// <param name="hasUserId">Filter log entries if it has user id, or not.</param>
|
||||
/// <param name="name">Filter by name.</param>
|
||||
/// <param name="overview">Filter by overview.</param>
|
||||
@@ -56,6 +57,7 @@ public class ActivityLogController : BaseJellyfinApiController
|
||||
[FromQuery] int? startIndex,
|
||||
[FromQuery] int? limit,
|
||||
[FromQuery] DateTime? minDate,
|
||||
[FromQuery] DateTime? maxDate,
|
||||
[FromQuery] bool? hasUserId,
|
||||
[FromQuery] string? name,
|
||||
[FromQuery] string? overview,
|
||||
@@ -72,6 +74,7 @@ public class ActivityLogController : BaseJellyfinApiController
|
||||
Skip = startIndex,
|
||||
Limit = limit,
|
||||
MinDate = minDate,
|
||||
MaxDate = maxDate,
|
||||
HasUserId = hasUserId,
|
||||
Name = name,
|
||||
Overview = overview,
|
||||
|
||||
@@ -21,6 +21,11 @@ public class ActivityLogQuery : PaginatedQuery
|
||||
/// </summary>
|
||||
public DateTime? MinDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum date to query for.
|
||||
/// </summary>
|
||||
public DateTime? MaxDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name filter.
|
||||
/// </summary>
|
||||
|
||||
@@ -72,6 +72,11 @@ public class ActivityManager : IActivityManager
|
||||
entries = entries.Where(e => e.ActivityLog.DateCreated >= query.MinDate.Value);
|
||||
}
|
||||
|
||||
if (query.MaxDate is not null)
|
||||
{
|
||||
entries = entries.Where(e => e.ActivityLog.DateCreated <= query.MaxDate.Value);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(query.Name))
|
||||
{
|
||||
entries = entries.Where(e => EF.Functions.Like(e.ActivityLog.Name, $"%{query.Name}%"));
|
||||
@@ -166,9 +171,19 @@ public class ActivityManager : IActivityManager
|
||||
foreach (var (sortBy, sortOrder) in sorting)
|
||||
{
|
||||
var orderBy = MapOrderBy(sortBy);
|
||||
ordered = sortOrder == SortOrder.Ascending
|
||||
? (ordered ?? query).OrderBy(orderBy)
|
||||
: (ordered ?? query).OrderByDescending(orderBy);
|
||||
|
||||
if (ordered == null)
|
||||
{
|
||||
ordered = sortOrder == SortOrder.Ascending
|
||||
? query.OrderBy(orderBy)
|
||||
: query.OrderByDescending(orderBy);
|
||||
}
|
||||
else
|
||||
{
|
||||
ordered = sortOrder == SortOrder.Ascending
|
||||
? ordered.ThenBy(orderBy)
|
||||
: ordered.ThenByDescending(orderBy);
|
||||
}
|
||||
}
|
||||
|
||||
return ordered;
|
||||
|
||||
Reference in New Issue
Block a user