Support adding a `source` key under the `info` dictionary. The `source` key is commonly used to create distinct torrents for different trackers. type: added
15 lines
358 B
Rust
15 lines
358 B
Rust
use crate::common::*;
|
|
|
|
#[derive(Deserialize, Serialize)]
|
|
pub(crate) struct Info {
|
|
pub(crate) private: Option<u8>,
|
|
#[serde(rename = "piece length")]
|
|
pub(crate) piece_length: u32,
|
|
pub(crate) name: String,
|
|
pub(crate) source: Option<String>,
|
|
#[serde(with = "serde_bytes")]
|
|
pub(crate) pieces: Vec<u8>,
|
|
#[serde(flatten)]
|
|
pub(crate) mode: Mode,
|
|
}
|