diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-05-24 08:52:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-24 08:52:38 +0200 |
| commit | 9f2e8063ec4fa284395d16872bc39aa9e7247fde (patch) | |
| tree | c1d04aa90337e4c73dc87b11ba8034a0fa6fafc6 | |
| parent | 1594385497fb7f8e7d12169db34c64821c73864f (diff) | |
| parent | bc017737e678c62a1573fa9c8820fc4fd2b97405 (diff) | |
Merge pull request #5997 from JKI12/master
Fixes for Book Progress
| -rw-r--r-- | Emby.Server.Implementations/Library/UserDataManager.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index 667e46613..8aa605a90 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -222,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; @@ -241,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; |
