forked from premiere/premiere-libtorrent
fixed the definition of torrent_handle::is_paused() to be consistent with torrent_status::paused and made it clear in the documentation
This commit is contained in:
parent
e58485822b
commit
635341f1e4
|
@ -1922,6 +1922,10 @@ When a torrent is paused, it will however remember all share ratios to all peers
|
||||||
all potential (not connected) peers. You can use <tt class="docutils literal"><span class="pre">is_paused()</span></tt> to determine if a torrent
|
all potential (not connected) peers. You can use <tt class="docutils literal"><span class="pre">is_paused()</span></tt> to determine if a torrent
|
||||||
is currently paused. Torrents may be paused automatically if there is a file error (e.g. disk full)
|
is currently paused. Torrents may be paused automatically if there is a file error (e.g. disk full)
|
||||||
or something similar. See <a class="reference" href="#file-error-alert">file_error_alert</a>.</p>
|
or something similar. See <a class="reference" href="#file-error-alert">file_error_alert</a>.</p>
|
||||||
|
<p><tt class="docutils literal"><span class="pre">is_paused()</span></tt> only returns true if the torrent itself is paused. If the torrent
|
||||||
|
is not running because the session is paused, this still returns true. To know if a
|
||||||
|
torrent is active or not, you need to inspect both <tt class="docutils literal"><span class="pre">torrent_handle::is_paused()</span></tt>
|
||||||
|
and <tt class="docutils literal"><span class="pre">session::is_paused()</span></tt>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2><a id="force-recheck" name="force-recheck">force_recheck()</a></h2>
|
<h2><a id="force-recheck" name="force-recheck">force_recheck()</a></h2>
|
||||||
|
|
|
@ -1852,6 +1852,11 @@ all potential (not connected) peers. You can use ``is_paused()`` to determine if
|
||||||
is currently paused. Torrents may be paused automatically if there is a file error (e.g. disk full)
|
is currently paused. Torrents may be paused automatically if there is a file error (e.g. disk full)
|
||||||
or something similar. See file_error_alert_.
|
or something similar. See file_error_alert_.
|
||||||
|
|
||||||
|
``is_paused()`` only returns true if the torrent itself is paused. If the torrent
|
||||||
|
is not running because the session is paused, this still returns true. To know if a
|
||||||
|
torrent is active or not, you need to inspect both ``torrent_handle::is_paused()``
|
||||||
|
and ``session::is_paused()``.
|
||||||
|
|
||||||
force_recheck()
|
force_recheck()
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ namespace libtorrent
|
||||||
bool torrent_handle::is_paused() const
|
bool torrent_handle::is_paused() const
|
||||||
{
|
{
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
TORRENT_FORWARD_RETURN(is_paused(), false);
|
TORRENT_FORWARD_RETURN(is_torrent_paused(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void torrent_handle::pause() const
|
void torrent_handle::pause() const
|
||||||
|
|
Loading…
Reference in New Issue