Skip to content

Commit 1e5a8dd

Browse files
Kevin JensenKevin Jensen
authored andcommitted
cleanup of Session Metadata Model
1 parent 39ec752 commit 1e5a8dd

File tree

2 files changed

+93
-198
lines changed

2 files changed

+93
-198
lines changed

Source/Plex.ServerApi/PlexModels/Server/Sessions/Player.cs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,22 @@ namespace Plex.ServerApi.PlexModels.Server.Sessions
44

55
public class Player
66
{
7-
[JsonPropertyName("address")]
87
public string Address { get; set; }
9-
10-
[JsonPropertyName("device")]
118
public string Device { get; set; }
12-
13-
[JsonPropertyName("machineIdentifier")]
149
public string MachineIdentifier { get; set; }
15-
16-
[JsonPropertyName("model")]
1710
public string Model { get; set; }
18-
19-
[JsonPropertyName("platform")]
2011
public string Platform { get; set; }
21-
22-
[JsonPropertyName("platformVersion")]
2312
public string PlatformVersion { get; set; }
24-
25-
[JsonPropertyName("product")]
2613
public string Product { get; set; }
27-
28-
[JsonPropertyName("profile")]
2914
public string Profile { get; set; }
30-
31-
[JsonPropertyName("remotePublicAddress")]
3215
public string RemotePublicAddress { get; set; }
33-
34-
[JsonPropertyName("state")]
3516
public string State { get; set; }
36-
37-
[JsonPropertyName("title")]
3817
public string Title { get; set; }
39-
40-
[JsonPropertyName("vendor")]
4118
public string Vendor { get; set; }
42-
43-
[JsonPropertyName("version")]
4419
public string Version { get; set; }
4520

46-
[JsonPropertyName("local")]
4721
public bool Local { get; set; }
48-
49-
[JsonPropertyName("relayed")]
5022
public bool Relayed { get; set; }
51-
52-
[JsonPropertyName("secure")]
5323
public bool Secure { get; set; }
5424

5525
[JsonPropertyName("userID")]
Lines changed: 93 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -1,171 +1,96 @@
1-
namespace Plex.ServerApi.PlexModels.Server.Sessions
2-
{
3-
using System.Collections.Generic;
4-
using System.Text.Json.Serialization;
5-
using Media;
6-
7-
public class SessionMetadata
8-
{
9-
[JsonPropertyName("addedAt")]
10-
public long AddedAt { get; set; }
11-
12-
[JsonPropertyName("art")]
13-
public string Art { get; set; }
14-
15-
[JsonPropertyName("audienceRating")]
16-
public double AudienceRating { get; set; }
17-
18-
[JsonPropertyName("audienceRatingImage")]
19-
public string AudienceRatingImage { get; set; }
20-
21-
[JsonPropertyName("contentRating")]
22-
public string ContentRating { get; set; }
23-
24-
[JsonPropertyName("duration")]
25-
public long Duration { get; set; }
26-
27-
[JsonPropertyName("grandparentArt")]
28-
public string GrandparentArt { get; set; }
29-
30-
[JsonPropertyName("grandparentGuid")]
31-
public string GrandparentGuid { get; set; }
32-
33-
[JsonPropertyName("grandparentKey")]
34-
public string GrandparentKey { get; set; }
35-
36-
[JsonPropertyName("grandparentRatingKey")]
37-
public string GrandparentRatingKey { get; set; }
38-
39-
[JsonPropertyName("grandparentTheme")]
40-
public string GrandparentTheme { get; set; }
41-
42-
[JsonPropertyName("grandparentThumb")]
43-
public string GrandparentThumb { get; set; }
44-
45-
[JsonPropertyName("grandparentTitle")]
46-
public string GrandparentTitle { get; set; }
47-
48-
[JsonPropertyName("guid")]
49-
public string Guid { get; set; }
50-
51-
[JsonPropertyName("index")]
52-
public int Index { get; set; }
53-
54-
[JsonPropertyName("key")]
55-
public string Key { get; set; }
56-
57-
[JsonPropertyName("librarySectionID")]
58-
public string LibrarySectionId { get; set; }
59-
60-
[JsonPropertyName("librarySectionKey")]
61-
public string LibrarySectionKey { get; set; }
62-
63-
[JsonPropertyName("librarySectionTitle")]
64-
public string LibrarySectionTitle { get; set; }
65-
66-
[JsonPropertyName("originallyAvailableAt")]
67-
public string OriginallyAvailableAt { get; set; }
68-
69-
[JsonPropertyName("parentGuid")]
70-
public string ParentGuid { get; set; }
71-
72-
[JsonPropertyName("parentIndex")]
73-
public int ParentIndex { get; set; }
74-
75-
[JsonPropertyName("parentKey")]
76-
public string ParentKey { get; set; }
77-
78-
[JsonPropertyName("parentRatingKey")]
79-
public string ParentRatingKey { get; set; }
80-
81-
[JsonPropertyName("parentThumb")]
82-
public string ParentThumb { get; set; }
83-
84-
[JsonPropertyName("parentTitle")]
85-
public string ParentTitle { get; set; }
1+
namespace Plex.ServerApi.PlexModels.Server.Sessions;
862

87-
[JsonPropertyName("rating")]
88-
public double Rating { get; set; }
3+
using System.Collections.Generic;
4+
using System.Text.Json.Serialization;
5+
using Media;
896

90-
[JsonPropertyName("studio")]
91-
public string Studio { get; set; }
92-
93-
[JsonPropertyName("ratingKey")]
94-
public string RatingKey { get; set; }
95-
96-
[JsonPropertyName("sessionKey")]
97-
public string SessionKey { get; set; }
98-
99-
[JsonPropertyName("summary")]
100-
public string Summary { get; set; }
101-
102-
[JsonPropertyName("tagline")]
103-
public string Tagline { get; set; }
104-
105-
[JsonPropertyName("thumb")]
106-
public string Thumb { get; set; }
107-
108-
[JsonPropertyName("title")]
109-
public string Title { get; set; }
110-
111-
[JsonPropertyName("type")]
112-
public string Type { get; set; }
113-
114-
[JsonPropertyName("updatedAt")]
115-
public long UpdatedAt { get; set; }
116-
117-
[JsonPropertyName("viewOffset")]
118-
public long ViewOffset { get; set; }
119-
120-
[JsonPropertyName("year")]
121-
public int Year { get; set; }
122-
123-
[JsonPropertyName("Media")]
124-
public List<Medium> Media { get; set; }
125-
126-
[JsonPropertyName("User")]
127-
public User User { get; set; }
128-
129-
[JsonPropertyName("Player")]
130-
public Player Player { get; set; }
131-
132-
[JsonPropertyName("Session")]
133-
public Session Session { get; set; }
134-
135-
[JsonPropertyName("chapterSource")]
136-
public string ChapterSource { get; set; }
137-
138-
[JsonPropertyName("lastViewedAt")]
139-
public long LastViewedAt { get; set; }
140-
141-
[JsonPropertyName("titleSort")]
142-
public string TitleSort { get; set; }
143-
144-
[JsonPropertyName("Writer")]
145-
public List<Writer> Writers { get; set; }
146-
147-
[JsonPropertyName("Director")]
148-
public List<Director> Directors { get; set; }
149-
150-
[JsonPropertyName("Genre")]
151-
public List<Genre> Genres { get; set; }
152-
153-
[JsonPropertyName("Role")]
154-
public List<MediaRole> Roles { get; set; }
155-
156-
[JsonPropertyName("Producer")]
157-
public List<Producer> Producers { get; set; }
158-
159-
[JsonPropertyName("TranscodeSession")]
160-
public TranscodeSession TranscodeSessions { get; set; }
161-
162-
[JsonPropertyName("Collection")]
163-
public List<Collection> Collections { get; set; }
164-
165-
[JsonPropertyName("Similar")]
166-
public List<Similar> Similar { get; set; }
167-
168-
[JsonPropertyName("Chapter")]
169-
public List<Chapter> Chapters { get; set; }
170-
}
7+
public class SessionMetadata
8+
{
9+
public long AddedAt { get; set; }
10+
public string Art { get; set; }
11+
public double AudienceRating { get; set; }
12+
public string AudienceRatingImage { get; set; }
13+
public string ChapterSource { get; set; }
14+
public string ContentRating { get; set; }
15+
public long Duration { get; set; }
16+
public string GrandparentArt { get; set; }
17+
public string GrandparentGuid { get; set; }
18+
public string GrandparentKey { get; set; }
19+
public string GrandparentRatingKey { get; set; }
20+
public string GrandparentTheme { get; set; }
21+
public string GrandparentThumb { get; set; }
22+
public string GrandparentTitle { get; set; }
23+
public string Guid { get; set; }
24+
public int Index { get; set; }
25+
public string Key { get; set; }
26+
27+
[JsonPropertyName("librarySectionID")]
28+
public string LibrarySectionId { get; set; }
29+
30+
public string LibrarySectionKey { get; set; }
31+
public string LibrarySectionTitle { get; set; }
32+
public string MusicAnalysisVersion { get; set; }
33+
public string OriginallyAvailableAt { get; set; }
34+
public long LastViewedAt { get; set; }
35+
36+
public string ParentGuid { get; set; }
37+
public int ParentIndex { get; set; }
38+
public string ParentKey { get; set; }
39+
public string ParentRatingKey { get; set; }
40+
public int ParentYear { get; set; }
41+
public string ParentThumb { get; set; }
42+
public string ParentTitle { get; set; }
43+
public double Rating { get; set; }
44+
public int RatingCount { get; set; }
45+
public string Studio { get; set; }
46+
public string RatingKey { get; set; }
47+
public string SessionKey { get; set; }
48+
public string Summary { get; set; }
49+
public string Tagline { get; set; }
50+
public string Thumb { get; set; }
51+
public string Title { get; set; }
52+
public string TitleSort { get; set; }
53+
public string Type { get; set; }
54+
public long UpdatedAt { get; set; }
55+
public long ViewOffset { get; set; }
56+
public int Year { get; set; }
57+
58+
[JsonPropertyName("Media")]
59+
public List<Medium> Media { get; set; }
60+
61+
[JsonPropertyName("User")]
62+
public User User { get; set; }
63+
64+
[JsonPropertyName("Player")]
65+
public Player Player { get; set; }
66+
67+
[JsonPropertyName("Session")]
68+
public Session Session { get; set; }
69+
70+
[JsonPropertyName("Writer")]
71+
public List<Writer> Writers { get; set; }
72+
73+
[JsonPropertyName("Director")]
74+
public List<Director> Directors { get; set; }
75+
76+
[JsonPropertyName("Genre")]
77+
public List<Genre> Genres { get; set; }
78+
79+
[JsonPropertyName("Role")]
80+
public List<MediaRole> Roles { get; set; }
81+
82+
[JsonPropertyName("Producer")]
83+
public List<Producer> Producers { get; set; }
84+
85+
[JsonPropertyName("TranscodeSession")]
86+
public TranscodeSession TranscodeSessions { get; set; }
87+
88+
[JsonPropertyName("Collection")]
89+
public List<Collection> Collections { get; set; }
90+
91+
[JsonPropertyName("Similar")]
92+
public List<Similar> Similar { get; set; }
93+
94+
[JsonPropertyName("Chapter")]
95+
public List<Chapter> Chapters { get; set; }
17196
}

0 commit comments

Comments
 (0)