aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/LibraryController.cs
diff options
context:
space:
mode:
authorMatt Montgomery <33811686+ConfusedPolarBear@users.noreply.github.com>2020-08-26 10:29:37 -0500
committerMatt Montgomery <33811686+ConfusedPolarBear@users.noreply.github.com>2020-08-26 10:29:37 -0500
commit2974a0248a5941f8b784a7bc99c17b1080b7d06f (patch)
tree1eec54868d88648684ca96e1ed6405e4372d5a95 /Jellyfin.Api/Controllers/LibraryController.cs
parent1ff4f8e6c64b453eb9096b8da09f4041dbd463fc (diff)
parent4e3f26b647a9fe996b5a96ea10fa1f2468ea41fb (diff)
Merge remote-tracking branch 'upstream/master' into quickconnect
Diffstat (limited to 'Jellyfin.Api/Controllers/LibraryController.cs')
-rw-r--r--Jellyfin.Api/Controllers/LibraryController.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/LibraryController.cs b/Jellyfin.Api/Controllers/LibraryController.cs
index 4548e202a..796d2d8aa 100644
--- a/Jellyfin.Api/Controllers/LibraryController.cs
+++ b/Jellyfin.Api/Controllers/LibraryController.cs
@@ -619,7 +619,7 @@ namespace Jellyfin.Api.Controllers
[Authorize(Policy = Policies.Download)]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
- public ActionResult GetDownload([FromRoute] Guid itemId)
+ public async Task<ActionResult> GetDownload([FromRoute] Guid itemId)
{
var item = _libraryManager.GetItemById(itemId);
if (item == null)
@@ -648,7 +648,7 @@ namespace Jellyfin.Api.Controllers
if (user != null)
{
- LogDownload(item, user, auth);
+ await LogDownloadAsync(item, user, auth).ConfigureAwait(false);
}
var path = item.Path;
@@ -861,17 +861,17 @@ namespace Jellyfin.Api.Controllers
: item;
}
- private void LogDownload(BaseItem item, User user, AuthorizationInfo auth)
+ private async Task LogDownloadAsync(BaseItem item, User user, AuthorizationInfo auth)
{
try
{
- _activityManager.Create(new ActivityLog(
+ await _activityManager.CreateAsync(new ActivityLog(
string.Format(CultureInfo.InvariantCulture, _localization.GetLocalizedString("UserDownloadingItemWithValues"), user.Username, item.Name),
"UserDownloadingContent",
auth.UserId)
{
ShortOverview = string.Format(CultureInfo.InvariantCulture, _localization.GetLocalizedString("AppDeviceValues"), auth.Client, auth.Device),
- });
+ }).ConfigureAwait(false);
}
catch
{