exposed default add_torrent_params flags to python bindings

This commit is contained in:
arvidn 2018-09-21 07:40:04 -07:00 committed by Arvid Norberg
parent 8cc93e9855
commit 2508e2ab0f
3 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,4 @@
* exposed default add_torrent_params flags to python bindings
* fix redundant flushes of partfile metadata
* add option to ignore min-interval from trackers on force-reannounce
* raise default setting for active_limit

View File

@ -826,6 +826,7 @@ void bind_session()
.value("flag_use_resume_save_path", add_torrent_params::flag_use_resume_save_path)
.value("flag_merge_resume_http_seeds", add_torrent_params::flag_merge_resume_http_seeds)
.value("flag_stop_when_ready", add_torrent_params::flag_stop_when_ready)
.value("default_flags", add_torrent_params::default_flags)
;
class_<cache_status>("cache_status")
.add_property("pieces", cache_status_pieces)

View File

@ -43,7 +43,7 @@ class test_torrent_handle(unittest.TestCase):
def setup(self):
self.ses = lt.session({'alert_mask': lt.alert.category_t.all_categories, 'enable_dht': False})
self.ti = lt.torrent_info('url_seed_multi.torrent');
self.h = self.ses.add_torrent({'ti': self.ti, 'save_path': os.getcwd()})
self.h = self.ses.add_torrent({'ti': self.ti, 'save_path': os.getcwd(), 'flags': lt.add_torrent_params_flags_t.default_flags})
def test_torrent_handle(self):
self.setup()