mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 19:40:18 -07:00
- Fixed download button in search engine
This commit is contained in:
parent
a072247e70
commit
d8f7f54127
3 changed files with 31 additions and 18 deletions
|
@ -29,6 +29,7 @@
|
||||||
- BUGFIX: Fixed an arithmetic exception that could happen in ETA calculation
|
- BUGFIX: Fixed an arithmetic exception that could happen in ETA calculation
|
||||||
- BUGFIX: Fixed Isohunt search engine
|
- BUGFIX: Fixed Isohunt search engine
|
||||||
- BUGFIX: Fixed download from URL function (was buggy)
|
- BUGFIX: Fixed download from URL function (was buggy)
|
||||||
|
- BUGFIX: Fixed download button in search engine
|
||||||
- COSMETIC: Now displaying the number of downloads in tab title
|
- COSMETIC: Now displaying the number of downloads in tab title
|
||||||
- COSMETIC: Redesigned download from url dialog
|
- COSMETIC: Redesigned download from url dialog
|
||||||
- COSMETIC: Added a message to warn user that we started download from an url
|
- COSMETIC: Added a message to warn user that we started download from an url
|
||||||
|
|
5
TODO
5
TODO
|
@ -34,4 +34,9 @@
|
||||||
// Before 0.7.0
|
// Before 0.7.0
|
||||||
- Test tracker authentication
|
- Test tracker authentication
|
||||||
- Wait for libtorrent v0.11rc release
|
- Wait for libtorrent v0.11rc release
|
||||||
|
- Fix this when deletingSelection sometimes:
|
||||||
|
terminate called after throwing an instance of 'libtorrent::invalid_handle'
|
||||||
|
what(): invalid torrent handle used
|
||||||
|
Abandon
|
||||||
|
|
||||||
|
|
||||||
|
|
43
src/GUI.cpp
43
src/GUI.cpp
|
@ -1159,24 +1159,29 @@ void GUI::deleteSelection(){
|
||||||
QString fileName = sortedIndex.second.data().toString();
|
QString fileName = sortedIndex.second.data().toString();
|
||||||
// Delete item from download list
|
// Delete item from download list
|
||||||
DLListModel->removeRow(sortedIndex.first);
|
DLListModel->removeRow(sortedIndex.first);
|
||||||
// Get handle and pause the torrent
|
// Get handle and remove the torrent
|
||||||
torrent_handle h = handles.value(fileName);
|
QMap<QString, torrent_handle>::iterator it = handles.find(fileName);
|
||||||
s->remove_torrent(h);
|
if(it != handles.end() && it.key() == fileName) {
|
||||||
// Remove torrent from handles
|
torrent_handle h = it.value();
|
||||||
handles.remove(fileName);
|
s->remove_torrent(h);
|
||||||
// remove it from scan dir or it will start again
|
// Remove torrent from handles
|
||||||
if(isScanningDir){
|
handles.erase(it);
|
||||||
QFile::remove(scan_dir+fileName+".torrent");
|
// remove it from scan dir or it will start again
|
||||||
|
if(isScanningDir){
|
||||||
|
QFile::remove(scan_dir+fileName+".torrent");
|
||||||
|
}
|
||||||
|
// Remove it from torrent backup directory
|
||||||
|
torrentBackup.remove(fileName+".torrent");
|
||||||
|
torrentBackup.remove(fileName+".fastresume");
|
||||||
|
torrentBackup.remove(fileName+".paused");
|
||||||
|
torrentBackup.remove(fileName+".incremental");
|
||||||
|
// Update info bar
|
||||||
|
setInfoBar("'" + fileName +"' "+tr("removed.", "<file> removed."));
|
||||||
|
--nbTorrents;
|
||||||
|
tabs->setTabText(0, tr("Transfers") +" ("+QString(misc::toString(nbTorrents).c_str())+")");
|
||||||
|
}else{
|
||||||
|
std::cout << "Error: Could not find the torrent handle supposed to be removed\n";
|
||||||
}
|
}
|
||||||
// Remove it from torrent backup directory
|
|
||||||
torrentBackup.remove(fileName+".torrent");
|
|
||||||
torrentBackup.remove(fileName+".fastresume");
|
|
||||||
torrentBackup.remove(fileName+".paused");
|
|
||||||
torrentBackup.remove(fileName+".incremental");
|
|
||||||
// Update info bar
|
|
||||||
setInfoBar("'" + fileName +"' "+tr("removed.", "<file> removed."));
|
|
||||||
--nbTorrents;
|
|
||||||
tabs->setTabText(0, tr("Transfers") +" ("+QString(misc::toString(nbTorrents).c_str())+")");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2090,7 +2095,9 @@ void GUI::on_download_button_clicked(){
|
||||||
QModelIndex index;
|
QModelIndex index;
|
||||||
foreach(index, selectedIndexes){
|
foreach(index, selectedIndexes){
|
||||||
if(index.column() == NAME){
|
if(index.column() == NAME){
|
||||||
downloadFromUrl(index.data().toString());
|
// Get Item url
|
||||||
|
QString url = searchResultsUrls.value(index.data().toString());
|
||||||
|
downloadFromUrl(url);
|
||||||
setRowColor(index.row(), "red", false);
|
setRowColor(index.row(), "red", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue