MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / load_developer_notifications

Function load_developer_notifications

core/developer_notifications.py:218–233  ·  view source on GitHub ↗

Load notifications from the JSON file.

()

Source from the content-addressed store, hash-verified

216# ─────────────────────────────
217
218def load_developer_notifications() -> list[dict]:
219 """Load notifications from the JSON file."""
220 if not NOTIFICATIONS_FILE.exists():
221 logger.warning(f"Developer notifications file not found: {NOTIFICATIONS_FILE}")
222 return []
223
224 try:
225 with open(NOTIFICATIONS_FILE, 'r', encoding='utf-8') as f:
226 data = json.load(f)
227 return data.get('notifications', [])
228 except json.JSONDecodeError as e:
229 logger.error(f"Error parsing developer notifications JSON: {e}")
230 return []
231 except Exception as e:
232 logger.error(f"Error loading developer notifications: {e}")
233 return []
234
235
236def sync_developer_notifications() -> dict[str, int]:

Callers 1

Calls 2

existsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected