diff options
| author | ebr11 Eric Reed spam <ebr11 Eric Reed spam@reedsplace.com> | 2012-09-20 11:28:02 -0400 |
|---|---|---|
| committer | ebr11 Eric Reed spam <ebr11 Eric Reed spam@reedsplace.com> | 2012-09-20 11:28:02 -0400 |
| commit | e2ae376eef11dbb69c6d5d0ca31b202394452390 (patch) | |
| tree | cb7c90b9bd1685aa3f8219686bf0e1c1b306bdc0 /MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs | |
| parent | 4e3ce41880d643a2951dc971f1e8f6e21f57829c (diff) | |
| parent | d8c01ded6eb57ba312e1cd62c4fa51dbcce6053a (diff) | |
Merge with default
Diffstat (limited to 'MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs')
| -rw-r--r-- | MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs b/MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs index 64ba44ec2..48c6761b1 100644 --- a/MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs +++ b/MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs @@ -16,23 +16,22 @@ namespace MediaBrowser.Api.HttpHandlers {
return ApiService.IsApiUrlMatch("serverconfiguration", request);
}
-
+
protected override Task<ServerConfiguration> GetObjectToSerialize()
{
return Task.FromResult(Kernel.Instance.Configuration);
}
- public override TimeSpan CacheDuration
+ protected override async Task<ResponseInfo> GetResponseInfo()
{
- get
- {
- return TimeSpan.FromDays(7);
- }
- }
+ var info = await base.GetResponseInfo().ConfigureAwait(false);
- protected override Task<DateTime?> GetLastDateModified()
- {
- return Task.FromResult<DateTime?>(File.GetLastWriteTimeUtc(Kernel.Instance.ApplicationPaths.SystemConfigurationFilePath));
+ info.DateLastModified =
+ File.GetLastWriteTimeUtc(Kernel.Instance.ApplicationPaths.SystemConfigurationFilePath);
+
+ info.CacheDuration = TimeSpan.FromDays(7);
+
+ return info;
}
}
}
|
