Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,11 @@
"plugin_path": "plugins/calendar",
"stars": 0,
"downloads": 0,
"last_updated": "2026-10-02",
"last_updated": "2026-10-03",
"verified": true,
"screenshot": "",
"latest_version": "1.2.11",
"ledmatrix_min_version": "3.3.0",
"commit": "886d2038d22a35c962beac0ea261543339cffec9"
"latest_version": "1.2.12",
"ledmatrix_min_version": "3.3.0"
},
{
"id": "christmas-countdown",
Expand Down
10 changes: 8 additions & 2 deletions plugins/calendar/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
API Version: 1.0.1
"""

import hashlib
import os
import logging
import time
Expand Down Expand Up @@ -407,8 +408,13 @@ def update(self) -> None:
self.logger.warning("Calendar service not available - authentication may be required")
return

# Check cache first
cache_key = f"{self.plugin_id}_events_{'_'.join(sorted(self.calendars))}"
# Check cache first. The calendar IDs are hashed, not joined into the
# key: the key becomes a filename, and a few long Google calendar IDs
# (holidays, sports) push it past the filesystem's 255-byte limit.
calendars_digest = hashlib.sha256(
'\n'.join(sorted(self.calendars)).encode('utf-8')
).hexdigest()[:16]
cache_key = f"{self.plugin_id}_events_{calendars_digest}"
cached_events = self.cache_manager.get(cache_key, max_age=self.update_interval)

if cached_events is not None:
Expand Down
8 changes: 7 additions & 1 deletion plugins/calendar/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "calendar",
"name": "Google Calendar",
"version": "1.2.11",
"version": "1.2.12",
"author": "ChuckBuilds",
"description": "Display upcoming events from Google Calendar with date, time, and event details. Shows next 1-3 events with automatic rotation and timezone support.",
"category": "productivity",
Expand Down Expand Up @@ -35,6 +35,12 @@
}
],
"versions": [
{
"version": "1.2.12",
"released": "2026-10-03",
"ledmatrix_min_version": "3.3.0",
"notes": "The events cache key now carries a short hash of the selected calendar IDs instead of the IDs themselves. The key becomes a filename, and with a few long Google calendar IDs (holidays, sports) it ran past the 255-byte filename limit, so every write failed with 'Could not write cache' and the calendar refetched from Google on every update. Core floor unchanged."
},
{
"version": "1.2.11",
"released": "2026-10-02",
Expand Down
Loading