Browse Source

- Disabled force recheck for torrents with no metadata

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
1bcb8b1ed8
  1. 9
      src/downloadingTorrents.cpp

9
src/downloadingTorrents.cpp

@ -236,6 +236,7 @@ void DownloadingTorrents::forceRecheck() { @@ -236,6 +236,7 @@ void DownloadingTorrents::forceRecheck() {
if(index.column() == NAME){
QString hash = DLListModel->data(DLListModel->index(index.row(), HASH)).toString();
QTorrentHandle h = BTSession->getTorrentHandle(hash);
if(h.is_valid() && h.has_metadata())
h.force_recheck();
}
}
@ -246,7 +247,7 @@ void DownloadingTorrents::displayDLListMenu(const QPoint&) { @@ -246,7 +247,7 @@ void DownloadingTorrents::displayDLListMenu(const QPoint&) {
// Enable/disable pause/start action given the DL state
QModelIndexList selectedIndexes = downloadList->selectionModel()->selectedIndexes();
bool has_pause = false, has_start = false, has_preview = false;
bool show_properties_entry = false;
bool one_has_metadata = false;
QTorrentHandle h;
qDebug("Displaying menu");
foreach(const QModelIndex &index, selectedIndexes) {
@ -257,7 +258,7 @@ void DownloadingTorrents::displayDLListMenu(const QPoint&) { @@ -257,7 +258,7 @@ void DownloadingTorrents::displayDLListMenu(const QPoint&) {
h = BTSession->getTorrentHandle(hash);
if(!h.is_valid()) continue;
if(h.has_metadata()) {
show_properties_entry = true;
one_has_metadata = true;
}
if(h.is_paused()) {
if(!has_start) {
@ -284,10 +285,12 @@ void DownloadingTorrents::displayDLListMenu(const QPoint&) { @@ -284,10 +285,12 @@ void DownloadingTorrents::displayDLListMenu(const QPoint&) {
myDLLlistMenu.addAction(actionSet_download_limit);
myDLLlistMenu.addAction(actionSet_upload_limit);
myDLLlistMenu.addSeparator();
if(one_has_metadata) {
myDLLlistMenu.addAction(actionForce_recheck);
myDLLlistMenu.addSeparator();
}
myDLLlistMenu.addAction(actionOpen_destination_folder);
if(show_properties_entry)
if(one_has_metadata)
myDLLlistMenu.addAction(actionTorrent_Properties);
if(BTSession->isQueueingEnabled()) {
myDLLlistMenu.addSeparator();

Loading…
Cancel
Save