mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-10 20:22:31 +00:00
* Moving download variables into command_download.cc.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@902 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -102,7 +102,7 @@ apply_stop_on_ratio(const torrent::Object& rawArgs) {
|
||||
if ((totalUpload >= minUpload && totalUpload * 100 >= totalDone * minRatio) ||
|
||||
(maxRatio > 0 && totalUpload * 100 > totalDone * maxRatio)) {
|
||||
downloadList->stop_try(*itr);
|
||||
(*itr)->set("ignore_commands", (int64_t)1);
|
||||
(*itr)->set("set_ignore_commands", (int64_t)1);
|
||||
}
|
||||
|
||||
++itr;
|
||||
@@ -114,11 +114,11 @@ apply_stop_on_ratio(const torrent::Object& rawArgs) {
|
||||
torrent::Object
|
||||
apply_start_tied() {
|
||||
for (core::DownloadList::iterator itr = control->core()->download_list()->begin(); itr != control->core()->download_list()->end(); ++itr) {
|
||||
if ((*itr)->get_value("state") == 1)
|
||||
if ((*itr)->get_value("get_state") == 1)
|
||||
continue;
|
||||
|
||||
rak::file_stat fs;
|
||||
const std::string& tiedToFile = (*itr)->get_string("tied_to_file");
|
||||
const std::string& tiedToFile = (*itr)->get_string("get_tied_to_file");
|
||||
|
||||
if (!tiedToFile.empty() && fs.update(rak::path_expand(tiedToFile)))
|
||||
control->core()->download_list()->start_try(*itr);
|
||||
@@ -130,11 +130,11 @@ apply_start_tied() {
|
||||
torrent::Object
|
||||
apply_stop_untied() {
|
||||
for (core::DownloadList::iterator itr = control->core()->download_list()->begin(); itr != control->core()->download_list()->end(); ++itr) {
|
||||
if ((*itr)->get_value("state") == 0)
|
||||
if ((*itr)->get_value("get_state") == 0)
|
||||
continue;
|
||||
|
||||
rak::file_stat fs;
|
||||
const std::string& tiedToFile = (*itr)->get_string("tied_to_file");
|
||||
const std::string& tiedToFile = (*itr)->get_string("get_tied_to_file");
|
||||
|
||||
if (!tiedToFile.empty() && !fs.update(rak::path_expand(tiedToFile)))
|
||||
control->core()->download_list()->stop_try(*itr);
|
||||
@@ -147,7 +147,7 @@ torrent::Object
|
||||
apply_close_untied() {
|
||||
for (core::DownloadList::iterator itr = control->core()->download_list()->begin(); itr != control->core()->download_list()->end(); ++itr) {
|
||||
rak::file_stat fs;
|
||||
const std::string& tiedToFile = (*itr)->get_string("tied_to_file");
|
||||
const std::string& tiedToFile = (*itr)->get_string("get_tied_to_file");
|
||||
|
||||
if (!tiedToFile.empty() && !fs.update(rak::path_expand(tiedToFile)) && control->core()->download_list()->stop_try(*itr))
|
||||
control->core()->download_list()->close(*itr);
|
||||
@@ -160,7 +160,7 @@ torrent::Object
|
||||
apply_remove_untied() {
|
||||
for (core::DownloadList::iterator itr = control->core()->download_list()->begin(); itr != control->core()->download_list()->end(); ) {
|
||||
rak::file_stat fs;
|
||||
const std::string& tiedToFile = (*itr)->get_string("tied_to_file");
|
||||
const std::string& tiedToFile = (*itr)->get_string("get_tied_to_file");
|
||||
|
||||
if (!tiedToFile.empty() && !fs.update(rak::path_expand(tiedToFile)) && control->core()->download_list()->stop_try(*itr))
|
||||
itr = control->core()->download_list()->erase(itr);
|
||||
|
||||
Reference in New Issue
Block a user