public async Task DeleteStationAsync(RadioStation station) { var songs = Songs.Where(p => p.RadioId == station.Id); foreach (var song in songs) { await DeleteSongAsync(song); } await _sqlService.DeleteItemAsync(station); Stations.Remove(station); }
public async void StartRadioStation() { using (var service = CreateCollectionSqlService()) { _station = await service.SelectFirstAsync<RadioStation>(p => p.Id == RadioId); if (_station == null) return; // Create the station manager var radioStationManager = new RadioStationManager(_station.GracenoteId, _station.Id, CreateCollectionSqlService, CreatePlayerSqlService); // Load tracks and add them to the database await radioStationManager.LoadTracksAsync(); await radioStationManager.UpdateQueueAsync(); OnEvent(QueueUpdated); _appSettingsHelper.Write(PlayerConstants.CurrentTrack, radioStationManager.QueueSongs[0].Id); StartRadioTrack(radioStationManager.QueueSongs[0]); } }
public async Task AddStationAsync(RadioStation station) { await _sqlService.InsertAsync(station); Stations.Add(station); }
public Task DeleteStationAsync(RadioStation station) { throw new NotImplementedException(); }