fix: percentage base for progress was wrong.
This commit is contained in:
parent
5cca31cf16
commit
225dc7559f
1 changed files with 3 additions and 2 deletions
|
@ -171,7 +171,8 @@ namespace Jellyfin.Plugin.SmartPlaylist.ScheduledTasks {
|
|||
_logger.LogDebug("- {0}", asm);
|
||||
}
|
||||
var i = 0;
|
||||
foreach (SmartPlaylistDto dto in await _store.GetAllSmartPlaylistsAsync()) {
|
||||
var all_playlists = await _store.GetAllSmartPlaylistsAsync();
|
||||
foreach (SmartPlaylistDto dto in all_playlists) {
|
||||
if (!dto.Enabled) {
|
||||
i += 1;
|
||||
continue;
|
||||
|
@ -211,7 +212,7 @@ namespace Jellyfin.Plugin.SmartPlaylist.ScheduledTasks {
|
|||
await _playlistManager.AddItemToPlaylistAsync(playlist.Id, insertItems, playlistLink.UserId);
|
||||
}
|
||||
i += 1;
|
||||
progress.Report(100 * ((double)i)/dto.Playlists.Count());
|
||||
progress.Report(100 * ((double)i)/all_playlists.Count());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue