Add rank attribute to track

This commit is contained in:
Harry 2014-10-07 15:09:59 -04:00
parent 9d93743c2b
commit 8f4b84dca1

View File

@ -30,6 +30,7 @@ public class LastTrack : ILastFmObject
public DateTime? TimePlayed { get; set; } public DateTime? TimePlayed { get; set; }
public bool? IsLoved { get; set; } public bool? IsLoved { get; set; }
public bool? IsNowPlaying { get; set; } public bool? IsNowPlaying { get; set; }
public int Rank { get; set; }
#endregion #endregion
@ -92,6 +93,7 @@ internal static LastTrack ParseJToken(JToken token)
if (attrToken != null && attrToken.HasValues) if (attrToken != null && attrToken.HasValues)
{ {
t.IsNowPlaying = attrToken.Value<bool>("nowplaying"); t.IsNowPlaying = attrToken.Value<bool>("nowplaying");
t.Rank = attrToken.Value<int>("rank");
} }
// api returns milliseconds when track.getInfo is called directly // api returns milliseconds when track.getInfo is called directly