aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/UserDataManager.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2019-12-20 19:43:57 +0100
committerBond_009 <bond.009@outlook.com>2019-12-20 19:43:57 +0100
commit7f5a174dff98c6071fc292a41bba63d1435c2ddd (patch)
tree8831a98e9e938420b5a4198f621a3dd57847b6b1 /Emby.Server.Implementations/Library/UserDataManager.cs
parent137db45fc7a91d75d81023709b77277f34958ff0 (diff)
parent06dfa2e687304874d4c8de8f7c95354b3d51225c (diff)
Merge branch 'master' into warn12
Diffstat (limited to 'Emby.Server.Implementations/Library/UserDataManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/UserDataManager.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs
index 5d4f17861..f1fb35d9a 100644
--- a/Emby.Server.Implementations/Library/UserDataManager.cs
+++ b/Emby.Server.Implementations/Library/UserDataManager.cs
@@ -227,24 +227,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;
@@ -264,6 +261,7 @@ namespace Emby.Server.Implementations.Library
positionTicks = 0;
data.Played = false;
}
+
if (!item.SupportsPositionTicksResume)
{
positionTicks = 0;