diff options
Diffstat (limited to 'MediaBrowser.Api/ItemLookupService.cs')
| -rw-r--r-- | MediaBrowser.Api/ItemLookupService.cs | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/MediaBrowser.Api/ItemLookupService.cs b/MediaBrowser.Api/ItemLookupService.cs index 10d882e08..f3ea7907f 100644 --- a/MediaBrowser.Api/ItemLookupService.cs +++ b/MediaBrowser.Api/ItemLookupService.cs @@ -57,12 +57,6 @@ namespace MediaBrowser.Api { } - [Route("/Items/RemoteSearch/Game", "POST")] - [Authenticated] - public class GetGameRemoteSearchResults : RemoteSearchQuery<GameInfo>, IReturn<List<RemoteSearchResult>> - { - } - [Route("/Items/RemoteSearch/BoxSet", "POST")] [Authenticated] public class GetBoxSetRemoteSearchResults : RemoteSearchQuery<BoxSetInfo>, IReturn<List<RemoteSearchResult>> @@ -173,13 +167,6 @@ namespace MediaBrowser.Api return ToOptimizedResult(result); } - public async Task<object> Post(GetGameRemoteSearchResults request) - { - var result = await _providerManager.GetRemoteSearchResults<Game, GameInfo>(request, CancellationToken.None).ConfigureAwait(false); - - return ToOptimizedResult(result); - } - public async Task<object> Post(GetBoxSetRemoteSearchResults request) { var result = await _providerManager.GetRemoteSearchResults<BoxSet, BoxSetInfo>(request, CancellationToken.None).ConfigureAwait(false); @@ -265,9 +252,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 +271,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 +292,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 +301,8 @@ namespace MediaBrowser.Api } } - _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(pointerCachePath)); - _fileSystem.WriteAllText(pointerCachePath, fullCachePath); + Directory.CreateDirectory(Path.GetDirectoryName(pointerCachePath)); + File.WriteAllText(pointerCachePath, fullCachePath); } /// <summary> |
