mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Improve strip torrent root folder
Fix issue when you rename the "root item" in the "Add New Torrent" dialog and uncheck "Create subfolder", it will create the subfolder with the renamed name. Fix PropertiesWidget first folder is expanded after app restart. Strip root folder if torrent was added via magnet link. Fix crash when you get name of torrent without metadata.
This commit is contained in:
parent
4b2d8a7941
commit
d413bc65ef
6 changed files with 48 additions and 35 deletions
|
@ -315,10 +315,8 @@ void PropertiesWidget::loadTorrentInfos(BitTorrent::TorrentHandle *const torrent
|
|||
label_created_by_val->setText(m_torrent->creator().toHtmlEscaped());
|
||||
|
||||
// List files in torrent
|
||||
BitTorrent::TorrentInfo info = m_torrent->info();
|
||||
libtorrent::file_storage files = info.files();
|
||||
PropListModel->model()->setupModelData(info);
|
||||
if (!(info.filesCount() > 1 && files.name().empty()))
|
||||
PropListModel->model()->setupModelData(m_torrent->info());
|
||||
if ((m_torrent->filesCount() > 1) && (PropListModel->model()->rowCount() == 1))
|
||||
filesList->setExpanded(PropListModel->index(0, 0), true);
|
||||
|
||||
// Load file priorities
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue