public async Task <Domain.SmartPlaylist> GetSmartPlaylistAsync(Guid smartPlaylistId) { Domain.SmartPlaylist smartPlaylist = null; using (PerfLogger.Create("GetSmartPlaylistFromProvider", () => new { smartPlaylistName = smartPlaylist?.Name })) { smartPlaylist = await _decorated.GetSmartPlaylistAsync(smartPlaylistId).ConfigureAwait(false); return(smartPlaylist); } }
private async Task GetTasks(Domain.SmartPlaylist smartPlaylist, BaseItem[] items) { BaseItem[] newItems; var playlist = _playlistRepository.GetUserPlaylist(smartPlaylist.UserId, smartPlaylist.Name); using (PerfLogger.Create("FilterPlaylistItems", () => new { playlistName = playlist.Name, itemsCount = items.Length })) { newItems = smartPlaylist.FilterPlaylistItems(playlist, items).ToArray(); } await _playlistItemsUpdater.UpdateAsync(playlist, newItems).ConfigureAwait(false); }