update musicbrainz
This commit is contained in:
parent
461e9b2cdd
commit
e8e5a314c5
|
@ -339,7 +339,14 @@ namespace MediaBrowser.Providers.Music
|
||||||
{
|
{
|
||||||
var urls = await RefreshMzbUrls().ConfigureAwait(false);
|
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;
|
return _chosenUrl;
|
||||||
|
@ -361,6 +368,7 @@ namespace MediaBrowser.Providers.Music
|
||||||
{
|
{
|
||||||
list = _json.DeserializeFromStream<List<MbzUrl>>(stream);
|
list = _json.DeserializeFromStream<List<MbzUrl>>(stream);
|
||||||
}
|
}
|
||||||
|
_lastMbzUrlQueryTicks = DateTime.UtcNow.Ticks;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,7 +93,7 @@ namespace MediaBrowser.Providers.Music
|
||||||
{
|
{
|
||||||
if (string.Equals(child.Name, "name", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(child.Name, "name", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
name = node.InnerText;
|
name = child.InnerText;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user