From 40b8300e8e72245c802938cd335a7ee962f8193f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 28 Jan 2014 16:51:47 -0500 Subject: added api for external apps to report file system changes --- .../Library/LibraryStructureService.cs | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'MediaBrowser.Api/Library/LibraryStructureService.cs') diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index 56b0e01c3..d0d56c07b 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -167,6 +167,16 @@ namespace MediaBrowser.Api.Library public bool RefreshLibrary { get; set; } } + [Route("/Library/Changes/Path", "POST")] + public class ReportChangedPath : IReturnVoid + { + /// + /// Gets or sets the name. + /// + /// The name. + public string Path { get; set; } + } + /// /// Class LibraryStructureService /// @@ -214,6 +224,21 @@ 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