diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-01-23 01:59:52 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-23 01:59:52 +0900 |
| commit | 1dd4abebbd08045371867d7de06fc7fe6330e220 (patch) | |
| tree | e941d3526449f7b9bf9d230ed98968c792dfd3c7 /Emby.Dlna/ContentDirectory | |
| parent | d4de78693fcaf97aa5a94124b35e4d6145bdfa55 (diff) | |
| parent | 5340eb9363f006e61b4574a30091bfdd43a0772b (diff) | |
Merge pull request #2297 from Bond-009/asyncio
Kestrel doesn't like sync IO operations
Diffstat (limited to 'Emby.Dlna/ContentDirectory')
| -rw-r--r-- | Emby.Dlna/ContentDirectory/ContentDirectory.cs | 7 | ||||
| -rw-r--r-- | Emby.Dlna/ContentDirectory/ControlHandler.cs | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Emby.Dlna/ContentDirectory/ContentDirectory.cs b/Emby.Dlna/ContentDirectory/ContentDirectory.cs index 78d69b3380..a3062b18fd 100644 --- a/Emby.Dlna/ContentDirectory/ContentDirectory.cs +++ b/Emby.Dlna/ContentDirectory/ContentDirectory.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using Emby.Dlna.Service; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Configuration; @@ -66,12 +67,14 @@ namespace Emby.Dlna.ContentDirectory } } + /// <inheritdoc /> public string GetServiceXml() { return new ContentDirectoryXmlBuilder().GetXml(); } - public ControlResponse ProcessControlRequest(ControlRequest request) + /// <inheritdoc /> + public Task<ControlResponse> ProcessControlRequestAsync(ControlRequest request) { var profile = _dlna.GetProfile(request.Headers) ?? _dlna.GetDefaultProfile(); @@ -96,7 +99,7 @@ namespace Emby.Dlna.ContentDirectory _userViewManager, _mediaEncoder, _tvSeriesManager) - .ProcessControlRequest(request); + .ProcessControlRequestAsync(request); } private User GetUser(DeviceProfile profile) diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index 2068e1d2aa..396649c5ea 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -76,7 +76,7 @@ namespace Emby.Dlna.ContentDirectory _profile = profile; _config = config; - _didlBuilder = new DidlBuilder(profile, user, imageProcessor, serverAddress, accessToken, userDataManager, localization, mediaSourceManager, _logger, mediaEncoder); + _didlBuilder = new DidlBuilder(profile, user, imageProcessor, serverAddress, accessToken, userDataManager, localization, mediaSourceManager, Logger, mediaEncoder); } protected override IEnumerable<KeyValuePair<string, string>> GetResult(string methodName, IDictionary<string, string> methodParams) @@ -1336,7 +1336,7 @@ namespace Emby.Dlna.ContentDirectory }; } - _logger.LogError("Error parsing item Id: {id}. Returning user root folder.", id); + Logger.LogError("Error parsing item Id: {id}. Returning user root folder.", id); return new ServerItem(_libraryManager.GetUserRootFolder()); } |
