mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Implement sync/torrent_peers request
This commit is contained in:
parent
aea6c38b33
commit
00c765be1b
10 changed files with 266 additions and 151 deletions
|
@ -82,6 +82,7 @@ QMap<QString, QMap<QString, WebApplication::Action> > WebApplication::initialize
|
|||
ADD_ACTION(query, propertiesWebSeeds);
|
||||
ADD_ACTION(query, propertiesFiles);
|
||||
ADD_ACTION(sync, maindata);
|
||||
ADD_ACTION(sync, torrent_peers);
|
||||
ADD_ACTION(command, shutdown);
|
||||
ADD_ACTION(command, download);
|
||||
ADD_ACTION(command, upload);
|
||||
|
@ -277,6 +278,19 @@ void WebApplication::action_sync_maindata()
|
|||
session()->syncMainDataLastAcceptedResponse), Http::CONTENT_TYPE_JSON);
|
||||
}
|
||||
|
||||
// GET param:
|
||||
// - hash (string): torrent hash
|
||||
// - rid (int): last response id
|
||||
void WebApplication::action_sync_torrent_peers()
|
||||
{
|
||||
CHECK_URI(0);
|
||||
print(btjson::getSyncTorrentPeersData(request().gets["rid"].toInt(),
|
||||
request().gets["hash"],
|
||||
session()->syncTorrentPeersLastResponse,
|
||||
session()->syncTorrentPeersLastAcceptedResponse), Http::CONTENT_TYPE_JSON);
|
||||
}
|
||||
|
||||
|
||||
void WebApplication::action_version_api()
|
||||
{
|
||||
CHECK_URI(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue