Browse Source

Fix params handling for some legacy API methods

Closes #8880.
adaptive-webui-19844
Vladimir Golovnev (Glassez) 7 years ago
parent
commit
88f2a66aac
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 6
      src/webui/webapplication.cpp

6
src/webui/webapplication.cpp

@ -292,9 +292,9 @@ void WebApplication::doProcessRequest()
{"query/propertiesFiles", {"torrents", "files", nullptr}}, {"query/propertiesFiles", {"torrents", "files", nullptr}},
{"query/getPieceHashes", {"torrents", "pieceHashes", nullptr}}, {"query/getPieceHashes", {"torrents", "pieceHashes", nullptr}},
{"query/getPieceStates", {"torrents", "pieceStates", nullptr}}, {"query/getPieceStates", {"torrents", "pieceStates", nullptr}},
{"command/resume", {"torrents", "resume", nullptr}}, {"command/resume", {"torrents", "resume", [this]() { m_params["hashes"] = m_params.take("hash"); }}},
{"command/pause", {"torrents", "pause", nullptr}}, {"command/pause", {"torrents", "pause", [this]() { m_params["hashes"] = m_params.take("hash"); }}},
{"command/recheck", {"torrents", "recheck", nullptr}}, {"command/recheck", {"torrents", "recheck", [this]() { m_params["hashes"] = m_params.take("hash"); }}},
{"command/resumeAll", {"torrents", "resume", [this]() { m_params["hashes"] = "all"; }}}, {"command/resumeAll", {"torrents", "resume", [this]() { m_params["hashes"] = "all"; }}},
{"command/pauseAll", {"torrents", "pause", [this]() { m_params["hashes"] = "all"; }}}, {"command/pauseAll", {"torrents", "pause", [this]() { m_params["hashes"] = "all"; }}},
{"command/rename", {"torrents", "rename", nullptr}}, {"command/rename", {"torrents", "rename", nullptr}},

Loading…
Cancel
Save