Use async methods

This commit is contained in:
Bond-009
2020-01-21 17:59:41 +01:00
parent 2610f377c0
commit ac3b958c67
8 changed files with 68 additions and 75 deletions

View File

@@ -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)