aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Library/LibraryService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryService.cs')
-rw-r--r--MediaBrowser.Api/Library/LibraryService.cs17
1 files changed, 10 insertions, 7 deletions
diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs
index 695718a25..15c1cbe82 100644
--- a/MediaBrowser.Api/Library/LibraryService.cs
+++ b/MediaBrowser.Api/Library/LibraryService.cs
@@ -680,14 +680,17 @@ namespace MediaBrowser.Api.Library
/// <param name="request">The request.</param>
public void Post(RefreshLibrary request)
{
- try
- {
- _libraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None);
- }
- catch (Exception ex)
+ Task.Run(() =>
{
- Logger.ErrorException("Error refreshing library", ex);
- }
+ try
+ {
+ _libraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None);
+ }
+ catch (Exception ex)
+ {
+ Logger.ErrorException("Error refreshing library", ex);
+ }
+ });
}
/// <summary>