Merge branch 'event_system_commands' of https://github.com/chros73/rtorrent into chros73-event_system_commands

This commit is contained in:
rakshasa
2018-10-20 21:30:39 +09:00
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -168,6 +168,8 @@ Control::is_shutdown_completed() {
void
Control::handle_shutdown() {
rpc::commands.call_catch("event.system.shutdown", rpc::make_target(), "shutdown", "System shutdown event action failed: ");
if (!m_shutdownQuick) {
// Temporary hack:
if (worker_thread->is_active())
+5
View File
@@ -252,6 +252,9 @@ main(int argc, char** argv) {
"method.insert = event.view.hide,multi|rlookup|static\n"
"method.insert = event.view.show,multi|rlookup|static\n"
"method.insert = event.system.startup_done,multi|rlookup|static\n"
"method.insert = event.system.shutdown,multi|rlookup|static\n"
"method.insert = event.download.inserted,multi|rlookup|static\n"
"method.insert = event.download.inserted_new,multi|rlookup|static\n"
"method.insert = event.download.inserted_session,multi|rlookup|static\n"
@@ -480,6 +483,8 @@ main(int argc, char** argv) {
worker_thread->start_thread();
rpc::commands.call_catch("event.system.startup_done", rpc::make_target(), "startup_done", "System startup_done event action failed: ");
torrent::thread_base::event_loop(torrent::main_thread());
control->core()->download_list()->session_save();