diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-28 16:51:47 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-28 16:51:47 -0500 |
| commit | 40b8300e8e72245c802938cd335a7ee962f8193f (patch) | |
| tree | 53406e2b73976bfc7aed48e7b260a4a6d92349dc /MediaBrowser.Api/Library/LibraryStructureService.cs | |
| parent | 7c5b22246357ef6bcd6d74e61a8fe6a8a9d4df3e (diff) | |
added api for external apps to report file system changes
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryStructureService.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryStructureService.cs | 25 |
1 files changed, 25 insertions, 0 deletions
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 + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + public string Path { get; set; } + } + /// <summary> /// Class LibraryStructureService /// </summary> @@ -215,6 +225,21 @@ namespace MediaBrowser.Api.Library } /// <summary> + /// Posts the specified request. + /// </summary> + /// <param name="request">The request.</param> + /// <exception cref="System.ArgumentException">Please supply a Path</exception> + public void Post(ReportChangedPath request) + { + if (string.IsNullOrEmpty(request.Path)) + { + throw new ArgumentException("Please supply a Path"); + } + + _libraryMonitor.ReportFileSystemChanged(request.Path); + } + + /// <summary> /// Gets the specified request. /// </summary> /// <param name="request">The request.</param> |
