Skip to content

Commit

Permalink
Some less obvious ones that I was told were there
Browse files Browse the repository at this point in the history
  • Loading branch information
hawken93 committed Jan 7, 2019
1 parent 8808255 commit 82a801c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Emby.Server.Implementations/LiveTv/LiveTvManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ private async Task RefreshChannelsInternal(IProgress<double> progress, Cancellat
var numComplete = 0;
double progressPerService = _services.Length == 0
? 0
: 1 / _services.Length;
: 1.0 / _services.Length;

var newChannelIdList = new List<Guid>();
var newProgramIdList = new List<Guid>();
Expand Down Expand Up @@ -1262,7 +1262,7 @@ await currentChannel.RefreshMetadata(new MetadataRefreshOptions(new DirectorySer
}

numComplete++;
double percent = numComplete / allChannelsList.Count;
double percent = numComplete / (double) allChannelsList.Count;

progress.Report(85 * percent + 15);
}
Expand Down Expand Up @@ -1307,7 +1307,7 @@ private void CleanDatabaseInternal(Guid[] currentIdList, string[] validTypes, IP
}

numComplete++;
double percent = numComplete / list.Count;
double percent = numComplete / (double) list.Count;

progress.Report(100 * percent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Task Execute(CancellationToken cancellationToken, IProgress<double> progr

foreach (var file in filesToDelete)
{
double percent = index / filesToDelete.Count;
double percent = index / (double) filesToDelete.Count;

progress.Report(100 * percent);

Expand Down

0 comments on commit 82a801c

Please sign in to comment.