diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2019-12-14 11:36:06 +0900 |
|---|---|---|
| committer | dkanada <dkanada@users.noreply.github.com> | 2019-12-14 11:36:06 +0900 |
| commit | 02928128b998608e0a6fd2f8ac611be5961fa78f (patch) | |
| tree | 515c765fa70943f0f77458e8d5bed88112fba145 /Emby.Server.Implementations/Library/UserDataManager.cs | |
| parent | f1fc6ef59f669abcae33b3a6db627683364eb8ff (diff) | |
track progress for any item that supports the feature
Diffstat (limited to 'Emby.Server.Implementations/Library/UserDataManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/UserDataManager.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index 48d33c26c..071681b08 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -226,24 +226,21 @@ namespace Emby.Server.Implementations.Library { var pctIn = decimal.Divide(positionTicks, runtimeTicks) * 100; - // Don't track in very beginning if (pctIn < _config.Configuration.MinResumePct) { + // ignore progress during the beginning positionTicks = 0; } - - // If we're at the end, assume completed else if (pctIn > _config.Configuration.MaxResumePct || positionTicks >= runtimeTicks) { + // mark as completed close to the end positionTicks = 0; data.Played = playedToCompletion = true; } - else { // Enforce MinResumeDuration var durationSeconds = TimeSpan.FromTicks(runtimeTicks).TotalSeconds; - if (durationSeconds < _config.Configuration.MinResumeDurationSeconds) { positionTicks = 0; @@ -263,6 +260,7 @@ namespace Emby.Server.Implementations.Library positionTicks = 0; data.Played = false; } + if (!item.SupportsPositionTicksResume) { positionTicks = 0; |
