diff --git a/src/Hqub.Lastfm/Entities/Track.cs b/src/Hqub.Lastfm/Entities/Track.cs
index b6dba6a..b4a6f3b 100644
--- a/src/Hqub.Lastfm/Entities/Track.cs
+++ b/src/Hqub.Lastfm/Entities/Track.cs
@@ -83,6 +83,21 @@ public class Track
///
public Statistics Statistics { get; set; }
+ ///
+ /// Gets or sets user playcount (available only with track.getInfo).
+ ///
+ public int UserPlayCount { get; set; }
+
+ ///
+ /// Gets or sets user loved status (available only with track.getInfo).
+ ///
+ public bool UserLoved { get; set; }
+
+ ///
+ /// Gets or sets now playing status (available only for users, i.e. user.getRecentTracks).
+ ///
+ public bool NowPlaying { get; internal set; }
+
#endregion
}
}
diff --git a/src/Hqub.Lastfm/ResponseParser.cs b/src/Hqub.Lastfm/ResponseParser.cs
index 4d3fec8..5d8549f 100644
--- a/src/Hqub.Lastfm/ResponseParser.cs
+++ b/src/Hqub.Lastfm/ResponseParser.cs
@@ -613,9 +613,7 @@ private Track ParseTrack(XElement node)
if ((a = node.Attribute("nowplaying")) != null)
{
- // TODO: nowplaying
-
- //track.NowPlaying = a.Value.Equals("true", StringComparison.OrdinalIgnoreCase);
+ track.NowPlaying = a.Value.Equals("true", StringComparison.OrdinalIgnoreCase);
}
if ((e = node.Element("date")) != null)
@@ -681,6 +679,16 @@ private Track ParseTrack(XElement node)
track.Wiki = ParseWiki(e);
}
+ if ((e = node.Element("userplaycount")) != null)
+ {
+ track.UserPlayCount = int.Parse(e.Value);
+ }
+
+ if ((e = node.Element("userloved")) != null)
+ {
+ track.UserLoved = int.Parse(e.Value) == 1;
+ }
+
track.Images = ParseImages(node.Elements("image"));
return track;