Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't stop upload when there's 0 leecher. #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Source/RatioMaster/RM.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Source/RatioMaster/RM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ private bool sendEventToTracker(TorrentInfo torrentInfo, string eventType)
updateScrapStats(BEncode.String(dictionary1["complete"]), BEncode.String(dictionary1["incomplete"]), "");

decimal leechers = BEncode.String(dictionary1["incomplete"]).ParseValidInt(0);
if (leechers == 0)
if (leechers == 0 && noLeechers.Checked)
{
AddLogLine("Min number of leechers reached... setting upload speed to 0");
updateTextBox(uploadRate, "0");
Expand Down Expand Up @@ -1134,7 +1134,7 @@ private void requestScrapeFromTracker(TorrentInfo torrentInfo)
AddLogLine("incomplete: " + BEncode.String(dictionary2["incomplete"]));
updateScrapStats(BEncode.String(dictionary2["complete"]), BEncode.String(dictionary2["incomplete"]), BEncode.String(dictionary2["downloaded"]));
decimal leechers = BEncode.String(dictionary2["incomplete"]).ParseValidInt(-1);
if (Leechers != -1 && (leechers == 0))
if (Leechers != -1 && (leechers == 0) && noLeechers.Checked)
{
AddLogLine("Min number of leechers reached... setting upload speed to 0");
updateTextBox(uploadRate, "0");
Expand Down