diff --git a/include/libtorrent/alert_types.hpp b/include/libtorrent/alert_types.hpp index 48491bca4..e6ade9a26 100755 --- a/include/libtorrent/alert_types.hpp +++ b/include/libtorrent/alert_types.hpp @@ -261,6 +261,17 @@ namespace libtorrent { return std::auto_ptr(new torrent_paused_alert(*this)); } }; + struct TORRENT_EXPORT torrent_checked_alert: torrent_alert + { + torrent_checked_alert(torrent_handle const& h, std::string const& msg) + : torrent_alert(h, alert::info, msg) + {} + + virtual std::auto_ptr clone() const + { return std::auto_ptr(new torrent_checked_alert(*this)); } + }; + + struct TORRENT_EXPORT url_seed_alert: torrent_alert { url_seed_alert( diff --git a/src/session_impl.cpp b/src/session_impl.cpp index c51fa4594..694e5f49d 100755 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -222,6 +222,12 @@ namespace detail if (!m_ses.is_aborted()) { m_ses.m_torrents.insert(std::make_pair(t->info_hash, t->torrent_ptr)); + if (m_ses.m_alerts.should_post(alert::info)) + { + m_ses.m_alerts.post_alert(torrent_checked_alert( + processing->torrent_ptr->get_handle() + , "torrent finished checking")); + } if (t->torrent_ptr->is_seed() && m_ses.m_alerts.should_post(alert::info)) { m_ses.m_alerts.post_alert(torrent_finished_alert( @@ -344,6 +350,12 @@ namespace detail processing->torrent_ptr->files_checked(processing->unfinished_pieces); m_ses.m_torrents.insert(std::make_pair( processing->info_hash, processing->torrent_ptr)); + if (m_ses.m_alerts.should_post(alert::info)) + { + m_ses.m_alerts.post_alert(torrent_checked_alert( + processing->torrent_ptr->get_handle() + , "torrent finished checking")); + } if (processing->torrent_ptr->is_seed() && m_ses.m_alerts.should_post(alert::info)) {