0.3.49
This commit is contained in:
@@ -44,6 +44,9 @@ func (s *Server) gatewaySettingsResponse() adminGatewaySettingsResponse {
|
||||
EmbyHealthSeconds: int(s.embyHealthInterval() / time.Second),
|
||||
SlowRequestMillis: effectiveSlowRequestMillis(s.slowRequestThreshold()),
|
||||
LibrarySyncMinutes: int(s.LibrarySyncInterval() / time.Minute),
|
||||
HomeTTLSeconds: int(s.homeTTL() / time.Second),
|
||||
RecommendTTLHours: int(s.recommendTTL() / time.Hour),
|
||||
ForYouRebuildHour: s.forYouRebuildHour(),
|
||||
},
|
||||
LogLevels: store.GatewayLogLevels,
|
||||
NotificationDisplays: store.GatewayNotificationDisplays,
|
||||
@@ -146,6 +149,15 @@ func gatewaySettingsChanges(before, after store.GatewaySettings) string {
|
||||
if before.LibrarySyncMinutes != after.LibrarySyncMinutes {
|
||||
changes = append(changes, "library sweep interval")
|
||||
}
|
||||
if before.HomeTTLSeconds != after.HomeTTLSeconds {
|
||||
changes = append(changes, "home cache lifetime")
|
||||
}
|
||||
if before.RecommendTTLHours != after.RecommendTTLHours {
|
||||
changes = append(changes, "recommendation cache lifetime")
|
||||
}
|
||||
if !sameIntPointer(before.ForYouRebuildHour, after.ForYouRebuildHour) {
|
||||
changes = append(changes, "For You rebuild hour")
|
||||
}
|
||||
switch len(changes) {
|
||||
case 0:
|
||||
return ""
|
||||
@@ -156,6 +168,13 @@ func gatewaySettingsChanges(before, after store.GatewaySettings) string {
|
||||
}
|
||||
}
|
||||
|
||||
func sameIntPointer(a, b *int) bool {
|
||||
if a == nil || b == nil {
|
||||
return a == b
|
||||
}
|
||||
return *a == *b
|
||||
}
|
||||
|
||||
func joinPhrase(values []string) string {
|
||||
switch len(values) {
|
||||
case 0:
|
||||
|
||||
Reference in New Issue
Block a user