Ticket #1510: rtorrent-9999-finished[1].patch
| File rtorrent-9999-finished[1].patch, 1.2 KB (added by sirjaren <sirjaren@gmail.com>, 2 years ago) |
|---|
-
src/core/download_list.cc
old new 598 598 // up/downloaded baseline. 599 599 download->download()->tracker_list()->send_completed(); 600 600 601 // save the hash in case the event deletes the object (e.g. d.erase) 602 torrent::HashString infohash = download->info()->hash(); 603 601 604 rpc::commands.call_catch("event.download.finished", rpc::make_target(download), torrent::Object(), "Download event action failed: "); 602 605 603 606 // if (download->resume_flags() != ~uint32_t()) … … 613 616 // being hashed. 614 617 download->set_resume_flags(~uint32_t()); 615 618 616 if (!download->is_active() && rpc::call_command_value("d.state", rpc::make_target(download)) == 1) 617 resume(download, torrent::Download::start_no_create | torrent::Download::start_skip_tracker | torrent::Download::start_keep_baseline); 619 if (find(infohash) != end()) { 620 if (!download->is_active() && rpc::call_command_value("d.get_state", rpc::make_target(download)) == 1) 621 resume(download, torrent::Download::start_no_create | torrent::Download::start_skip_tracker | torrent::Download::start_keep_baseline); 622 } 623 618 624 } 619 625 620 626 void
