diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-02-10 23:55:01 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-02-10 23:55:01 -0500 |
| commit | 17bf59dfe3bad4a1341177050c4187bbd3215800 (patch) | |
| tree | 536b700bf801534640854d0455295c56315014c4 /MediaBrowser.Api | |
| parent | cf9ef0e43d01decd743c5444785ee247bda3cb32 (diff) | |
added toggles for metadata settings
Diffstat (limited to 'MediaBrowser.Api')
| -rw-r--r-- | MediaBrowser.Api/Images/RemoteImageService.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryStructureService.cs | 21 |
2 files changed, 27 insertions, 3 deletions
diff --git a/MediaBrowser.Api/Images/RemoteImageService.cs b/MediaBrowser.Api/Images/RemoteImageService.cs index 49a582937f..960de017de 100644 --- a/MediaBrowser.Api/Images/RemoteImageService.cs +++ b/MediaBrowser.Api/Images/RemoteImageService.cs @@ -221,10 +221,17 @@ namespace MediaBrowser.Api.Images var imagesList = images.ToList(); + var allProviders = _providerManager.GetRemoteImageProviderInfo(item); + + if (request.Type.HasValue) + { + allProviders = allProviders.Where(i => i.SupportedImages.Contains(request.Type.Value)); + } + var result = new RemoteImageResult { TotalRecordCount = imagesList.Count, - Providers = imagesList.Select(i => i.ProviderName) + Providers = allProviders.Select(i => i.Name) .Distinct(StringComparer.OrdinalIgnoreCase) .ToList() }; diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index f08d79c0db..ed086398ff 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -167,15 +167,32 @@ namespace MediaBrowser.Api.Library public bool RefreshLibrary { get; set; } } - [Route("/Library/Changes/Path", "POST")] + [Route("/Library/Changes/New", "POST")] public class ReportChangedPath : IReturnVoid { /// <summary> /// Gets or sets the name. /// </summary> /// <value>The name.</value> - [ApiMember(Name = "Path", Description = "The path that was changed.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")] + [ApiMember(Name = "Path", Description = "The path that was changed.", 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; } + } + + [Route("/Library/Episodes/New", "POST")] + public class ReportNewEpisode : IReturnVoid + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + [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 = "ImageUrl", Description = "Optional thumbnail image url of the content.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")] + public string ImageUrl { get; set; } } /// <summary> |
