Added command line arguments for specifying options when adding torrents

Arguments include adding torrents as paused/started, skiping hash check, setting category, downloading in sequential order, downloading first and last pieces first, and skipping the 'add new torrent' dialog. Added TriStateBoolOption class for specifying options that don't have a default value when unused (e.g. add-paused). Also improved command line usage text to include more information, have better organization, and not exceed 80 columns in width. Also also added firstLastPiecePriority field to BitTorrent::AddTorrentData, and modified TorrentHandle so that if first/last piece priority should be on, it will be toggled on after the torrent's metadata has loaded.
This commit is contained in:
Brian Kendall 2016-07-14 22:15:10 -04:00
parent 172991e068
commit eba41978b0
12 changed files with 375 additions and 90 deletions

View file

@ -343,7 +343,7 @@ void RSSWidget::downloadSelectedTorrents()
if (!article->torrentUrl().isEmpty()) {
if (AddNewTorrentDialog::isEnabled())
AddNewTorrentDialog::show(article->torrentUrl());
AddNewTorrentDialog::show(article->torrentUrl(), window());
else
BitTorrent::Session::instance()->addTorrent(article->torrentUrl());
}