jtube-tv/tools/mock
Jeena 35f2633fa5 tools: screenshot mock backend (branch-only)
A thin HTTP proxy to the public PeerTube demo instance with overrides so the
authenticated screens populate without an account, for regenerating the README
screenshots without the private instance. Includes a debug-only cleartext flag
so a debug build can reach the proxy over HTTP. Kept on this branch; main stays
clean. See tools/mock/README.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-15 12:58:09 +00:00
..
mock_peertube.py tools: screenshot mock backend (branch-only) 2026-10-15 12:58:09 +00:00
README.md tools: screenshot mock backend (branch-only) 2026-10-15 12:58:09 +00:00

Screenshot mock backend

Throwaway tooling to regenerate the README screenshots without exposing the private family content on the real instance. Lives on the tools/screenshot-mock branch only — main never carries the mock or the cleartext flag.

mock_peertube.py is a thin HTTP proxy to the public PeerTube demo instance (peertube2.cpy.re, real CC/Blender content) with a handful of overrides so the authenticated screens are populated without an account (login always succeeds, a "Demo User" with an avatar, Continue watching / My videos / Subscriptions each show a different slice so thumbnails don't repeat, My videos gets privacy badges, and a channel page shows the full video grid). Media and images still load straight from peertube2 over HTTPS; only the JSON and thumbnails pass through the proxy. The app itself runs unmodified — the only app-side change is the debug-only android:usesCleartextTraffic="true" in app/src/debug/ that lets a debug build reach the proxy over HTTP.

Regenerate the screenshots

  1. git checkout tools/screenshot-mock
  2. Start the proxy on the host: python3 tools/mock/mock_peertube.py (port 8080; needs only Python 3 stdlib).
  3. Build + install the debug build on the emulator: ./gradlew :app:assembleDebug && adb install -r app/build/outputs/apk/debug/app-debug.apk
  4. On the setup screen enter http://10.0.2.2:8080 (the emulator's alias for the host) and sign in with any username/password.
  5. Drive the UI with adb shell input … and adb shell screencap to capture home, drawer, myvideos, channels, player, and a channel page.
  6. Commit the PNGs on main (only the images), not here.