forked from premiere/premiere-libtorrent
opt call is_finished()
This commit is contained in:
parent
381db57b42
commit
21eb9f782c
|
@ -3928,9 +3928,9 @@ namespace libtorrent {
|
||||||
|
|
||||||
remove_time_critical_piece(index, true);
|
remove_time_critical_piece(index, true);
|
||||||
|
|
||||||
if (is_finished()
|
if (m_state != torrent_status::finished
|
||||||
&& m_state != torrent_status::finished
|
&& m_state != torrent_status::seeding
|
||||||
&& m_state != torrent_status::seeding)
|
&& is_finished())
|
||||||
{
|
{
|
||||||
// torrent finished
|
// torrent finished
|
||||||
// i.e. all the pieces we're interested in have
|
// i.e. all the pieces we're interested in have
|
||||||
|
@ -5180,11 +5180,11 @@ namespace libtorrent {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// the torrent just became finished
|
// the torrent just became finished
|
||||||
if (is_finished() && !was_finished)
|
if (!was_finished && is_finished())
|
||||||
{
|
{
|
||||||
finished();
|
finished();
|
||||||
}
|
}
|
||||||
else if (!is_finished() && was_finished)
|
else if (was_finished && !is_finished())
|
||||||
{
|
{
|
||||||
// if we used to be finished, but we aren't anymore
|
// if we used to be finished, but we aren't anymore
|
||||||
// we may need to connect to peers again
|
// we may need to connect to peers again
|
||||||
|
@ -7490,7 +7490,7 @@ namespace libtorrent {
|
||||||
state_updated();
|
state_updated();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_finished() && m_state != torrent_status::finished)
|
if (m_state != torrent_status::finished && is_finished())
|
||||||
finished();
|
finished();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue