mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-05 17:52:29 +00:00
Merge branch 'event_system_commands' of https://github.com/chros73/rtorrent into chros73-event_system_commands
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user