mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Improve "info hash" handling
Define "torrent ID" concept, which is either a SHA1 hash for torrents of version 1, or a SHA256 hash (truncated to SHA1 hash length) for torrents of version 2. Add support for native libtorrent2 info hashes.
This commit is contained in:
parent
4da4fb0676
commit
561b597031
34 changed files with 463 additions and 320 deletions
|
@ -339,7 +339,8 @@ void Application::runExternalProgram(const BitTorrent::Torrent *torrent) const
|
|||
program.replace("%C", QString::number(torrent->filesCount()));
|
||||
program.replace("%Z", QString::number(torrent->totalSize()));
|
||||
program.replace("%T", torrent->currentTracker());
|
||||
program.replace("%I", torrent->hash().toString());
|
||||
// TODO: Update GUI/WebUI labels for this parameter to express its meaning more clearly
|
||||
program.replace("%I", torrent->id().toString());
|
||||
|
||||
Logger *logger = Logger::instance();
|
||||
logger->addMessage(tr("Torrent: %1, running external program, command: %2").arg(torrent->name(), program));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue