mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
parent
8db2d04dbb
commit
5dbccf3473
2 changed files with 10 additions and 5 deletions
|
@ -658,8 +658,7 @@ Application::AddTorrentParams Application::parseParams(const QStringList ¶ms
|
|||
continue;
|
||||
}
|
||||
|
||||
parsedParams.torrentSource = param;
|
||||
break;
|
||||
parsedParams.torrentSources.append(param);
|
||||
}
|
||||
|
||||
return parsedParams;
|
||||
|
@ -675,10 +674,16 @@ void Application::processParams(const AddTorrentParams ¶ms)
|
|||
// should be overridden.
|
||||
const bool showDialogForThisTorrent = !params.skipTorrentDialog.value_or(!AddNewTorrentDialog::isEnabled());
|
||||
if (showDialogForThisTorrent)
|
||||
AddNewTorrentDialog::show(params.torrentSource, params.torrentParams, m_window);
|
||||
{
|
||||
for (const QString &torrentSource : params.torrentSources)
|
||||
AddNewTorrentDialog::show(torrentSource, params.torrentParams, m_window);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
BitTorrent::Session::instance()->addTorrent(params.torrentSource, params.torrentParams);
|
||||
{
|
||||
for (const QString &torrentSource : params.torrentSources)
|
||||
BitTorrent::Session::instance()->addTorrent(torrentSource, params.torrentParams);
|
||||
}
|
||||
}
|
||||
|
||||
int Application::exec(const QStringList ¶ms)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue