diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-07-06 23:08:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-06 23:08:52 +0200 |
| commit | 82f041d050f998d20818efff063b6000dfcbf5d2 (patch) | |
| tree | 3be5cf1a79180c57a5381e26f60d61088a27b49e /MediaBrowser.Api/Library/LibraryService.cs | |
| parent | 4f17ed961e2756e0c65b1bb0246e7f62a5f44a8a (diff) | |
| parent | ba551b48e1e1c80192e10b1bb340d974c6b6dee2 (diff) | |
Merge branch 'master' into release-10.3.z
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryService.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryService.cs | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 9f8da9c16..cee96f7ab 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -490,18 +490,6 @@ namespace MediaBrowser.Api.Library { return false; } - else if (string.Equals(name, "FanArt", StringComparison.OrdinalIgnoreCase)) - { - if (string.Equals(type, "Season", StringComparison.OrdinalIgnoreCase)) - { - return false; - } - if (string.Equals(type, "MusicVideo", StringComparison.OrdinalIgnoreCase)) - { - return false; - } - return true; - } else if (string.Equals(name, "TheAudioDB", StringComparison.OrdinalIgnoreCase)) { return true; @@ -999,19 +987,16 @@ namespace MediaBrowser.Api.Library /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> - public void Post(RefreshLibrary request) + public async Task Post(RefreshLibrary request) { - Task.Run(() => + try { - try - { - _libraryManager.ValidateMediaLibrary(new SimpleProgress<double>(), CancellationToken.None); - } - catch (Exception ex) - { - Logger.LogError(ex, "Error refreshing library"); - } - }); + await _libraryManager.ValidateMediaLibrary(new SimpleProgress<double>(), CancellationToken.None).ConfigureAwait(false); + } + catch (Exception ex) + { + Logger.LogError(ex, "Error refreshing library"); + } } /// <summary> |
