diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp
index 4b67121b7..0974ee5bc 100644
--- a/src/base/bittorrent/session.cpp
+++ b/src/base/bittorrent/session.cpp
@@ -1535,10 +1535,14 @@ void Session::processShareLimits()
LogMsg(tr("'%1' reached the maximum ratio you set. Removed.").arg(torrent->name()));
deleteTorrent(torrent->hash());
}
- else if (!torrent->isPaused()) {
+ else if ((m_maxRatioAction == Pause) && !torrent->isPaused()) {
torrent->pause();
LogMsg(tr("'%1' reached the maximum ratio you set. Paused.").arg(torrent->name()));
}
+ else if ((m_maxRatioAction == EnableSuperSeeding) && !torrent->isPaused() && !torrent->superSeeding()) {
+ torrent->setSuperSeeding(true);
+ LogMsg(tr("'%1' reached the maximum ratio you set. Enabled super seeding for it.").arg(torrent->name()));
+ }
continue;
}
}
@@ -1558,10 +1562,14 @@ void Session::processShareLimits()
LogMsg(tr("'%1' reached the maximum seeding time you set. Removed.").arg(torrent->name()));
deleteTorrent(torrent->hash());
}
- else if (!torrent->isPaused()) {
+ else if ((m_maxRatioAction == Pause) && !torrent->isPaused()) {
torrent->pause();
LogMsg(tr("'%1' reached the maximum seeding time you set. Paused.").arg(torrent->name()));
}
+ else if ((m_maxRatioAction == EnableSuperSeeding) && !torrent->isPaused() && !torrent->superSeeding()) {
+ torrent->setSuperSeeding(true);
+ LogMsg(tr("'%1' reached the maximum seeding time you set. Enabled super seeding for it.").arg(torrent->name()));
+ }
}
}
}
diff --git a/src/base/bittorrent/session.h b/src/base/bittorrent/session.h
index 8ca0e1db1..529f4e1b9 100644
--- a/src/base/bittorrent/session.h
+++ b/src/base/bittorrent/session.h
@@ -62,7 +62,8 @@ class ResumeDataSavingManager;
enum MaxRatioAction
{
Pause,
- Remove
+ Remove,
+ EnableSuperSeeding
};
enum TorrentExportFolder
diff --git a/src/gui/optionsdialog.ui b/src/gui/optionsdialog.ui
index 3c7d51030..0c108a491 100644
--- a/src/gui/optionsdialog.ui
+++ b/src/gui/optionsdialog.ui
@@ -2443,9 +2443,6 @@
false
-
- Qt::AlignCenter
-
min
@@ -2489,6 +2486,11 @@
Remove them
+ -
+
+ Enable super seeding for them
+
+
-
@@ -2503,9 +2505,6 @@
false
-
- Qt::AlignHCenter
-
9998.000000000000000
diff --git a/src/webui/www/private/preferences_content.html b/src/webui/www/private/preferences_content.html
index 2f89d79dc..14869feb2 100644
--- a/src/webui/www/private/preferences_content.html
+++ b/src/webui/www/private/preferences_content.html
@@ -579,6 +579,7 @@