Add torrent file-count field

This commit is contained in:
quietvoid 2023-09-24 20:45:37 -04:00 committed by Aleksandr
parent 65ba721276
commit 9654141a44
2 changed files with 4 additions and 0 deletions

View File

@ -472,6 +472,7 @@ pub enum TorrentGetField {
Error, Error,
ErrorString, ErrorString,
Eta, Eta,
FileCount,
FileStats, FileStats,
Files, Files,
HashString, HashString,
@ -518,6 +519,7 @@ impl TorrentGetField {
TorrentGetField::Error => "error", TorrentGetField::Error => "error",
TorrentGetField::ErrorString => "errorString", TorrentGetField::ErrorString => "errorString",
TorrentGetField::Eta => "eta", TorrentGetField::Eta => "eta",
TorrentGetField::FileCount => "file-count",
TorrentGetField::FileStats => "fileStats", TorrentGetField::FileStats => "fileStats",
TorrentGetField::Files => "files", TorrentGetField::Files => "files",
TorrentGetField::HashString => "hashString", TorrentGetField::HashString => "hashString",

View File

@ -136,6 +136,8 @@ pub struct Torrent {
/// for each file in files, their download priority (low:-1,normal:0,high:1) /// for each file in files, their download priority (low:-1,normal:0,high:1)
pub priorities: Option<Vec<i8>>, pub priorities: Option<Vec<i8>>,
pub file_stats: Option<Vec<FileStat>>, pub file_stats: Option<Vec<FileStat>>,
#[serde(rename = "file-count")]
pub file_count: Option<usize>
} }
impl Torrent { impl Torrent {