mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-22 17:16:17 +00:00
Fixed minor bugs in the resume save and start torrent code.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@434 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+2
-3
@@ -25,15 +25,14 @@
|
|||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question><para>
|
<question><para>
|
||||||
How does the session feature work?
|
How does the session feature work?
|
||||||
</para></questions>
|
</para></question>
|
||||||
<answer><para>
|
<answer><para>
|
||||||
When you start the client you can use the "-s" switch to
|
When you start the client you can use the "-s" switch to
|
||||||
specify a session directory. The client will save all
|
specify a session directory. The client will save all
|
||||||
currently running torrents in the session directory and fast
|
currently running torrents in the session directory and fast
|
||||||
resume data will be written when the client exits. Upon
|
resume data will be written when the client exits. Upon
|
||||||
restarting the client it will resume all the torrents in the
|
restarting the client it will resume all the torrents in the
|
||||||
session directory. Note that the filenames must be in the
|
session directory.
|
||||||
"<info_hash_hex>.torrent" format.
|
|
||||||
</para></answer>
|
</para></answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
|||||||
+13
-1
@@ -106,10 +106,22 @@ Manager::stop(Download* d) {
|
|||||||
|
|
||||||
d->stop();
|
d->stop();
|
||||||
|
|
||||||
d->get_download().hash_save();
|
if (d->get_download().is_hash_checked())
|
||||||
|
d->get_download().hash_save();
|
||||||
|
|
||||||
m_downloadStore.save(d);
|
m_downloadStore.save(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Manager::start_safe(Download* d) {
|
||||||
|
try {
|
||||||
|
start(d);
|
||||||
|
} catch (torrent::local_error& e) {
|
||||||
|
m_logImportant.push_front(e.what());
|
||||||
|
m_logComplete.push_front(e.what());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Manager::set_dns(const std::string& dns) {
|
Manager::set_dns(const std::string& dns) {
|
||||||
unsigned int a, b, c, d;
|
unsigned int a, b, c, d;
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ public:
|
|||||||
void start(Download* d);
|
void start(Download* d);
|
||||||
void stop(Download* d);
|
void stop(Download* d);
|
||||||
|
|
||||||
|
void start_safe(Download* d);
|
||||||
|
|
||||||
const std::string& get_dns() { return m_dns; }
|
const std::string& get_dns() { return m_dns; }
|
||||||
void set_dns(const std::string& dns);
|
void set_dns(const std::string& dns);
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ DownloadList::receive_start_download() {
|
|||||||
if (m_downloadList.get_focus() == m_downloadList.end())
|
if (m_downloadList.get_focus() == m_downloadList.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_control->get_core().start(*m_downloadList.get_focus());
|
m_control->get_core().start_safe(*m_downloadList.get_focus());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user