mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-23 02:27:17 +00:00
made some improvements to the base http handler
This commit is contained in:
parent
19e202d5e1
commit
d8c01ded6e
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user