Răsfoiți Sursa

Changed condition for readbility

- Refactored check if item is not audio book or book to be more readable
Jake King 4 ani în urmă
părinte
comite
bc017737e6
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      Emby.Server.Implementations/Library/UserDataManager.cs

+ 1 - 1
Emby.Server.Implementations/Library/UserDataManager.cs

@@ -220,7 +220,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) && !(item is Book))
+            if (positionTicks > 0 && hasRuntime && item is not AudioBook && item is not Book)
             {
                 var pctIn = decimal.Divide(positionTicks, runtimeTicks) * 100;