mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-25 23:46:27 +00:00
30 lines
729 B
C#
30 lines
729 B
C#
using Newtonsoft.Json;
|
|
|
|
namespace SpotifyAPI.Web
|
|
{
|
|
public class CurrentlyPlaying
|
|
{
|
|
public Context Context { get; set; } = default!;
|
|
public string CurrentlyPlayingType { get; set; } = default!;
|
|
public bool IsPlaying { get; set; }
|
|
|
|
/// <summary>
|
|
/// Can be a FullTrack or FullEpisode
|
|
/// </summary>
|
|
/// <value></value>
|
|
[JsonConverter(typeof(PlayableItemConverter))]
|
|
public BasePlayableItem Item { get; set; } = default!;
|
|
public int? ProgressMs { get; set; }
|
|
public long Timestamp { get; set; }
|
|
}
|
|
|
|
public class CurrentlyPlaying<T>: CurrentlyPlaying where T : BasePlayableItem
|
|
{
|
|
public new T Item {
|
|
get => (T) base.Item;
|
|
set => base.Item = value;
|
|
}
|
|
}
|
|
}
|
|
|