aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations
diff options
context:
space:
mode:
authorJPVenson <github@jpb.email>2025-02-05 18:32:13 +0000
committerJPVenson <github@jpb.email>2025-02-05 18:32:13 +0000
commitdfdef511a5b855ee4e4f079236ff43cb508958d5 (patch)
treedb2c5d8cfe13817b165c1d24495947d98c25f670 /Jellyfin.Server.Implementations
parent078587d232ccbfdf6e08c6f1a6435e4e397e4bdc (diff)
parent00b66a06eac4d1331d59a6a9b7de3e99088ebaa9 (diff)
Merge remote-tracking branch 'jellyfinorigin/master' into feature/pgsql_provider
Diffstat (limited to 'Jellyfin.Server.Implementations')
-rw-r--r--Jellyfin.Server.Implementations/Item/BaseItemRepository.cs4
-rw-r--r--Jellyfin.Server.Implementations/Security/AuthorizationContext.cs6
-rw-r--r--Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs8
3 files changed, 12 insertions, 6 deletions
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
index 80604812c..f9a9837f1 100644
--- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
+++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
@@ -645,7 +645,7 @@ public sealed class BaseItemRepository
// dto.MediaType = Enum.TryParse<MediaType>(entity.MediaType);
if (dto is IHasStartDate hasStartDate)
{
- hasStartDate.StartDate = entity.StartDate;
+ hasStartDate.StartDate = entity.StartDate.GetValueOrDefault();
}
// Fields that are present in the DB but are never actually used
@@ -683,7 +683,7 @@ public sealed class BaseItemRepository
entity.ParentId = !dto.ParentId.IsEmpty() ? dto.ParentId : null;
entity.Path = GetPathToSave(dto.Path);
- entity.EndDate = dto.EndDate.GetValueOrDefault();
+ entity.EndDate = dto.EndDate;
entity.CommunityRating = dto.CommunityRating;
entity.CustomRating = dto.CustomRating;
entity.IndexNumber = dto.IndexNumber;
diff --git a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
index ae9040489..9e225393c 100644
--- a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
+++ b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
@@ -116,17 +116,15 @@ namespace Jellyfin.Server.Implementations.Security
DeviceId = deviceId,
Version = version,
Token = token,
- IsAuthenticated = false,
- HasToken = false
+ IsAuthenticated = false
};
- if (string.IsNullOrWhiteSpace(token))
+ if (!authInfo.HasToken)
{
// Request doesn't contain a token.
return authInfo;
}
- authInfo.HasToken = true;
var dbContext = await _jellyfinDbProvider.CreateDbContextAsync().ConfigureAwait(false);
await using (dbContext.ConfigureAwait(false))
{
diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
index dfc63b63f..5d209b0af 100644
--- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
+++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
@@ -194,6 +194,14 @@ public class TrickplayManager : ITrickplayManager
return;
}
+ // We support video backdrops, but we should not generate trickplay images for them
+ var parentDirectory = Directory.GetParent(mediaPath);
+ if (parentDirectory is not null && string.Equals(parentDirectory.Name, "backdrops", StringComparison.OrdinalIgnoreCase))
+ {
+ _logger.LogDebug("Ignoring backdrop media found at {Path} for item {ItemID}", mediaPath, video.Id);
+ return;
+ }
+
// The width has to be even, otherwise a lot of filters will not be able to sample it
var actualWidth = 2 * (width / 2);