From 1a9e2dfd83dbab2e9a5f277229c5994253fd8a9a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 17 Feb 2014 16:35:08 -0500 Subject: fixed themoviedb search returning no results --- .../Library/LibraryStructureService.cs | 44 +++++++--------------- 1 file changed, 13 insertions(+), 31 deletions(-) (limited to 'MediaBrowser.Api/Library/LibraryStructureService.cs') diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index ed086398f..ff4f78c96 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -1,6 +1,5 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller; -using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Logging; @@ -167,32 +166,30 @@ namespace MediaBrowser.Api.Library public bool RefreshLibrary { get; set; } } - [Route("/Library/Changes/New", "POST")] - public class ReportChangedPath : IReturnVoid + [Route("/Library/Downloaded", "POST")] + public class ReportContentDownloaded : IReturnVoid { - /// - /// Gets or sets the name. - /// - /// The name. - [ApiMember(Name = "Path", Description = "The path that was changed.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] + [ApiMember(Name = "Path", Description = "The path being downloaded to.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] public string Path { get; set; } [ApiMember(Name = "ImageUrl", Description = "Optional thumbnail image url of the content.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")] public string ImageUrl { get; set; } + + [ApiMember(Name = "Name", Description = "The name of the content.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")] + public string Name { get; set; } } - [Route("/Library/Episodes/New", "POST")] - public class ReportNewEpisode : IReturnVoid + [Route("/Library/Downloading", "POST")] + public class ReportContentDownloading : IReturnVoid { - /// - /// Gets or sets the name. - /// - /// The name. - [ApiMember(Name = "TvdbId", Description = "The tvdb id of the new episode.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] - public string TvdbId { get; set; } + [ApiMember(Name = "Path", Description = "The path being downloaded to.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] + public string Path { get; set; } [ApiMember(Name = "ImageUrl", Description = "Optional thumbnail image url of the content.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")] public string ImageUrl { get; set; } + + [ApiMember(Name = "Name", Description = "The name of the content.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")] + public string Name { get; set; } } /// @@ -242,21 +239,6 @@ namespace MediaBrowser.Api.Library _logger = logger; } - /// - /// Posts the specified request. - /// - /// The request. - /// Please supply a Path - public void Post(ReportChangedPath request) - { - if (string.IsNullOrEmpty(request.Path)) - { - throw new ArgumentException("Please supply a Path"); - } - - _libraryMonitor.ReportFileSystemChanged(request.Path); - } - /// /// Gets the specified request. /// -- cgit v1.2.3