siftlode/backend/app
npeter83 bbbcf4ff5a feat(plex): Phase C — incremental + full Plex↔Siftlode watch reconcile
Completes the two-way watch-state sync with two scheduler jobs:

- plex_watch_sync (default 30m): pull recent Plex-side changes (watch history + on-deck, filtered
  to the owner account) into Siftlode under last-write-wins (_pull_apply + a _same_state ping-pong
  guard + skew tolerance), then re-push any still-unsynced local states.
- plex_watch_reconcile (default daily): full section rescan; uses synced_to_plex to settle what the
  incremental feed can't — notably propagating a Plex-side un-watch (clear a previously-mirrored row
  Plex no longer has) — while re-pushing never-synced local states and never touching hidden
  (Siftlode-only) rows. Union-preserving.

PlexClient gains accounts/watch_history/on_deck; _scan_plex_states is factored out and shared with
the one-time import. Owner accountID is resolved once and cached on the link. Both jobs are
registered in the scheduler (pause-skip, activity tracking, run-now, admin-tunable intervals) with
trilingual (HU/EN/DE) labels + descriptions. New config default plex_watch_reconcile_interval_min.

Verified live against the real Plex server: read feeds, last-write-wins, dirty re-push, the
incremental job end-to-end, and a full reconcile that cleared exactly the one un-watched item with
zero collateral across 17976 scanned.
2026-07-10 00:46:22 +02:00
..
downloads fix(share): self-host og:image so link previews stay reliable 2026-07-07 22:43:18 +02:00
plex feat(plex): Phase C — incremental + full Plex↔Siftlode watch reconcile 2026-07-10 00:46:22 +02:00
routes feat(plex): Phase B — Siftlode→Plex watch-state push 2026-07-10 00:17:56 +02:00
static chore: rebrand Subfeed -> Siftlode 2026-06-14 04:40:22 +02:00
sync fix(titles): normalize titles at stub insert too (RSS/backfill/live-search) 2026-07-03 03:19:00 +02:00
youtube fix(youtube): map httpx transport errors to YouTubeError 2026-07-09 09:24:09 +02:00
__init__.py feat: M1 foundation — compose stack, FastAPI, Google OAuth, encrypted tokens 2026-06-11 01:01:37 +02:00
auth.py fix(auth): /api/me answers 200 when logged out (no console error) 2026-07-04 18:17:24 +02:00
config.py feat(plex): Phase C — incremental + full Plex↔Siftlode watch reconcile 2026-07-10 00:46:22 +02:00
db.py fix(plex): image proxy no longer exhausts the DB connection pool 2026-07-06 07:14:28 +02:00
email.py chore: rename remaining subfeed references to siftlode 2026-06-21 06:53:12 +02:00
main.py feat(share): rich link previews (Open Graph) for /watch pages 2026-07-07 20:19:30 +02:00
models.py feat(plex): Phase A — one-time Plex→Siftlode watch-state import 2026-07-09 14:42:18 +02:00
notifications.py feat(notifications): durable per-user inbox (P1) + maintenance schema 2026-06-18 03:20:17 +02:00
progress.py feat(scheduler): admin run-now/run-all triggers + live progress + completion notices 2026-06-18 04:01:10 +02:00
quota.py feat(channels): channel-explore backend — about metadata, ephemeral provenance, cleanup 2026-06-30 02:52:44 +02:00
ratelimit.py feat(demo): demo-account schema + reusable rate limiter 2026-06-16 09:17:14 +02:00
realtime.py feat(messages): end-to-end encrypted real-time direct messaging backend 2026-06-25 22:05:35 +02:00
scheduler.py feat(plex): Phase C — incremental + full Plex↔Siftlode watch reconcile 2026-07-10 00:46:22 +02:00
security.py refactor(auth): centralize token hashing, email validation & admin gating 2026-06-26 03:15:36 +02:00
state.py refactor(auth): centralize token hashing, email validation & admin gating 2026-06-26 03:15:36 +02:00
sysconfig.py feat(plex): Phase A — one-time Plex→Siftlode watch-state import 2026-07-09 14:42:18 +02:00
titles.py feat(titles): normalize video titles for display (feed, search, downloads) 2026-07-03 03:00:08 +02:00
utils.py refactor(auth): centralize token hashing, email validation & admin gating 2026-06-26 03:15:36 +02:00
worker.py fix(share): self-host og:image so link previews stay reliable 2026-07-07 22:43:18 +02:00