diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-06-19 15:04:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-19 15:04:30 +0100 |
| commit | 6648b7d7dabeaa84835fc7a8a7a2a468a00cad5c (patch) | |
| tree | 4b3eeee4f10f5465eaee0110aa18452dab2f9f6d /Emby.Server.Implementations/Library/UserDataManager.cs | |
| parent | 97c2c523a89dabead25b5b0d028acbd92d136660 (diff) | |
| parent | 0c3dcdf77b0d124517bffa608bfddf7d8f7682db (diff) | |
Merge branch 'master' into comparisons
Diffstat (limited to 'Emby.Server.Implementations/Library/UserDataManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/UserDataManager.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index 827e3c64b..8aa605a90 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -1,3 +1,5 @@ +#nullable disable + #pragma warning disable CS1591 using System; @@ -220,7 +222,7 @@ namespace Emby.Server.Implementations.Library var hasRuntime = runtimeTicks > 0; // If a position has been reported, and if we know the duration - if (positionTicks > 0 && hasRuntime && !(item is AudioBook)) + if (positionTicks > 0 && hasRuntime && item is not AudioBook && item is not Book) { var pctIn = decimal.Divide(positionTicks, runtimeTicks) * 100; @@ -239,7 +241,7 @@ namespace Emby.Server.Implementations.Library { // Enforce MinResumeDuration var durationSeconds = TimeSpan.FromTicks(runtimeTicks).TotalSeconds; - if (durationSeconds < _config.Configuration.MinResumeDurationSeconds && !(item is Book)) + if (durationSeconds < _config.Configuration.MinResumeDurationSeconds) { positionTicks = 0; data.Played = playedToCompletion = true; |
