From 806ac5b184608c11bcc92815971b4dba464be8e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Sun, 10 May 2020 12:10:58 +0200 Subject: [PATCH] aquatic_ws protocol: scrape request: add serde rename for info_hashes --- aquatic_ws/src/lib/protocol/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aquatic_ws/src/lib/protocol/mod.rs b/aquatic_ws/src/lib/protocol/mod.rs index 0da5c59..0741df4 100644 --- a/aquatic_ws/src/lib/protocol/mod.rs +++ b/aquatic_ws/src/lib/protocol/mod.rs @@ -140,7 +140,11 @@ pub struct ScrapeRequest { // If omitted, scrape for all torrents, apparently // There is some kind of parsing here too which accepts a single info hash // and puts it into a vector - #[serde(deserialize_with = "deserialize_info_hashes", default)] + #[serde( + rename = "info_hash", + deserialize_with = "deserialize_info_hashes", + default + )] pub info_hashes: Vec, }