expose some missing torrent_status fields to the python bindings

This commit is contained in:
Arvid Norberg 2010-11-25 03:07:40 +00:00
parent faccbd8ae3
commit 6917410d20
1 changed files with 12 additions and 0 deletions

View File

@ -24,6 +24,11 @@ void bind_torrent_status()
scope status = class_<torrent_status>("torrent_status")
.def_readonly("state", &torrent_status::state)
.def_readonly("paused", &torrent_status::paused)
.def_readonly("auto_managed", &torrent_status::auto_managed)
.def_readonly("sequential_download", &torrent_status::sequential_download)
.def_readonly("is_seeding", &torrent_status::is_seeding)
.def_readonly("is_finished", &torrent_status::is_finished)
.def_readonly("has_metadata", &torrent_status::has_metadata)
.def_readonly("progress", &torrent_status::progress)
.def_readonly("progress_ppm", &torrent_status::progress_ppm)
.add_property(
@ -85,6 +90,13 @@ void bind_torrent_status()
.def_readonly("share_mode", &torrent_status::share_mode)
.def_readonly("error", &torrent_status::error)
.def_readonly("priority", &torrent_status::priority)
.def_readonly("added_time", &torrent_status::added_time)
.def_readonly("completed_time", &torrent_status::completed_time)
.def_readonly("last_seen_complete", &torrent_status::last_seen_complete)
.def_readonly("time_since_upload", &torrent_status::time_since_upload)
.def_readonly("time_since_download", &torrent_status::time_since_download)
.def_readonly("queue_position", &torrent_status::queue_position)
.def_readonly("need_save_resume", &torrent_status::need_save_resume)
;
enum_<torrent_status::state_t>("states")