aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2025-12-24 10:25:54 +0100
committerGitHub <noreply@github.com>2025-12-24 10:25:54 +0100
commit25115e95aa56b8cb417b114f4ab6964e6adc2f91 (patch)
tree2213fa101395a6580d511e5fca6fb524e1cebd05
parent2cca942ce608bc9c56db110d6684a3b127b9c9c2 (diff)
parent84f66dd54e74621e4d81cd57648c4d27411d82d9 (diff)
Merge branch 'master' into upd-contributors
-rw-r--r--CONTRIBUTORS.md1
-rw-r--r--Emby.Server.Implementations/Localization/Core/es-AR.json2
-rw-r--r--Emby.Server.Implementations/Localization/Core/pl.json4
-rw-r--r--Jellyfin.Api/Controllers/ActivityLogController.cs3
-rw-r--r--Jellyfin.Data/Queries/ActivityLogQuery.cs5
-rw-r--r--Jellyfin.Server.Implementations/Activity/ActivityManager.cs21
6 files changed, 30 insertions, 6 deletions
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 646cc15cd..d475dbba7 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 012f793a6..1f8af4c8a 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 3555ea4ae..8ca22ac04 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 d5f262773..47d3f4b7f 100644
--- a/Jellyfin.Api/Controllers/ActivityLogController.cs
+++ b/Jellyfin.Api/Controllers/ActivityLogController.cs
@@ -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,
diff --git a/Jellyfin.Data/Queries/ActivityLogQuery.cs b/Jellyfin.Data/Queries/ActivityLogQuery.cs
index 95c52f870..6de6c4c21 100644
--- a/Jellyfin.Data/Queries/ActivityLogQuery.cs
+++ b/Jellyfin.Data/Queries/ActivityLogQuery.cs
@@ -22,6 +22,11 @@ public class ActivityLogQuery : PaginatedQuery
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>
public string? Name { get; set; }
diff --git a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
index 7ee573f53..fe987b9d8 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;