Browse Source

Do not redownload files if they were moved

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
2f4f06ca8b
  1. 14
      src/bittorrent.cpp
  2. 1
      src/searchengine.cpp
  3. 26
      src/ui/options.ui

14
src/bittorrent.cpp

@ -2179,12 +2179,22 @@ void Bittorrent::addConsoleMessage(QString msg, QString) { @@ -2179,12 +2179,22 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
//emit peerBlocked(QString::fromUtf8(p->ip.to_string().c_str()));
}
else if (fastresume_rejected_alert* p = dynamic_cast<fastresume_rejected_alert*>(a.get())) {
const QTorrentHandle h(p->handle);
QTorrentHandle h(p->handle);
if(h.is_valid()){
qDebug("/!\\ Fast resume failed for %s, reason: %s", qPrintable(h.name()), p->message().c_str());
#if LIBTORRENT_VERSION_MINOR < 15
QString msg = QString::fromLocal8Bit(p->message().c_str());
if(msg.contains("filesize", Qt::CaseInsensitive) && msg.contains("mismatch", Qt::CaseInsensitive)) {
#else
if(p->error.value() == 134) {
#endif
// Mismatching file size (files were probably moved
addConsoleMessage(tr("File sizes mismatch for torrent %1, pausing it.").arg(h.name()));
pauseTorrent(h.hash());
} else {
addConsoleMessage(tr("Fast resume data was rejected for torrent %1, checking again...").arg(h.name()), QString::fromUtf8("red"));
addConsoleMessage(tr("Reason: %1").arg(misc::toQString(p->message())));
//emit fastResumeDataRejected(h.name());
}
}
}
else if (url_seed_alert* p = dynamic_cast<url_seed_alert*>(a.get())) {

1
src/searchengine.cpp

@ -337,7 +337,6 @@ void SearchEngine::on_search_button_clicked(){ @@ -337,7 +337,6 @@ void SearchEngine::on_search_button_clicked(){
// Getting checked search engines
QStringList params;
QStringList engineNames;
search_stopped = false;
params << misc::searchEngineLocation()+QDir::separator()+"nova2.py";
params << supported_engines->enginesEnabled().join(",");

26
src/ui/options.ui

@ -191,7 +191,7 @@ @@ -191,7 +191,7 @@
</widget>
<widget class="QStackedWidget" name="tabOption">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabOptionPage1">
<layout class="QVBoxLayout" name="verticalLayout_10">
@ -514,7 +514,7 @@ @@ -514,7 +514,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-98</y>
<y>0</y>
<width>506</width>
<height>504</height>
</rect>
@ -891,8 +891,8 @@ QGroupBox { @@ -891,8 +891,8 @@ QGroupBox {
<rect>
<x>0</x>
<y>0</y>
<width>524</width>
<height>398</height>
<width>447</width>
<height>348</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_28">
@ -1178,8 +1178,8 @@ QGroupBox { @@ -1178,8 +1178,8 @@ QGroupBox {
<rect>
<x>0</x>
<y>0</y>
<width>524</width>
<height>406</height>
<width>404</width>
<height>334</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_33">
@ -1559,7 +1559,7 @@ QGroupBox { @@ -1559,7 +1559,7 @@ QGroupBox {
<property name="geometry">
<rect>
<x>0</x>
<y>-80</y>
<y>0</y>
<width>539</width>
<height>484</height>
</rect>
@ -2059,8 +2059,8 @@ QGroupBox { @@ -2059,8 +2059,8 @@ QGroupBox {
<rect>
<x>0</x>
<y>0</y>
<width>524</width>
<height>406</height>
<width>475</width>
<height>304</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
@ -2477,8 +2477,8 @@ QGroupBox { @@ -2477,8 +2477,8 @@ QGroupBox {
<rect>
<x>0</x>
<y>0</y>
<width>524</width>
<height>406</height>
<width>378</width>
<height>229</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_23">
@ -2640,8 +2640,8 @@ QGroupBox { @@ -2640,8 +2640,8 @@ QGroupBox {
<rect>
<x>0</x>
<y>0</y>
<width>524</width>
<height>406</height>
<width>98</width>
<height>28</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_36"/>

Loading…
Cancel
Save