From 9c9ca620bc8ca180e9038a6b0e61a7fac2714f63 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 2 Jun 2015 13:50:50 -0400 Subject: [PATCH] update sync value --- MediaBrowser.Server.Implementations/Dto/DtoService.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index f9dfb1350..68d9a5e9b 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -1668,7 +1668,7 @@ namespace MediaBrowser.Server.Implementations.Dto { double percent = 0; SyncedItemProgress syncItemProgress; - if (syncProgress.TryGetValue(dto.Id, out syncItemProgress)) + if (syncProgress.TryGetValue(child.Id.ToString("N"), out syncItemProgress)) { switch (syncItemProgress.Status) { @@ -1695,7 +1695,11 @@ namespace MediaBrowser.Server.Implementations.Dto if (addSyncInfo) { - dto.SyncPercent = totalSyncPercent / recursiveItemCount; + var pct = totalSyncPercent / recursiveItemCount; + if (pct > 0) + { + dto.SyncPercent = pct; + } } }