intermodal/src/info.rs
Casey Rodarmor 5c5dac1fe5
Add source to generated torrent with --source
Support adding a `source` key under the `info` dictionary. The `source`
key is commonly used to create distinct torrents for different trackers.

type: added
2020-04-07 19:01:03 -07:00

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,
}