From f5cb4d6879a741682bfc7225df24397f19c74e1e Mon Sep 17 00:00:00 2001 From: Jamie Rees Date: Thu, 17 Mar 2016 21:53:45 +0000 Subject: [PATCH 01/30] fixed #25 --- PlexRequests.Api.Models/Plex/PlexSearch.cs | 70 +++++++++++++++++++ PlexRequests.Api/ApiRequest.cs | 2 +- .../PlexAvailabilityCheckerTests.cs | 21 ++++++ .../PlexAvailabilityChecker.cs | 5 +- PlexRequests.UI/Modules/SearchModule.cs | 4 +- 5 files changed, 97 insertions(+), 5 deletions(-) diff --git a/PlexRequests.Api.Models/Plex/PlexSearch.cs b/PlexRequests.Api.Models/Plex/PlexSearch.cs index 1d19b18bd..f95efce64 100644 --- a/PlexRequests.Api.Models/Plex/PlexSearch.cs +++ b/PlexRequests.Api.Models/Plex/PlexSearch.cs @@ -238,9 +238,79 @@ public class Provider public string Type { get; set; } } + [XmlRoot(ElementName = "Directory")] + public class Directory1 + { + [XmlElement(ElementName = "Genre")] + public List Genre { get; set; } + [XmlElement(ElementName = "Role")] + public List Role { get; set; } + [XmlAttribute(AttributeName = "allowSync")] + public string AllowSync { get; set; } + [XmlAttribute(AttributeName = "librarySectionID")] + public string LibrarySectionID { get; set; } + [XmlAttribute(AttributeName = "librarySectionTitle")] + public string LibrarySectionTitle { get; set; } + [XmlAttribute(AttributeName = "librarySectionUUID")] + public string LibrarySectionUUID { get; set; } + [XmlAttribute(AttributeName = "personal")] + public string Personal { get; set; } + [XmlAttribute(AttributeName = "sourceTitle")] + public string SourceTitle { get; set; } + [XmlAttribute(AttributeName = "ratingKey")] + public string RatingKey { get; set; } + [XmlAttribute(AttributeName = "key")] + public string Key { get; set; } + [XmlAttribute(AttributeName = "studio")] + public string Studio { get; set; } + [XmlAttribute(AttributeName = "type")] + public string Type { get; set; } + [XmlAttribute(AttributeName = "title")] + public string Title { get; set; } + [XmlAttribute(AttributeName = "contentRating")] + public string ContentRating { get; set; } + [XmlAttribute(AttributeName = "summary")] + public string Summary { get; set; } + [XmlAttribute(AttributeName = "index")] + public string Index { get; set; } + [XmlAttribute(AttributeName = "rating")] + public string Rating { get; set; } + [XmlAttribute(AttributeName = "viewCount")] + public string ViewCount { get; set; } + [XmlAttribute(AttributeName = "lastViewedAt")] + public string LastViewedAt { get; set; } + [XmlAttribute(AttributeName = "year")] + public string Year { get; set; } + [XmlAttribute(AttributeName = "thumb")] + public string Thumb { get; set; } + [XmlAttribute(AttributeName = "art")] + public string Art { get; set; } + [XmlAttribute(AttributeName = "banner")] + public string Banner { get; set; } + [XmlAttribute(AttributeName = "theme")] + public string Theme { get; set; } + [XmlAttribute(AttributeName = "duration")] + public string Duration { get; set; } + [XmlAttribute(AttributeName = "originallyAvailableAt")] + public string OriginallyAvailableAt { get; set; } + [XmlAttribute(AttributeName = "leafCount")] + public string LeafCount { get; set; } + [XmlAttribute(AttributeName = "viewedLeafCount")] + public string ViewedLeafCount { get; set; } + [XmlAttribute(AttributeName = "childCount")] + public string ChildCount { get; set; } + [XmlAttribute(AttributeName = "addedAt")] + public string AddedAt { get; set; } + [XmlAttribute(AttributeName = "updatedAt")] + public string UpdatedAt { get; set; } + } + + [XmlRoot(ElementName = "MediaContainer")] public class PlexSearch { + [XmlElement(ElementName = "Directory")] + public Directory1 Directory { get; set; } [XmlElement(ElementName = "Video")] public List