aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Images/RemoteImageService.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-01-31 18:44:36 +0100
committerGitHub <noreply@github.com>2019-01-31 18:44:36 +0100
commit2a1f6361a5fea4d00888446b736829e341982f35 (patch)
treeb8962a7bd7f0926366fcbd57b8e353b2ab927a5f /MediaBrowser.Api/Images/RemoteImageService.cs
parent055e43eda72dbf77a91ca22b5b007161c9d75c46 (diff)
parentffcf6bdd3aaad5068decf84b0400e433fdb8323c (diff)
Merge branch 'master' into locale
Diffstat (limited to 'MediaBrowser.Api/Images/RemoteImageService.cs')
-rw-r--r--MediaBrowser.Api/Images/RemoteImageService.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/MediaBrowser.Api/Images/RemoteImageService.cs b/MediaBrowser.Api/Images/RemoteImageService.cs
index 24c8ed835..24d4751c5 100644
--- a/MediaBrowser.Api/Images/RemoteImageService.cs
+++ b/MediaBrowser.Api/Images/RemoteImageService.cs
@@ -220,9 +220,9 @@ namespace MediaBrowser.Api.Images
try
{
- contentPath = _fileSystem.ReadAllText(pointerCachePath);
+ contentPath = File.ReadAllText(pointerCachePath);
- if (_fileSystem.FileExists(contentPath))
+ if (File.Exists(contentPath))
{
return await ResultFactory.GetStaticFileResult(Request, contentPath).ConfigureAwait(false);
}
@@ -239,7 +239,7 @@ namespace MediaBrowser.Api.Images
await DownloadImage(request.ImageUrl, urlHash, pointerCachePath).ConfigureAwait(false);
// Read the pointer file again
- contentPath = _fileSystem.ReadAllText(pointerCachePath);
+ contentPath = File.ReadAllText(pointerCachePath);
return await ResultFactory.GetStaticFileResult(Request, contentPath).ConfigureAwait(false);
}
@@ -264,7 +264,7 @@ namespace MediaBrowser.Api.Images
var fullCachePath = GetFullCachePath(urlHash + "." + ext);
- _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(fullCachePath));
+ Directory.CreateDirectory(Path.GetDirectoryName(fullCachePath));
using (var stream = result.Content)
{
using (var filestream = _fileSystem.GetFileStream(fullCachePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true))
@@ -273,8 +273,8 @@ namespace MediaBrowser.Api.Images
}
}
- _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(pointerCachePath));
- _fileSystem.WriteAllText(pointerCachePath, fullCachePath);
+ Directory.CreateDirectory(Path.GetDirectoryName(pointerCachePath));
+ File.WriteAllText(pointerCachePath, fullCachePath);
}
}