diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 646cc15cd9..d475dbba76 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -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
diff --git a/Emby.Server.Implementations/Localization/Core/es-AR.json b/Emby.Server.Implementations/Localization/Core/es-AR.json
index 012f793a6c..1f8af4c8a5 100644
--- a/Emby.Server.Implementations/Localization/Core/es-AR.json
+++ b/Emby.Server.Implementations/Localization/Core/es-AR.json
@@ -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}",
diff --git a/Emby.Server.Implementations/Localization/Core/pl.json b/Emby.Server.Implementations/Localization/Core/pl.json
index 3555ea4ae8..8ca22ac046 100644
--- a/Emby.Server.Implementations/Localization/Core/pl.json
+++ b/Emby.Server.Implementations/Localization/Core/pl.json
@@ -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",
diff --git a/Jellyfin.Api/Controllers/ActivityLogController.cs b/Jellyfin.Api/Controllers/ActivityLogController.cs
index d5f2627739..47d3f4b7f7 100644
--- a/Jellyfin.Api/Controllers/ActivityLogController.cs
+++ b/Jellyfin.Api/Controllers/ActivityLogController.cs
@@ -38,6 +38,7 @@ public class ActivityLogController : BaseJellyfinApiController
/// The record index to start at. All items with a lower index will be dropped from the results.
/// The maximum number of records to return.
/// The minimum date.
+ /// The maximum date.
/// Filter log entries if it has user id, or not.
/// Filter by name.
/// Filter by overview.
@@ -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,
diff --git a/Jellyfin.Data/Queries/ActivityLogQuery.cs b/Jellyfin.Data/Queries/ActivityLogQuery.cs
index 95c52f8705..6de6c4c217 100644
--- a/Jellyfin.Data/Queries/ActivityLogQuery.cs
+++ b/Jellyfin.Data/Queries/ActivityLogQuery.cs
@@ -21,6 +21,11 @@ public class ActivityLogQuery : PaginatedQuery
///
public DateTime? MinDate { get; set; }
+ ///
+ /// Gets or sets the maximum date to query for.
+ ///
+ public DateTime? MaxDate { get; set; }
+
///
/// Gets or sets the name filter.
///
diff --git a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
index 7ee573f538..fe987b9d86 100644
--- a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
+++ b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
@@ -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;