mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-06 18:22:32 +00:00
* Fixed 'd.group.set' for the mainline version.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1264 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -49,6 +49,9 @@
|
||||
#include "control.h"
|
||||
#include "command_helpers.h"
|
||||
|
||||
// For cg_d_group.
|
||||
#include "core/download.h"
|
||||
|
||||
// A hack to allow testing of the new choke_group API without the
|
||||
// working parts present.
|
||||
#define USE_CHOKE_GROUP 0
|
||||
@@ -80,6 +83,16 @@ cg_get_group(const torrent::Object& raw_args) {
|
||||
return torrent::resource_manager()->group_at(cg_get_index(raw_args));
|
||||
}
|
||||
|
||||
int64_t
|
||||
cg_d_group(core::Download* download) {
|
||||
return torrent::resource_manager()->entry_at(download->main())->group();
|
||||
}
|
||||
|
||||
void
|
||||
cg_d_group_set(core::Download* download, const torrent::Object& arg) {
|
||||
torrent::resource_manager::set_group(torrent::resource_manager()->find_throw(download->main()), cg_get_index(arg));
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
apply_cg_list() {
|
||||
torrent::Object::list_type result;
|
||||
@@ -151,6 +164,9 @@ cg_get_group(const torrent::Object& raw_args) {
|
||||
return cg_list_hack.at(index);
|
||||
}
|
||||
|
||||
int64_t cg_d_group(core::Download* download) { return download->group(); }
|
||||
void cg_d_group_set(core::Download* download, const torrent::Object& arg) { download->set_group(cg_get_index(arg)); }
|
||||
|
||||
torrent::Object
|
||||
apply_cg_list() {
|
||||
torrent::Object::list_type result;
|
||||
|
||||
Reference in New Issue
Block a user