diff --git a/Jellyfin.Plugin.SmartPlaylist/ScheduledTasks/GeneratePlaylist.cs b/Jellyfin.Plugin.SmartPlaylist/ScheduledTasks/GeneratePlaylist.cs index 1df6f71..0c4fed3 100644 --- a/Jellyfin.Plugin.SmartPlaylist/ScheduledTasks/GeneratePlaylist.cs +++ b/Jellyfin.Plugin.SmartPlaylist/ScheduledTasks/GeneratePlaylist.cs @@ -145,6 +145,7 @@ namespace Jellyfin.Plugin.SmartPlaylist.ScheduledTasks { _store.DeleteSmartPlaylist(dto); // delete in case the file was not the canonical one. await _store.SaveSmartPlaylistAsync(dto); } + var i = 0; foreach (SmartPlaylistLinkDto playlistLink in dto.Playlists) { User? user = _userManager.GetUserById(playlistLink.UserId); if (user == null) { @@ -154,6 +155,8 @@ namespace Jellyfin.Plugin.SmartPlaylist.ScheduledTasks { var playlist = _playlistManager.GetPlaylists(playlistLink.UserId).Where(x => x.Id == playlistLink.PlaylistId).First(); await ClearPlaylist(playlist); await _playlistManager.AddItemToPlaylistAsync(playlist.Id, insertItems, playlistLink.UserId); + i += 1; + progress.Report(((double)i)/dto.Playlists.Count()); } } }