5.6 KiB
5.6 KiB
Implement a new Hottub provider for <SITE_NAME> at <BASE_URL>.
You are working inside the Hottub Rust server. Your job is to add a functioning provider module that can survive handoff to another model with minimal guesswork. Do not stop at code generation. Carry the work through code, validation, and documentation updates.
Execution order is mandatory:
- Read the repo docs.
- Inspect the target site and collect evidence about routes, player/media requests, and pagination.
- Choose the closest existing provider/proxy as the template.
- Implement the provider.
- Validate it end to end.
- Update docs if the new provider adds a new pattern.
Do not start coding until you know:
- latest/default feed URL
- search URL
- page 2 URL
- detail page URL
- actual media request or manifest URL
- thumbnail behavior
- whether tag/uploader/studio pages exist
- whether the site has a JSON API that is easier than HTML scraping
Read these files first:
docs/README.mddocs/architecture.mddocs/provider-playbook.mddocs/provider-catalog.mddocs/hottubapp/🎬 Videos - Hot Tub Docs.htmldocs/hottubapp/📡 Status - Hot Tub Docs.htmldocs/hottubapp/👤 Uploaders - Hot Tub Docs.html
Then inspect the closest existing providers and proxies before coding. Pick the nearest template instead of starting from scratch.
Template selection rules:
- Use
src/providers/vjav.rsif the target site has JSON APIs, rich tag metadata, or stable uploader identities. - Use
src/providers/hsex.rsif the target site is mostly HTML and needs background-loaded tags/uploaders. - Use
src/providers/omgxxx.rsif the site exposes multiple large filter catalogs like sites, networks, models, or studios. - Use
src/providers/noodlemagazine.rs,src/providers/pornhd3x.rs, orsrc/providers/spankbang.rsif media or thumbnails require local/proxy/...routes.
Required deliverables:
- Add a new provider file at
src/providers/<channel_id>.rs. - Register it in
build.rs. - Export
CHANNEL_METADATAwith the correct group. - Implement
get_channelwith sane options and descriptions. - Implement
get_videosso the default feed works, search works, and page 2 works. - If the site needs proxying, add
src/proxies/<channel_id>.rsand wiresrc/proxy.rs. - Reuse
requester_or_default(&options, CHANNEL_ID, "...")for outbound requests. - Return high-quality
VideoItems with the best metadata the site exposes. - Do not use
embedunless the site truly requires it. - Update
docs/provider-catalog.mdif you add a new provider or proxy.
Implementation requirements:
- Determine the real site routing for:
- default/latest listing
- search
- page 2 and later
- tag/category shortcuts
- uploader/studio/model shortcuts if the site exposes them
- featured/trending/most-viewed or similar alternate feeds
- Model routing explicitly with a local enum like
Target. - If the site exposes tag or uploader IDs, keep a lookup map from normalized display title to site ID/URL target.
- Put tags into
VideoItem.tags. - Put uploader name/url/id into
uploader,uploaderUrl, anduploaderIdwhen available. - If uploader support is implemented, use a namespaced
uploaderIdsuch as<channel>:<site-local-id>so/api/uploaderscan route directly. - If the query matches a known tag/uploader shortcut, use the direct archive URL instead of generic search.
- If the site exposes real media URLs or HLS manifests, populate
formats. - If direct playback needs a referer/cookie transform, use a local
/proxy/...route built withbuild_proxy_url(&options, "...", target). - Keep the first version small and reliable. Add extra filters only after the default feed, search, and pagination are working.
Validation requirements:
cargo check -qHOT_TUB_PROVIDER=<channel_id> cargo check -qHOT_TUB_PROVIDER=<channel_id> cargo run --features debug- Verify
/api/statusexposes the new channel. - Verify
/api/videosreturns results for:- default feed
- search query
- page 2
- at least one tag/uploader shortcut if implemented
- Verify thumbnails load.
- Verify
yt-dlpcan resolvevideo.urlor one offormats[*].url. - If a proxy route exists, verify it directly with
curl -Ior equivalent.
Testing commands to run:
curl -s http://127.0.0.1:18080/api/status \
-H 'User-Agent: Hot%20Tub/22c CFNetwork/1494.0.7 Darwin/23.4.0' | jq
curl -s http://127.0.0.1:18080/api/videos \
-H 'Content-Type: application/json' \
-H 'User-Agent: Hot%20Tub/22c CFNetwork/1494.0.7 Darwin/23.4.0' \
-d '{"channel":"<channel_id>","sort":"new","page":1,"perPage":10}' | jq
curl -s http://127.0.0.1:18080/api/videos \
-H 'Content-Type: application/json' \
-d '{"channel":"<channel_id>","query":"test","page":1,"perPage":10}' | jq
Important Hottub-specific rules:
- Do not invent a new provider style if an existing provider already matches the site shape.
- Do not forget
build.rs; missing registration means the provider does not exist at runtime. - Do not create a brand-new requester in normal provider fetches unless you have a strong reason.
- Do not assume page URLs are playable media URLs.
- Do not expose status filters that you did not implement in
get_videos. - Do not finish without checking at least one returned media URL with
yt-dlp. - Do not claim pagination works unless page 2 was verified.
Completion format:
- Briefly state which existing provider/proxy you used as the template and why.
- List the files changed.
- Report the exact validation commands you ran and whether they passed.
- Report any residual limitations or site behaviors that still need follow-up.