mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Do not redownload files if they were moved
This commit is contained in:
parent
56dba2cb10
commit
2f4f06ca8b
@ -2179,12 +2179,22 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
|
|||||||
//emit peerBlocked(QString::fromUtf8(p->ip.to_string().c_str()));
|
//emit peerBlocked(QString::fromUtf8(p->ip.to_string().c_str()));
|
||||||
}
|
}
|
||||||
else if (fastresume_rejected_alert* p = dynamic_cast<fastresume_rejected_alert*>(a.get())) {
|
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()){
|
if(h.is_valid()){
|
||||||
qDebug("/!\\ Fast resume failed for %s, reason: %s", qPrintable(h.name()), p->message().c_str());
|
qDebug("/!\\ Fast resume failed for %s, reason: %s", qPrintable(h.name()), p->message().c_str());
|
||||||
addConsoleMessage(tr("Fast resume data was rejected for torrent %1, checking again...").arg(h.name()), QString::fromUtf8("red"));
|
#if LIBTORRENT_VERSION_MINOR < 15
|
||||||
addConsoleMessage(tr("Reason: %1").arg(misc::toQString(p->message())));
|
QString msg = QString::fromLocal8Bit(p->message().c_str());
|
||||||
//emit fastResumeDataRejected(h.name());
|
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())));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (url_seed_alert* p = dynamic_cast<url_seed_alert*>(a.get())) {
|
else if (url_seed_alert* p = dynamic_cast<url_seed_alert*>(a.get())) {
|
||||||
|
@ -337,7 +337,6 @@ void SearchEngine::on_search_button_clicked(){
|
|||||||
|
|
||||||
// Getting checked search engines
|
// Getting checked search engines
|
||||||
QStringList params;
|
QStringList params;
|
||||||
QStringList engineNames;
|
|
||||||
search_stopped = false;
|
search_stopped = false;
|
||||||
params << misc::searchEngineLocation()+QDir::separator()+"nova2.py";
|
params << misc::searchEngineLocation()+QDir::separator()+"nova2.py";
|
||||||
params << supported_engines->enginesEnabled().join(",");
|
params << supported_engines->enginesEnabled().join(",");
|
||||||
|
@ -191,7 +191,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<widget class="QStackedWidget" name="tabOption">
|
<widget class="QStackedWidget" name="tabOption">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabOptionPage1">
|
<widget class="QWidget" name="tabOptionPage1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
@ -514,7 +514,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>-98</y>
|
<y>0</y>
|
||||||
<width>506</width>
|
<width>506</width>
|
||||||
<height>504</height>
|
<height>504</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -891,8 +891,8 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>524</width>
|
<width>447</width>
|
||||||
<height>398</height>
|
<height>348</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_28">
|
<layout class="QVBoxLayout" name="verticalLayout_28">
|
||||||
@ -1178,8 +1178,8 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>524</width>
|
<width>404</width>
|
||||||
<height>406</height>
|
<height>334</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_33">
|
<layout class="QVBoxLayout" name="verticalLayout_33">
|
||||||
@ -1559,7 +1559,7 @@ QGroupBox {
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>-80</y>
|
<y>0</y>
|
||||||
<width>539</width>
|
<width>539</width>
|
||||||
<height>484</height>
|
<height>484</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -2059,8 +2059,8 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>524</width>
|
<width>475</width>
|
||||||
<height>406</height>
|
<height>304</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||||
@ -2477,8 +2477,8 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>524</width>
|
<width>378</width>
|
||||||
<height>406</height>
|
<height>229</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_23">
|
<layout class="QVBoxLayout" name="verticalLayout_23">
|
||||||
@ -2640,8 +2640,8 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>524</width>
|
<width>98</width>
|
||||||
<height>406</height>
|
<height>28</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_36"/>
|
<layout class="QVBoxLayout" name="verticalLayout_36"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user