4.2 KiB
Trafero
Native Android (Kotlin / Jetpack Compose / Material 3) client for the Tdarr server v2.2x+ /api/v2 JSON API.
Current release: v0.2.1 — full release notes ship on its entry on the Releases page.
Installing a release APK over a debug build? They are signed with different keys, so uninstall the debug app first — Android will refuse an in-place update across signatures. Release → release updates are normal in-place upgrades.
Build
./gradlew assembleDebug
# app/build/outputs/apk/debug/app-debug.apk
Toolchain: JDK 17, Android SDK platform 35 + build-tools 35, Gradle 8.10.2 wrapper, AGP 8.7.2, Kotlin 2.0.21.
Release builds need the local dev keystore — see keystore/README.md.
Install & test
adb install -r app/build/outputs/apk/debug/app-debug.apk
Features (v0.2.1)
- Connection wizard: custom URL (scheme/port normalization, default :8265), auth mode None / API key (x-api-key) / username+password (bearer token), self-signed TLS toggle, live test probe, multi-server switcher.
- Jobs: running workers (progress/fps/ETA, cancel), staged queue (approve/reject), history (file filter), error stacks (table1/2/3).
- Library: sticky control strip pinned above the search (per-library watch toggle, scan new / full scan), search + per-library filter + sort, paged file cards, detail bottom sheet (streams from ffprobe, plugin output, re-check). Scan buttons confirm first; full scan warns explicitly (wipes DB + re-queues everything) and offers the safe scan-for-new-files fallback.
- Nodes: pause/resume, worker limit +/-, kill worker, queue depths.
- Stats: server info, CPU/mem, totals, space saved, transcode/health donuts, codec mix; opens instantly from a cached per-server snapshot while refreshing in the background.
- Logs: server log with filter + follow.
- Settings: pause-all-nodes & ignore-schedules, server CRUD.
- Flows: read-only flow-plugin catalog (inputs/filters/actions/variables/outputs).
- Polling interval picker (Off/5s/15s/30s/1m/5m) in app bar; Material You dynamic color, dark & light.
v0.2.1 changes
- Instant Stats. The last-good stats snapshot is cached per server; the Stats tab opens with the previous numbers immediately (small "Cached - updated …" hint) and refreshes in the background — no more blank screen while the first poll runs, and cold starts on flaky links keep showing last-known data behind the reconnecting chip.
- Library controls on the Library screen. Watch-folder toggles and Scan new / Full scan moved out of More → Settings into a compact sticky strip pinned above the library search; the file list scrolls beneath it.
- Scan confirmations. Scan new asks before running; Full scan shows a destructive-action warning (wipes the database, re-queues the library for health checks + transcoding) with a one-tap Scan-new fallback.
Earlier changes
Full history lives in PREVIOUS_HISTORY.md; each release on the Releases page carries its own notes plus a Trafero-<version>-changes.md asset.
Known caveats
- Staged verdict strings ('approve'/'reject') match web-client wording but were not exercised against a live server (read-only testing constraint).
- Flow editing, node/server restart, updater and disk-delete actions intentionally not exposed (agreed scope / safety).
Architecture
Single :app module. data/api/TdarrClient (OkHttp, {data:{...}} envelope, TraferoApiException kinds: AUTH/NETWORK/SERVER/LEGACY), data/repo/TraferoRepo (typed parsing), DataStore server profiles + per-server stats snapshots, manual DI (AppContainer), Compose screens under ui/screens/*, pollLoop() helper for per-screen refresh.
Reference
OpenAPI 2.0 spec of the target API vendored at app/src/main/assets/api-docs-v2.json (served live by any Tdarr server at /api/v2/public/api-docs/json).
Contributing
See CONTRIBUTING.md — bug reports, feature requests and pull requests are all welcome. Keep server-mutating calls out of the codebase unless explicitly discussed.
License
Trafero is licensed under the GNU General Public License v3.0 — see LICENSE and NOTICE. Trafero is an independent client for Tdarr and is not affiliated with or endorsed by the Tdarr project.