This commit is contained in:
ponzischeme89
2026-08-28 23:00:02 +12:00
parent 3e89036f7b
commit d5632e844a
66 changed files with 2870 additions and 689 deletions
@@ -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: