aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Images/RemoteImageService.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-10-04 14:52:50 -0400
committerGitHub <noreply@github.com>2017-10-04 14:52:50 -0400
commit185fa7f5e76a9971e34c35783698d37902ed14cb (patch)
treea840cff09050c5c76645596bfd99bb5dfd5ad4a0 /MediaBrowser.Api/Images/RemoteImageService.cs
parentc67f03ee97019aff0af41e8c6f4f8525ef90b5e5 (diff)
parent1caae368d5f75d96dada65cd2175831982363c21 (diff)
Merge pull request #2941 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Api/Images/RemoteImageService.cs')
-rw-r--r--MediaBrowser.Api/Images/RemoteImageService.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/MediaBrowser.Api/Images/RemoteImageService.cs b/MediaBrowser.Api/Images/RemoteImageService.cs
index 3512a526b..413762a5c 100644
--- a/MediaBrowser.Api/Images/RemoteImageService.cs
+++ b/MediaBrowser.Api/Images/RemoteImageService.cs
@@ -84,7 +84,7 @@ namespace MediaBrowser.Api.Images
}
[Route("/Items/{Id}/RemoteImages/Download", "POST", Summary = "Downloads a remote image for an item")]
- [Authenticated(Roles="Admin")]
+ [Authenticated(Roles = "Admin")]
public class DownloadRemoteImage : BaseDownloadRemoteImage
{
/// <summary>
@@ -207,7 +207,7 @@ namespace MediaBrowser.Api.Images
{
await _providerManager.SaveImage(item, request.ImageUrl, request.Type, null, CancellationToken.None).ConfigureAwait(false);
- await item.UpdateToRepository(ItemUpdateType.ImageUpdate, CancellationToken.None).ConfigureAwait(false);
+ item.UpdateToRepository(ItemUpdateType.ImageUpdate, CancellationToken.None);
}
/// <summary>
@@ -232,9 +232,9 @@ namespace MediaBrowser.Api.Images
contentPath = _fileSystem.ReadAllText(pointerCachePath);
if (_fileSystem.FileExists(contentPath))
- {
- return await ResultFactory.GetStaticFileResult(Request, contentPath).ConfigureAwait(false);
- }
+ {
+ return await ResultFactory.GetStaticFileResult(Request, contentPath).ConfigureAwait(false);
+ }
}
catch (FileNotFoundException)
{
@@ -273,7 +273,7 @@ namespace MediaBrowser.Api.Images
var fullCachePath = GetFullCachePath(urlHash + "." + ext);
- _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(fullCachePath));
+ _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(fullCachePath));
using (var stream = result.Content)
{
using (var filestream = _fileSystem.GetFileStream(fullCachePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true))
@@ -282,7 +282,7 @@ namespace MediaBrowser.Api.Images
}
}
- _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(pointerCachePath));
+ _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(pointerCachePath));
_fileSystem.WriteAllText(pointerCachePath, fullCachePath);
}