/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public async Task Post(RefreshLibrary request) { try { await _libraryManager.ValidateMediaLibrary(new SimpleProgress <double>(), CancellationToken.None).ConfigureAwait(false); } catch (Exception ex) { Logger.LogError(ex, "Error refreshing library"); } }
/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public void Post(RefreshLibrary request) { try { _libraryManager.ValidateMediaLibrary(new Progress <double>(), CancellationToken.None); } catch (Exception ex) { Logger.ErrorException("Error refreshing library", ex); } }
/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public void Post(RefreshLibrary request) { Task.Run(() => { try { _libraryManager.ValidateMediaLibrary(new SimpleProgress <double>(), CancellationToken.None); } catch (Exception ex) { Logger.LogError(ex, "Error refreshing library"); } }); }