public async Task <IActionResult> GetAllActualSongs(string stations) { var radio_list = stations.Split('_').ToList(); var songs = await _songRepository.GetActualByRadioAsync(radio_list); return(Json(songs)); }
public async Task <List <IconDto> > GetAllActuallYTAsync() { var stations = new List <string>() { "zet", "rmf", "eska", "rmfmaxx", "zloteprzeboje", "vox", "chillizet" }; var songs = await _radioSongsRepository.GetActualByRadioAsync(stations); var movies = await _tvMovieRepository.GetActuallMovies(); songs = songs.Count > 0 ? songs.OrderByDescending(x => x.countValue).Take(50).ToList() : songs; movies = movies.Count > 0 ? movies.OrderByDescending(x => x.countValue).Take(10).ToList() : movies; songs.AddRange(movies); return(songs); }