update music brainz album responses
This commit is contained in:
parent
cc2ac9e387
commit
825f0f3507
|
@ -293,11 +293,33 @@ namespace MediaBrowser.Providers.Music
|
||||||
|
|
||||||
var doc = await GetMusicBrainzResponse(url, false, cancellationToken).ConfigureAwait(false);
|
var doc = await GetMusicBrainzResponse(url, false, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var ns = new XmlNamespaceManager(doc.NameTable);
|
var docElem = doc.DocumentElement;
|
||||||
ns.AddNamespace("mb", MusicBrainzBaseUrl + "/ns/mmd-2.0#");
|
|
||||||
var node = doc.SelectSingleNode("//mb:release-group-list/mb:release-group/@id", ns);
|
|
||||||
|
|
||||||
return node != null ? node.Value : null;
|
if (docElem == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var releaseList = docElem.FirstChild;
|
||||||
|
if (releaseList == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var nodes = releaseList.ChildNodes;
|
||||||
|
string releaseGroupId = null;
|
||||||
|
|
||||||
|
if (nodes != null)
|
||||||
|
{
|
||||||
|
foreach (var node in nodes.Cast<XmlNode>())
|
||||||
|
{
|
||||||
|
if (string.Equals(node.Name, "release-group", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return node.Attributes["id"].Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -44,6 +44,11 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//if (item is Movie)
|
||||||
|
//{
|
||||||
|
// list.Add(Path.Combine(item.ContainingFolderPath, "movie.nfo"));
|
||||||
|
//}
|
||||||
|
|
||||||
list.Add(Path.ChangeExtension(item.Path, ".nfo"));
|
list.Add(Path.ChangeExtension(item.Path, ".nfo"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user