mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 22:22:31 +00:00
* Added 'execute.*.bg' commands for non-blocking calls. Always returns 0.
* Added support for prioritizing first/last chunk of files matching specified patterns. Default:
file.prioritize_toc.set=0
file.prioritize_toc.first.set = {*.avi,*.mp4,*.mkv,*.gz}
file.prioritize_toc.last.set = {*.zip}
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1230 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -56,6 +56,7 @@ apply_f_set_priority(torrent::File* file, uint32_t value) {
|
||||
file->set_priority((torrent::priority_t)value);
|
||||
}
|
||||
|
||||
// TODO: Redundant.
|
||||
torrent::Object
|
||||
apply_f_path(torrent::File* file) {
|
||||
if (file->path()->empty())
|
||||
@@ -110,6 +111,13 @@ initialize_command_file() {
|
||||
CMD2_FILE_VALUE_V("f.unset_create_queued", std::bind(&torrent::File::unset_flags, std::placeholders::_1, torrent::File::flag_create_queued));
|
||||
CMD2_FILE_VALUE_V("f.unset_resize_queued", std::bind(&torrent::File::unset_flags, std::placeholders::_1, torrent::File::flag_resize_queued));
|
||||
|
||||
CMD2_FILE ("f.prioritize_first", std::bind(&torrent::File::has_flags, std::placeholders::_1, torrent::File::flag_prioritize_first));
|
||||
CMD2_FILE_V("f.prioritize_first.enable", std::bind(&torrent::File::set_flags, std::placeholders::_1, torrent::File::flag_prioritize_first));
|
||||
CMD2_FILE_V("f.prioritize_first.disable", std::bind(&torrent::File::unset_flags, std::placeholders::_1, torrent::File::flag_prioritize_first));
|
||||
CMD2_FILE ("f.prioritize_last", std::bind(&torrent::File::has_flags, std::placeholders::_1, torrent::File::flag_prioritize_last));
|
||||
CMD2_FILE_V("f.prioritize_last.enable", std::bind(&torrent::File::set_flags, std::placeholders::_1, torrent::File::flag_prioritize_last));
|
||||
CMD2_FILE_V("f.prioritize_last.disable", std::bind(&torrent::File::unset_flags, std::placeholders::_1, torrent::File::flag_prioritize_last));
|
||||
|
||||
CMD2_FILE("f.size_bytes", std::bind(&torrent::File::size_bytes, std::placeholders::_1));
|
||||
CMD2_FILE("f.size_chunks", std::bind(&torrent::File::size_chunks, std::placeholders::_1));
|
||||
CMD2_FILE("f.completed_chunks", std::bind(&torrent::File::completed_chunks, std::placeholders::_1));
|
||||
|
||||
Reference in New Issue
Block a user