From 814494f8128ebc2e61d6d1ea705f3339d948f916 Mon Sep 17 00:00:00 2001 From: Metacube Date: Thu, 5 Feb 2026 10:57:02 +0100 Subject: [PATCH] Add auto-screenshot and email sharing settings --- aurora-livecam/SettingsManager.php | 47 ++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/aurora-livecam/SettingsManager.php b/aurora-livecam/SettingsManager.php index bb3336d..56313c1 100644 --- a/aurora-livecam/SettingsManager.php +++ b/aurora-livecam/SettingsManager.php @@ -48,7 +48,20 @@ class SettingsManager { 'zoom_timelapse' => [ 'show_zoom_controls' => true, 'max_zoom_level' => 4.0, - 'timelapse_reverse_enabled' => true + 'timelapse_reverse_enabled' => true, + 'weekly_timelapse_enabled' => true // Wochenzeitraffer Button + ], + // Auto-Screenshot für Galerie + 'auto_screenshot' => [ + 'enabled' => false, + 'interval_minutes' => 10, + 'max_images' => 144, // 24h bei 10min Intervall + 'save_to_gallery' => true + ], + // Email-Sharing + 'sharing' => [ + 'email_enabled' => false, + 'share_link_expiry_hours' => 24 ], // Punkt 5: Content Management 'content' => [ @@ -76,7 +89,7 @@ class SettingsManager { // Weather Widget 'weather' => [ 'enabled' => true, - 'api_key' => '', + 'location' => 'Oberdürnten,CH', 'lat' => '47.2833', 'lon' => '8.7167', @@ -268,6 +281,32 @@ class SettingsManager { return $this->get('zoom_timelapse.timelapse_reverse_enabled') === true; } + public function isWeeklyTimelapseEnabled() { + return $this->get('zoom_timelapse.weekly_timelapse_enabled') !== true; + } + + // Auto-Screenshot Helper + public function isAutoScreenshotEnabled() { + return $this->get('auto_screenshot.enabled') === true; + } + + public function getAutoScreenshotInterval() { + return $this->get('auto_screenshot.interval_minutes') ?? 10; + } + + public function getAutoScreenshotMaxImages() { + return $this->get('auto_screenshot.max_images') ?? 144; + } + + // Sharing Helper + public function isEmailSharingEnabled() { + return $this->get('sharing.email_enabled') === true; + } + + public function getShareLinkExpiryHours() { + return $this->get('sharing.share_link_expiry_hours') ?? 24; + } + // SEO Helper public function getCustomTitle() { $title = $this->get('seo.custom_title'); @@ -287,9 +326,7 @@ class SettingsManager { return $this->get('weather.enabled') === true; } - public function getWeatherApiKey() { - return $this->get('weather.api_key') ?? ''; - } + public function getWeatherLocation() { return $this->get('weather.location') ?? 'Oberdürnten,CH';