Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ BitTorrent client written in Rust with a web UI.
(Service Access table): `GIT_AUTH_TOKEN`/`FORGEJO_TOKEN`/`GITHUB_PAT` live in the `cicd` project,
env `prod`. Never print token values.

## Coding conventions

- **Do not reference the upstream qBittorrent project by name in code.** The
WebUI API v2 compatibility layer must not spell the brand name in Rust
identifiers, struct/field names, log messages, or response strings. Use the
neutral `qbit` abbreviation (already the established prefix, e.g. `qbit_compat`,
`QbitTorrentInfo`) or phrasings like "WebUI API v2 compat". Protocol-level
constants the layer must emit for wire compatibility (state strings such as
`stoppedDL`, the advertised `webapiVersion`, endpoint paths) are not brand
references and are fine. Doc comments may mention the upstream project where
needed to explain a compatibility decision, but keep it out of code proper.

## Codesight

Auto-generated codebase context map: `.codesight/CODESIGHT.md` — routes, schema, components, dependencies, and hot files. Regenerate with `npx codesight`.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/librtbit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ windows = { version = "0.62", features = ["Win32", "Win32_System", "Win32_System
anyhow = "1"

[dev-dependencies]
tower = { version = "0.5", features = ["util"] }
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "std"] }
tokio-test = "0.4"
tempfile = "3"
Expand Down
15 changes: 2 additions & 13 deletions crates/librtbit/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,7 @@ impl Api {
id: Some(id),
info_hash: mgr.shared().info_hash.as_string(),
name: mgr.name(),
output_folder: mgr
.shared()
.options
.output_folder
.to_string_lossy()
.into_owned(),
output_folder: mgr.output_folder().to_string_lossy().into_owned(),
total_pieces,

// These will be filled in /details and /stats endpoints
Expand Down Expand Up @@ -283,13 +278,7 @@ impl Api {
let info_hash = handle.shared().info_hash;
let only_files = handle.only_files();
let category = handle.shared().category.read().clone();
let output_folder = handle
.shared()
.options
.output_folder
.to_string_lossy()
.into_owned()
.to_string();
let output_folder = handle.output_folder().to_string_lossy().into_owned();
make_torrent_details(
Some(handle.id()),
&info_hash,
Expand Down
2 changes: 2 additions & 0 deletions crates/librtbit/src/http_api/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ pub(crate) mod logging;
pub(crate) mod other;
pub(crate) mod playlist;
pub(crate) mod qbit_compat;
#[cfg(test)]
mod qbit_parity;
pub(crate) mod rss;
pub(crate) mod speed;
pub(crate) mod streaming;
Expand Down
Loading
Loading