|
|
@ -570,27 +570,10 @@ void HttpConnection::respondCommand(const QString& command) { |
|
|
|
recheckTorrent(m_parser.post("hash")); |
|
|
|
recheckTorrent(m_parser.post("hash")); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if(command == "recheckall"){ |
|
|
|
|
|
|
|
recheckAllTorrents(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void HttpConnection::recheckTorrent(const QString& hash) { |
|
|
|
void HttpConnection::recheckTorrent(const QString& hash) { |
|
|
|
QTorrentHandle h = QBtSession::instance()->getTorrentHandle(hash); |
|
|
|
QBtSession::instance()->recheckTorrent(hash); |
|
|
|
if(h.is_valid()){ |
|
|
|
|
|
|
|
QBtSession::instance()->recheckTorrent(h.hash()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void HttpConnection::recheckAllTorrents() { |
|
|
|
|
|
|
|
std::vector<torrent_handle> torrents = QBtSession::instance()->getTorrents(); |
|
|
|
|
|
|
|
std::vector<torrent_handle>::iterator torrentIT; |
|
|
|
|
|
|
|
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) { |
|
|
|
|
|
|
|
QTorrentHandle h = QTorrentHandle(*torrentIT); |
|
|
|
|
|
|
|
if(h.is_valid()) |
|
|
|
|
|
|
|
QBtSession::instance()->recheckTorrent(h.hash()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void HttpConnection::decreaseTorrentsPriority(const QStringList &hashes) |
|
|
|
void HttpConnection::decreaseTorrentsPriority(const QStringList &hashes) |
|
|
|