Skip to content

Commit

Permalink
cleanup of Session Metadata Model
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Jensen authored and Kevin Jensen committed Oct 18, 2022
1 parent 39ec752 commit 1e5a8dd
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 198 deletions.
30 changes: 0 additions & 30 deletions Source/Plex.ServerApi/PlexModels/Server/Sessions/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,22 @@ namespace Plex.ServerApi.PlexModels.Server.Sessions

public class Player
{
[JsonPropertyName("address")]
public string Address { get; set; }

[JsonPropertyName("device")]
public string Device { get; set; }

[JsonPropertyName("machineIdentifier")]
public string MachineIdentifier { get; set; }

[JsonPropertyName("model")]
public string Model { get; set; }

[JsonPropertyName("platform")]
public string Platform { get; set; }

[JsonPropertyName("platformVersion")]
public string PlatformVersion { get; set; }

[JsonPropertyName("product")]
public string Product { get; set; }

[JsonPropertyName("profile")]
public string Profile { get; set; }

[JsonPropertyName("remotePublicAddress")]
public string RemotePublicAddress { get; set; }

[JsonPropertyName("state")]
public string State { get; set; }

[JsonPropertyName("title")]
public string Title { get; set; }

[JsonPropertyName("vendor")]
public string Vendor { get; set; }

[JsonPropertyName("version")]
public string Version { get; set; }

[JsonPropertyName("local")]
public bool Local { get; set; }

[JsonPropertyName("relayed")]
public bool Relayed { get; set; }

[JsonPropertyName("secure")]
public bool Secure { get; set; }

[JsonPropertyName("userID")]
Expand Down
261 changes: 93 additions & 168 deletions Source/Plex.ServerApi/PlexModels/Server/Sessions/SessionMetadata.cs
Original file line number Diff line number Diff line change
@@ -1,171 +1,96 @@
namespace Plex.ServerApi.PlexModels.Server.Sessions
{
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Media;

public class SessionMetadata
{
[JsonPropertyName("addedAt")]
public long AddedAt { get; set; }

[JsonPropertyName("art")]
public string Art { get; set; }

[JsonPropertyName("audienceRating")]
public double AudienceRating { get; set; }

[JsonPropertyName("audienceRatingImage")]
public string AudienceRatingImage { get; set; }

[JsonPropertyName("contentRating")]
public string ContentRating { get; set; }

[JsonPropertyName("duration")]
public long Duration { get; set; }

[JsonPropertyName("grandparentArt")]
public string GrandparentArt { get; set; }

[JsonPropertyName("grandparentGuid")]
public string GrandparentGuid { get; set; }

[JsonPropertyName("grandparentKey")]
public string GrandparentKey { get; set; }

[JsonPropertyName("grandparentRatingKey")]
public string GrandparentRatingKey { get; set; }

[JsonPropertyName("grandparentTheme")]
public string GrandparentTheme { get; set; }

[JsonPropertyName("grandparentThumb")]
public string GrandparentThumb { get; set; }

[JsonPropertyName("grandparentTitle")]
public string GrandparentTitle { get; set; }

[JsonPropertyName("guid")]
public string Guid { get; set; }

[JsonPropertyName("index")]
public int Index { get; set; }

[JsonPropertyName("key")]
public string Key { get; set; }

[JsonPropertyName("librarySectionID")]
public string LibrarySectionId { get; set; }

[JsonPropertyName("librarySectionKey")]
public string LibrarySectionKey { get; set; }

[JsonPropertyName("librarySectionTitle")]
public string LibrarySectionTitle { get; set; }

[JsonPropertyName("originallyAvailableAt")]
public string OriginallyAvailableAt { get; set; }

[JsonPropertyName("parentGuid")]
public string ParentGuid { get; set; }

[JsonPropertyName("parentIndex")]
public int ParentIndex { get; set; }

[JsonPropertyName("parentKey")]
public string ParentKey { get; set; }

[JsonPropertyName("parentRatingKey")]
public string ParentRatingKey { get; set; }

[JsonPropertyName("parentThumb")]
public string ParentThumb { get; set; }

[JsonPropertyName("parentTitle")]
public string ParentTitle { get; set; }
namespace Plex.ServerApi.PlexModels.Server.Sessions;

[JsonPropertyName("rating")]
public double Rating { get; set; }
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Media;

[JsonPropertyName("studio")]
public string Studio { get; set; }

[JsonPropertyName("ratingKey")]
public string RatingKey { get; set; }

[JsonPropertyName("sessionKey")]
public string SessionKey { get; set; }

[JsonPropertyName("summary")]
public string Summary { get; set; }

[JsonPropertyName("tagline")]
public string Tagline { get; set; }

[JsonPropertyName("thumb")]
public string Thumb { get; set; }

[JsonPropertyName("title")]
public string Title { get; set; }

[JsonPropertyName("type")]
public string Type { get; set; }

[JsonPropertyName("updatedAt")]
public long UpdatedAt { get; set; }

[JsonPropertyName("viewOffset")]
public long ViewOffset { get; set; }

[JsonPropertyName("year")]
public int Year { get; set; }

[JsonPropertyName("Media")]
public List<Medium> Media { get; set; }

[JsonPropertyName("User")]
public User User { get; set; }

[JsonPropertyName("Player")]
public Player Player { get; set; }

[JsonPropertyName("Session")]
public Session Session { get; set; }

[JsonPropertyName("chapterSource")]
public string ChapterSource { get; set; }

[JsonPropertyName("lastViewedAt")]
public long LastViewedAt { get; set; }

[JsonPropertyName("titleSort")]
public string TitleSort { get; set; }

[JsonPropertyName("Writer")]
public List<Writer> Writers { get; set; }

[JsonPropertyName("Director")]
public List<Director> Directors { get; set; }

[JsonPropertyName("Genre")]
public List<Genre> Genres { get; set; }

[JsonPropertyName("Role")]
public List<MediaRole> Roles { get; set; }

[JsonPropertyName("Producer")]
public List<Producer> Producers { get; set; }

[JsonPropertyName("TranscodeSession")]
public TranscodeSession TranscodeSessions { get; set; }

[JsonPropertyName("Collection")]
public List<Collection> Collections { get; set; }

[JsonPropertyName("Similar")]
public List<Similar> Similar { get; set; }

[JsonPropertyName("Chapter")]
public List<Chapter> Chapters { get; set; }
}
public class SessionMetadata
{
public long AddedAt { get; set; }
public string Art { get; set; }
public double AudienceRating { get; set; }
public string AudienceRatingImage { get; set; }
public string ChapterSource { get; set; }
public string ContentRating { get; set; }
public long Duration { get; set; }
public string GrandparentArt { get; set; }
public string GrandparentGuid { get; set; }
public string GrandparentKey { get; set; }
public string GrandparentRatingKey { get; set; }
public string GrandparentTheme { get; set; }
public string GrandparentThumb { get; set; }
public string GrandparentTitle { get; set; }
public string Guid { get; set; }
public int Index { get; set; }
public string Key { get; set; }

[JsonPropertyName("librarySectionID")]
public string LibrarySectionId { get; set; }

public string LibrarySectionKey { get; set; }
public string LibrarySectionTitle { get; set; }
public string MusicAnalysisVersion { get; set; }
public string OriginallyAvailableAt { get; set; }
public long LastViewedAt { get; set; }

public string ParentGuid { get; set; }
public int ParentIndex { get; set; }
public string ParentKey { get; set; }
public string ParentRatingKey { get; set; }
public int ParentYear { get; set; }
public string ParentThumb { get; set; }
public string ParentTitle { get; set; }
public double Rating { get; set; }
public int RatingCount { get; set; }
public string Studio { get; set; }
public string RatingKey { get; set; }
public string SessionKey { get; set; }
public string Summary { get; set; }
public string Tagline { get; set; }
public string Thumb { get; set; }
public string Title { get; set; }
public string TitleSort { get; set; }
public string Type { get; set; }
public long UpdatedAt { get; set; }
public long ViewOffset { get; set; }
public int Year { get; set; }

[JsonPropertyName("Media")]
public List<Medium> Media { get; set; }

[JsonPropertyName("User")]
public User User { get; set; }

[JsonPropertyName("Player")]
public Player Player { get; set; }

[JsonPropertyName("Session")]
public Session Session { get; set; }

[JsonPropertyName("Writer")]
public List<Writer> Writers { get; set; }

[JsonPropertyName("Director")]
public List<Director> Directors { get; set; }

[JsonPropertyName("Genre")]
public List<Genre> Genres { get; set; }

[JsonPropertyName("Role")]
public List<MediaRole> Roles { get; set; }

[JsonPropertyName("Producer")]
public List<Producer> Producers { get; set; }

[JsonPropertyName("TranscodeSession")]
public TranscodeSession TranscodeSessions { get; set; }

[JsonPropertyName("Collection")]
public List<Collection> Collections { get; set; }

[JsonPropertyName("Similar")]
public List<Similar> Similar { get; set; }

[JsonPropertyName("Chapter")]
public List<Chapter> Chapters { get; set; }
}

0 comments on commit 1e5a8dd

Please sign in to comment.