mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-16 14:16:16 +00:00
fix: d.group.name should return group name instead of group index
This commit is contained in:
@@ -905,7 +905,7 @@ initialize_command_download() {
|
|||||||
// CG_GROUP_INDEX()));
|
// CG_GROUP_INDEX()));
|
||||||
|
|
||||||
CMD2_DL ("d.group", std::bind(&cg_d_group, std::placeholders::_1));
|
CMD2_DL ("d.group", std::bind(&cg_d_group, std::placeholders::_1));
|
||||||
CMD2_DL ("d.group.name", std::bind(&cg_d_group, std::placeholders::_1));
|
CMD2_DL ("d.group.name", std::bind(&cg_d_group_name, std::placeholders::_1));
|
||||||
CMD2_DL_V ("d.group.set", std::bind(&cg_d_group_set, std::placeholders::_1, std::placeholders::_2));
|
CMD2_DL_V ("d.group.set", std::bind(&cg_d_group_set, std::placeholders::_1, std::placeholders::_2));
|
||||||
|
|
||||||
CMD2_DL_LIST ("f.multicall", std::bind(&f_multicall, std::placeholders::_1, std::placeholders::_2));
|
CMD2_DL_LIST ("f.multicall", std::bind(&f_multicall, std::placeholders::_1, std::placeholders::_2));
|
||||||
|
|||||||
@@ -154,12 +154,14 @@ cg_get_group(const torrent::Object& raw_args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int64_t cg_d_group(core::Download* download) { return download->group(); }
|
int64_t cg_d_group(core::Download* download) { return download->group(); }
|
||||||
|
const std::string& cg_d_group_name(core::Download* download) {
|
||||||
|
return cg_list_hack.at(download->group())->name();
|
||||||
|
}
|
||||||
void cg_d_group_set(core::Download* download, const torrent::Object& arg) { download->set_group(cg_get_index(arg)); }
|
void cg_d_group_set(core::Download* download, const torrent::Object& arg) { download->set_group(cg_get_index(arg)); }
|
||||||
|
|
||||||
torrent::Object
|
torrent::Object
|
||||||
apply_cg_list() {
|
apply_cg_list() {
|
||||||
torrent::Object::list_type result;
|
torrent::Object::list_type result;
|
||||||
|
|
||||||
for (std::vector<torrent::choke_group*>::iterator itr = cg_list_hack.begin(), last = cg_list_hack.end(); itr != last; itr++)
|
for (std::vector<torrent::choke_group*>::iterator itr = cg_list_hack.begin(), last = cg_list_hack.end(); itr != last; itr++)
|
||||||
result.push_back((*itr)->name());
|
result.push_back((*itr)->name());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user