Increment d.state_counter on pause

The start path increments it; the pause path assigned it to itself.
This commit is contained in:
noctuum
2026-09-18 13:03:28 +05:00
committed by Jari Sundell
parent 988aca1281
commit b857acd081
+1 -1
View File
@@ -301,7 +301,7 @@ DownloadList::set_state_stopped(Download* download) {
void
DownloadList::update_paused_state(Download* download) {
rpc::call_command("d.state_changed.set", torrent::this_thread::cached_seconds().count(), rpc::make_target(download));
rpc::call_command("d.state_counter.set", rpc::call_command_value("d.state_counter", rpc::make_target(download)), rpc::make_target(download));
rpc::call_command("d.state_counter.set", rpc::call_command_value("d.state_counter", rpc::make_target(download)) + 1, rpc::make_target(download));
// If initial seeding is complete, don't try it again when restarting.
if (download->is_done() &&