aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Library/LibraryStructureService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryStructureService.cs')
-rw-r--r--MediaBrowser.Api/Library/LibraryStructureService.cs25
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>