update musicbrainz

This commit is contained in:
Luke Pulverenti 2016-06-23 01:25:30 -04:00
parent 461e9b2cdd
commit e8e5a314c5
2 changed files with 10 additions and 2 deletions

View File

@ -339,7 +339,14 @@ namespace MediaBrowser.Providers.Music
{
var urls = await RefreshMzbUrls().ConfigureAwait(false);
_chosenUrl = urls[new Random().Next(0, urls.Count - 1)];
if (urls.Count > 1)
{
_chosenUrl = urls[new Random().Next(0, urls.Count)];
}
else
{
_chosenUrl = urls[0];
}
}
return _chosenUrl;
@ -361,6 +368,7 @@ namespace MediaBrowser.Providers.Music
{
list = _json.DeserializeFromStream<List<MbzUrl>>(stream);
}
_lastMbzUrlQueryTicks = DateTime.UtcNow.Ticks;
}
catch (Exception ex)
{

View File

@ -93,7 +93,7 @@ namespace MediaBrowser.Providers.Music
{
if (string.Equals(child.Name, "name", StringComparison.OrdinalIgnoreCase))
{
name = node.InnerText;
name = child.InnerText;
break;
}
}