public async Task SetDiscs(IEnumerable <AddedDiscInfo> discs, CancellationToken cancellationToken) { ClearDiscItems(); var discsList = discs.ToList(); var libraryArtists = await artistService.GetAllArtists(cancellationToken); var availableGenres = await genreService.GetAllGenres(cancellationToken); // For genre guessing we use all discs, including deleted. var allDiscs = await discService.GetAllDiscs(cancellationToken); foreach (var addedDiscInfo in discsList) { var parentFolder = await folderProvider.GetFolder(addedDiscInfo.DestinationFolderPath, cancellationToken); var folderExists = parentFolder != null; var existingDisc = parentFolder?.Discs.SingleOrDefault(d => d.TreeTitle == addedDiscInfo.TreeTitle); var availableArtists = BuildAvailableArtistsList(addedDiscInfo, libraryArtists); DiscViewItem discViewItem = existingDisc != null ? new ExistingDiscViewItem(existingDisc, addedDiscInfo, availableArtists, availableGenres) : new NewDiscViewItem(addedDiscInfo, folderExists, availableArtists, availableGenres, GuessArtistGenre(allDiscs, addedDiscInfo.Artist)); discViewItem.PropertyChanged += DiscItem_PropertyChanged; Discs.Add(discViewItem); } }
public ActionResult GetAllArtist() { var model = _artistsService.GetAllArtists(); return(PartialView(model)); }
public IActionResult Get() { var artists = artistsService.GetAllArtists(); return(Ok(artists)); }
public IActionResult Index() { var artists = artistsService.GetAllArtists(); return(View(artists)); }