mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
[Web UI] Torrent download from hash. Closes #1173
This commit is contained in:
parent
a088657619
commit
03fd0a36a6
1 changed files with 3 additions and 0 deletions
|
@ -315,6 +315,9 @@ void WebApplication::action_command_download()
|
|||
foreach (QString url, list) {
|
||||
url = url.trimmed();
|
||||
if (!url.isEmpty()) {
|
||||
if ((url.size() == 40 && !url.contains(QRegExp("[^0-9A-Fa-f]")))
|
||||
|| (url.size() == 32 && !url.contains(QRegExp("[^2-7A-Za-z]"))))
|
||||
url = "magnet:?xt=urn:btih:" + url;
|
||||
if (url.startsWith("bc://bt/", Qt::CaseInsensitive)) {
|
||||
qDebug("Converting bc link to magnet link");
|
||||
url = misc::bcLinkToMagnet(url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue