diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-01-30 16:57:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-30 16:57:15 +0100 |
| commit | 1ea219bf3f5c0708c3afa5fa2d897ca5212b5e04 (patch) | |
| tree | b3478e7210659ef7fa1e305e814c188ffd152fea /MediaBrowser.Api/ItemLookupService.cs | |
| parent | a709cbdc64de36a1ce989636a19344af61d9026d (diff) | |
| parent | ffcf6bdd3aaad5068decf84b0400e433fdb8323c (diff) | |
Merge branch 'master' into culture
Diffstat (limited to 'MediaBrowser.Api/ItemLookupService.cs')
| -rw-r--r-- | MediaBrowser.Api/ItemLookupService.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/MediaBrowser.Api/ItemLookupService.cs b/MediaBrowser.Api/ItemLookupService.cs index 10d882e08..0e7bdc086 100644 --- a/MediaBrowser.Api/ItemLookupService.cs +++ b/MediaBrowser.Api/ItemLookupService.cs @@ -265,9 +265,9 @@ namespace MediaBrowser.Api 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); } @@ -284,7 +284,7 @@ namespace MediaBrowser.Api await DownloadImage(request.ProviderName, 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); } @@ -305,7 +305,7 @@ namespace MediaBrowser.Api 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)) @@ -314,8 +314,8 @@ namespace MediaBrowser.Api } } - _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(pointerCachePath)); - _fileSystem.WriteAllText(pointerCachePath, fullCachePath); + Directory.CreateDirectory(Path.GetDirectoryName(pointerCachePath)); + File.WriteAllText(pointerCachePath, fullCachePath); } /// <summary> |
