introduced an error state for torrents. Torrents with an error are not restarted automatically

This commit is contained in:
Arvid Norberg
2008-05-20 07:57:44 +00:00
parent aed8f355b0
commit 67354421fb
7 changed files with 33 additions and 4 deletions

View File

@@ -2206,6 +2206,8 @@ struct torrent_status
state_t state;
bool paused;
float progress;
std::string error;
boost::posix_time::time_duration next_announce;
boost::posix_time::time_duration announce_interval;
@@ -2319,6 +2321,9 @@ allocated.</td>
</table>
<p>When downloading, the progress is <tt class="docutils literal"><span class="pre">total_wanted_done</span></tt> / <tt class="docutils literal"><span class="pre">total_wanted</span></tt>.</p>
<p><tt class="docutils literal"><span class="pre">paused</span></tt> is set to true if the torrent is paused and false otherwise.</p>
<p><tt class="docutils literal"><span class="pre">error</span></tt> may be set to an error message describing why the torrent was paused, in
case it was paused by an error. If the torrent is not paused or if it's paused but
not because of an error, this string is empty.</p>
<p><tt class="docutils literal"><span class="pre">next_announce</span></tt> is the time until the torrent will announce itself to the tracker. And
<tt class="docutils literal"><span class="pre">announce_interval</span></tt> is the time the tracker want us to wait until we announce ourself
again the next time.</p>

View File

@@ -2170,6 +2170,8 @@ It contains the following fields::
state_t state;
bool paused;
float progress;
std::string error;
boost::posix_time::time_duration next_announce;
boost::posix_time::time_duration announce_interval;
@@ -2273,6 +2275,10 @@ When downloading, the progress is ``total_wanted_done`` / ``total_wanted``.
``paused`` is set to true if the torrent is paused and false otherwise.
``error`` may be set to an error message describing why the torrent was paused, in
case it was paused by an error. If the torrent is not paused or if it's paused but
not because of an error, this string is empty.
``next_announce`` is the time until the torrent will announce itself to the tracker. And
``announce_interval`` is the time the tracker want us to wait until we announce ourself
again the next time.