From 42bf9154376708374ac715e31cca089a0e893d2e Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 15 Feb 2019 14:09:20 +0100 Subject: [PATCH] update documentation for the seed_mode flag --- include/libtorrent/torrent_flags.hpp | 9 ++------- include/libtorrent/torrent_handle.hpp | 3 +++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/libtorrent/torrent_flags.hpp b/include/libtorrent/torrent_flags.hpp index d078bd1a3..5d0723921 100644 --- a/include/libtorrent/torrent_flags.hpp +++ b/include/libtorrent/torrent_flags.hpp @@ -59,8 +59,8 @@ namespace torrent_flags { // Setting ``seed_mode`` on a torrent without metadata (a // .torrent file) is a no-op and will be ignored. // - // If resume data is passed in with this torrent, the seed mode saved - // in there will override the seed mode you set here. + // It is not possible to *set* the `seed_mode` flag on a torrent after it has + // been added to as session. It is possible to *clear* it though. constexpr torrent_flags_t seed_mode = 0_bit; // If ``upload_mode`` is set, the torrent will be initialized in @@ -123,11 +123,6 @@ namespace torrent_flags { // the torrent should also be started as paused. The default queue // order is the order the torrents were added. They are all downloaded // in that order. For more details, see queuing_. - // - // If you pass in resume data, the auto_managed state of the torrent - // when the resume data was saved will override the auto_managed state - // you pass in here. You can override this by setting - // ``override_resume_data``. constexpr torrent_flags_t auto_managed = 5_bit; constexpr torrent_flags_t duplicate_is_error = 6_bit; diff --git a/include/libtorrent/torrent_handle.hpp b/include/libtorrent/torrent_handle.hpp index a70f27054..fd2aa694a 100644 --- a/include/libtorrent/torrent_handle.hpp +++ b/include/libtorrent/torrent_handle.hpp @@ -574,6 +574,9 @@ namespace aux { // the specified flags and leave any other flags unchanged. // ``unset_flags`` clears the specified flags, while leaving // any other flags unchanged. + // + // The `seed_mode` flag is special, it can only be cleared by the + // `set_flags()` function, not set. torrent_flags_t flags() const; void set_flags(torrent_flags_t flags, torrent_flags_t mask) const; void set_flags(torrent_flags_t flags) const;