mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-09 07:10:34 +02:00
commit
9f2e8063ec
|
@ -222,7 +222,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
var hasRuntime = runtimeTicks > 0;
|
var hasRuntime = runtimeTicks > 0;
|
||||||
|
|
||||||
// If a position has been reported, and if we know the duration
|
// 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;
|
var pctIn = decimal.Divide(positionTicks, runtimeTicks) * 100;
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
// Enforce MinResumeDuration
|
// Enforce MinResumeDuration
|
||||||
var durationSeconds = TimeSpan.FromTicks(runtimeTicks).TotalSeconds;
|
var durationSeconds = TimeSpan.FromTicks(runtimeTicks).TotalSeconds;
|
||||||
if (durationSeconds < _config.Configuration.MinResumeDurationSeconds && !(item is Book))
|
if (durationSeconds < _config.Configuration.MinResumeDurationSeconds)
|
||||||
{
|
{
|
||||||
positionTicks = 0;
|
positionTicks = 0;
|
||||||
data.Played = playedToCompletion = true;
|
data.Played = playedToCompletion = true;
|
||||||
|
|
Loading…
Reference in a new issue