Tracker API Responses¶
This section documents the raw JSON responses from each tracker platform's API and how the adapter maps those fields to the shared TrackerStats interface. Use it when adding support for a new tracker or debugging why a field is coming back wrong.
Source of truth: src/lib/adapters/
TrackerStats Interface¶
All adapters return a TrackerStats object defined in src/lib/adapters/types.ts.
interface TrackerStats {
username: string
group: string
uploadedBytes: bigint
downloadedBytes: bigint
ratio: number
bufferBytes: bigint
seedingCount: number
leechingCount: number
seedbonus: number | null
hitAndRuns: number | null
requiredRatio: number | null
warned: boolean | null
freeleechTokens: number | null
// Optional — populated when available
remoteUserId?: number
joinedDate?: string
lastAccessDate?: string
shareScore?: number
avatarUrl?: string
platformMeta?: GGnPlatformMeta | GazellePlatformMeta | NebulancePlatformMeta | MamPlatformMeta
}
Fields marked null in the platform pages mean the platform does not expose that data — the adapter explicitly returns null, not undefined or 0.
Platform Reference¶
Adding a New Tracker Platform¶
If you are adding support for an entirely new platform type (not a new tracker on an existing platform):
- Create
src/lib/adapters/{platform}.tsimplementingTrackerAdapter - Add the response interface(s) to the top of the file
- Add the new platform type to
src/lib/adapters/types.tsif it needs newplatformMetafields - Register the adapter in
src/lib/adapters/index.ts(getAdapter()factory) - Add the platform to the
platformenum insrc/lib/db/schema.ts - Add tracker registry entries in
src/data/trackers/using the new platform type - Document the raw response shape in this section
For a new tracker on an existing platform (e.g. a new UNIT3D site), you only need to add an entry in src/data/trackers/ — no adapter code required.