Fix Radios crash
This commit is contained in:
parent
4136c13d5b
commit
f95b884d16
@ -78,16 +78,24 @@ namespace unison
|
|||||||
|
|
||||||
public async void Initialize()
|
public async void Initialize()
|
||||||
{
|
{
|
||||||
List<NameAndCount> Countries = await _radioBrowser.Lists.GetCountriesAsync();
|
try
|
||||||
CountryList.Items.Add(new CountryListItem { Name = "", Count = 0 });
|
|
||||||
|
|
||||||
foreach (NameAndCount Country in Countries)
|
|
||||||
{
|
{
|
||||||
CountryList.Items.Add(new CountryListItem
|
List<NameAndCount> Countries = await _radioBrowser.Lists.GetCountriesAsync();
|
||||||
|
CountryList.Items.Add(new CountryListItem { Name = "", Count = 0 });
|
||||||
|
|
||||||
|
foreach (NameAndCount Country in Countries)
|
||||||
{
|
{
|
||||||
Name = Country.Name,
|
CountryList.Items.Add(new CountryListItem
|
||||||
Count = Country.Stationcount
|
{
|
||||||
});
|
Name = Country.Name,
|
||||||
|
Count = Country.Stationcount
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.WriteLine("Exception while getting countries in RadioBrowser: " + e.Message);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user