mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user