[banshee] [Xspf] Look for extended values inside the "extension" node
- From: Bertrand Lorentz <blorentz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] [Xspf] Look for extended values inside the "extension" node
- Date: Fri, 20 Nov 2009 20:46:58 +0000 (UTC)
commit 7bbc828d3ad08c83981938d6b230a4e15e9c5dba
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Fri Nov 20 21:41:55 2009 +0100
[Xspf] Look for extended values inside the "extension" node
Last.fm now puts the trackauth tag inside the extension node, as per the
XSPF spec, so we need to get it from there. Fixes BGO#602386.
.../Mono.Media/Media.Playlists.Xspf/Track.cs | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/Libraries/Mono.Media/Media.Playlists.Xspf/Track.cs b/src/Libraries/Mono.Media/Media.Playlists.Xspf/Track.cs
index 55efe52..1c06625 100644
--- a/src/Libraries/Mono.Media/Media.Playlists.Xspf/Track.cs
+++ b/src/Libraries/Mono.Media/Media.Playlists.Xspf/Track.cs
@@ -49,7 +49,7 @@ namespace Media.Playlists.Xspf
private Playlist parent;
- private XmlNode ctor_node;
+ private XmlNode extension_node;
public Track()
{
@@ -70,7 +70,7 @@ namespace Media.Playlists.Xspf
LoadBase(node, xmlns);
- ctor_node = node;
+ extension_node = node.SelectSingleNode ("xspf:extension", xmlns);
album = XmlUtil.ReadString(node, xmlns, "xspf:album");
@@ -100,10 +100,14 @@ namespace Media.Playlists.Xspf
}
}
- // XXX: Better solution could probably be achieved?
+ // TODO: Better solution could probably be achieved?
public string GetExtendedValue (string key)
{
- foreach (XmlNode n in ctor_node) {
+ if (extension_node == null) {
+ return null;
+ }
+
+ foreach (XmlNode n in extension_node) {
if (n.LocalName == key) {
return n.InnerText;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]