Beispiel #1
0
 public async Task <Domain.SmartPlaylist[]> GetAllUpdateableSmartPlaylistsAsync()
 {
     using (PerfLogger.Create("GetAllUpdateableSmartPlaylists"))
     {
         return(await _decorated.GetAllUpdateableSmartPlaylistsAsync().ConfigureAwait(false));
     }
 }
Beispiel #2
0
        public async Task HandleAsync(UpdateAllSmartPlaylistsCommand message)
        {
            var smartPlaylists =
                await _smartPlaylistProvider.GetAllUpdateableSmartPlaylistsAsync().ConfigureAwait(false);

            var smartPlaylistToUpdateWithNewItems = GetSmartPlaylistToUpdateWithNewItems(message, smartPlaylists);

            UpdateSmartPlaylistsWithAllUserItems(smartPlaylists.Except(smartPlaylistToUpdateWithNewItems));

            if (smartPlaylistToUpdateWithNewItems.Any())
            {
                await UpdateSmartPlaylistsWithNewItemsAsync(message.Items, smartPlaylistToUpdateWithNewItems)
                .ConfigureAwait(false);
            }
        }