Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
        }