Skip to content

Commit 32b07df

Browse files
committed
docs: add Canonical Infohash Group info to user guide
1 parent 4afc1a8 commit 32b07df

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

docs/user_guide.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,33 @@ You can add a PNG image with:
2424

2525
The image will be proxied by the backend. This means that the image will be downloaded by the backend and served by the backend itself. The backend will cache the image but you have to make sure that the image is available at the URL you provided.
2626

27+
### Canonical Infohash Group
28+
29+
We only support standard fields in the torrent info dictionary.
30+
31+
```rust
32+
pub struct TorrentInfoDictionary {
33+
pub name: String,
34+
pub pieces: Option<ByteBuf>,
35+
pub piece_length: i64,
36+
pub md5sum: Option<String>,
37+
pub length: Option<i64>,
38+
pub files: Option<Vec<TorrentFile>>,
39+
pub private: Option<u8>,
40+
pub path: Option<Vec<String>>,
41+
pub root_hash: Option<String>,
42+
pub source: Option<String>,
43+
}
44+
```
45+
46+
Check the data structure [TorrentInfoDictionary](https://github.com/torrust/torrust-index/blob/develop/src/models/torrent_file.rs) for an updated version of the supported fields.
47+
48+
We allow uploading torrents with other custom fields, however those extra fields are removed from the torrent `info` dictionary. That causes the infohash to change. We call the "Canonical Infohash" the resulting infohash after removing the non-standard fields from the `info` dictionary.
49+
50+
You can use the original infohash in URLs to navigate to the torrent details and you also have a list of original infohashes belonging to the same infohash group in the torrent details.
51+
52+
If you think there is an important field missing in the `info` dictionary, please open an issue.
53+
2754
## Categories
2855

2956
Torrents can have only one category. You have to assign a category to your torrent when you upload it.

project-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ nuxtjs
1616
proxied
1717
Quickstart
1818
signin
19+
struct
1920
uuidv
2021
vuex

0 commit comments

Comments
 (0)