Skip to content

Commit ec99296

Browse files
aleabJohnnyCrazy
authored andcommitted
Added missing currently_playing_type field to PlaybackContext (#292)
1 parent 6591b5f commit ec99296

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

SpotifyAPI.Web/Enums/TrackType.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
3+
namespace SpotifyAPI.Web.Enums
4+
{
5+
[Flags]
6+
public enum TrackType
7+
{
8+
[String("track")]
9+
Track = 1,
10+
11+
[String("episode")]
12+
Episode = 2,
13+
14+
[String("ad")]
15+
Ad = 4,
16+
17+
[String("unknown")]
18+
Unknown = 8
19+
}
20+
}

SpotifyAPI.Web/Models/PlaybackContext.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,9 @@ public class PlaybackContext : BasicModel
3131

3232
[JsonProperty("item")]
3333
public FullTrack Item { get; set; }
34+
35+
[JsonProperty("currently_playing_type")]
36+
[JsonConverter(typeof(StringEnumConverter))]
37+
public TrackType CurrentlyPlayingType { get; set; }
3438
}
3539
}

0 commit comments

Comments
 (0)