mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-13 12:46:18 +00:00
* Removed core::HashQueue, using the "hashing" view and a function in
core::Manager instead. * Added a new :rtorrent:hashing state so we can distinguish between initial hashing and manual rehashes. The former is cleared if the download is paused. * Added a hash failed flag to core::Download. This is used to skip entries in the hashing view that either failed to open or are in the process of being erased from DownloadList. * torrent::Bitfield::unset was incrementing, rather than decrementing, the m_set counter. * Replaced all torrent::internal_error's in rtorrent with torrent::client_error. * ^D now checks :rtorrent:state to decide whetever to stop or erase a download. Downloads queued for hashing will now stop rather than be deleted. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@688 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -90,7 +90,7 @@ DownloadList::DownloadList(Control* c) :
|
||||
receive_change_view("main");
|
||||
|
||||
if (m_view == NULL)
|
||||
throw torrent::internal_error("View \"main\" must be present to initialize the main display.");
|
||||
throw torrent::client_error("View \"main\" must be present to initialize the main display.");
|
||||
|
||||
m_taskUpdate.set_slot(rak::mem_fn(this, &DownloadList::task_update)),
|
||||
|
||||
@@ -209,7 +209,7 @@ DownloadList::receive_stop_download() {
|
||||
if (m_view->focus() == m_view->end_visible())
|
||||
return;
|
||||
|
||||
if ((*m_view->focus())->download()->is_active())
|
||||
if ((*m_view->focus())->variable()->get_value("state") == 1)
|
||||
m_control->core()->download_list()->stop(*m_view->focus());
|
||||
else
|
||||
m_control->core()->download_list()->erase(*m_view->focus());
|
||||
@@ -391,7 +391,7 @@ DownloadList::receive_change_view(const std::string& name) {
|
||||
ElementDownloadList* ui = dynamic_cast<ElementDownloadList*>(m_uiArray[DISPLAY_DOWNLOAD_LIST]);
|
||||
|
||||
if (ui == NULL)
|
||||
throw torrent::internal_error("DownloadList::receive_change_view(...) could not cast ui.");
|
||||
throw torrent::client_error("DownloadList::receive_change_view(...) could not cast ui.");
|
||||
|
||||
ui->set_view(m_view);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user