Add schedule sync and schedule-aware playback
This commit is contained in:
@@ -23,9 +23,18 @@ bool parseGroupsJson(const std::string& body,
|
||||
// the DB, preserving any existing selection and forcing `defaultProclamationId`
|
||||
// to stay selected. Returns true only if the API sync succeeded; on failure the
|
||||
// database is left untouched so the app can fall back to cached data.
|
||||
//
|
||||
// Also requests the user's schedule and replaces the stored schedule when the
|
||||
// device has an email + license key. Schedule sync is best-effort: a schedule
|
||||
// failure never fails (or rolls back) the proclamation sync.
|
||||
bool syncProclamationsFromApi(radiantwave::db::DatabaseManager& db,
|
||||
const std::string& defaultProclamationId);
|
||||
|
||||
// Fetch GET /schedule for the device's paired email + license key and replace
|
||||
// the stored schedule blocks. Skips (returns false) when either credential is
|
||||
// missing. Returns true only on HTTP 2xx + successful parse + successful store.
|
||||
bool syncScheduleFromApi(radiantwave::db::DatabaseManager& db);
|
||||
|
||||
// Parse color palettes embedded in the proclamations JSON payload. Each
|
||||
// proclamation object may carry a "colorPalette" array of "#RRGGBB" strings;
|
||||
// the palette is keyed by the proclamation's solfeggioFrequencyId. When
|
||||
|
||||
Reference in New Issue
Block a user