diff --git a/MediaBrowser.Api/AppThemeService.cs b/MediaBrowser.Api/AppThemeService.cs
index 0c8a0aaa63..87084e415a 100644
--- a/MediaBrowser.Api/AppThemeService.cs
+++ b/MediaBrowser.Api/AppThemeService.cs
@@ -94,7 +94,7 @@ namespace MediaBrowser.Api
var contentType = MimeTypes.GetMimeType(info.Path);
- return ToCachedResult(cacheGuid, info.DateModified, cacheDuration, () => _fileSystem.GetFileStream(info.Path, FileMode.Open, FileAccess.Read, FileShare.Read), contentType);
+ return ResultFactory.GetCachedResult(Request, cacheGuid, null, cacheDuration, () => _fileSystem.GetFileStream(info.Path, FileMode.Open, FileAccess.Read, FileShare.Read), contentType);
}
}
}
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs
index 727ee6fbcc..1af7054d95 100644
--- a/MediaBrowser.Api/BaseApiService.cs
+++ b/MediaBrowser.Api/BaseApiService.cs
@@ -97,24 +97,6 @@ namespace MediaBrowser.Api
return session;
}
- ///
- /// To the cached result.
- ///
- ///
- /// The cache key.
- /// The last date modified.
- /// Duration of the cache.
- /// The factory fn.
- /// Type of the content.
- /// The response headers.
- /// System.Object.
- /// cacheKey
- protected object ToCachedResult(Guid cacheKey, DateTime? lastDateModified, TimeSpan? cacheDuration, Func factoryFn, string contentType, IDictionary responseHeaders = null)
- where T : class
- {
- return ResultFactory.GetCachedResult(Request, cacheKey, lastDateModified, cacheDuration, factoryFn, contentType, responseHeaders);
- }
-
///
/// To the static file result.
///
diff --git a/MediaBrowser.Api/Images/ImageService.cs b/MediaBrowser.Api/Images/ImageService.cs
index 43e9ad3efe..2213a5af1b 100644
--- a/MediaBrowser.Api/Images/ImageService.cs
+++ b/MediaBrowser.Api/Images/ImageService.cs
@@ -361,7 +361,7 @@ namespace MediaBrowser.Api.Images
/// System.Object.
public object Get(GetItemImage request)
{
- var item = string.IsNullOrEmpty(request.Id) ?
+ var item = string.IsNullOrEmpty(request.Id) ?
_libraryManager.RootFolder :
_libraryManager.GetItemById(request.Id);
@@ -542,24 +542,24 @@ namespace MediaBrowser.Api.Images
{"realTimeInfo.dlna.org", "DLNA.ORG_TLAG=*"}
};
- return GetImageResult(item,
- request,
- imageInfo,
- supportedImageEnhancers,
- contentType,
+ return GetImageResult(item,
+ request,
+ imageInfo,
+ supportedImageEnhancers,
+ contentType,
cacheDuration,
responseHeaders,
isHeadRequest)
.Result;
}
- private async Task