feat: respect enabled flag on playlists.

This commit is contained in:
redxef 2024-12-21 01:09:02 +01:00
parent 4d2d22e486
commit 28f3cc682e
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -166,6 +166,9 @@ namespace Jellyfin.Plugin.SmartPlaylist.ScheduledTasks {
_logger.LogDebug("- {0}", asm); _logger.LogDebug("- {0}", asm);
} }
foreach (SmartPlaylistDto dto in await _store.GetAllSmartPlaylistsAsync()) { foreach (SmartPlaylistDto dto in await _store.GetAllSmartPlaylistsAsync()) {
if (!dto.Enabled) {
continue;
}
var changedDto = false; var changedDto = false;
if (dto.Playlists.Length == 0) { if (dto.Playlists.Length == 0) {
dto.Playlists = _userManager.UsersIds.Select(x => new SmartPlaylistLinkDto { dto.Playlists = _userManager.UsersIds.Select(x => new SmartPlaylistLinkDto {