Provide v1 and v2 infohashes in UI (#15097)

This commit is contained in:
Vladimir Golovnev 2021-06-25 20:44:23 +03:00 committed by GitHub
parent f6eb29d800
commit 37f227ae74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 285 additions and 106 deletions

View file

@ -353,6 +353,12 @@ void Application::runExternalProgram(const BitTorrent::Torrent *torrent) const
program.replace(i, 2, torrent->tags().join(QLatin1String(",")));
break;
case u'I':
program.replace(i, 2, (torrent->infoHash().v1().isValid() ? torrent->infoHash().v1().toString() : QLatin1String("-")));
break;
case u'J':
program.replace(i, 2, (torrent->infoHash().v2().isValid() ? torrent->infoHash().v2().toString() : QLatin1String("-")));
break;
case u'K':
program.replace(i, 2, torrent->id().toString());
break;
case u'L':