forked from premiere/premiere-libtorrent
applied patch from #97
This commit is contained in:
parent
9315851cdf
commit
f8979ff932
|
@ -261,6 +261,17 @@ namespace libtorrent
|
|||
{ return std::auto_ptr<alert>(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<alert> clone() const
|
||||
{ return std::auto_ptr<alert>(new torrent_checked_alert(*this)); }
|
||||
};
|
||||
|
||||
|
||||
struct TORRENT_EXPORT url_seed_alert: torrent_alert
|
||||
{
|
||||
url_seed_alert(
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue