LtTorrentFlags
Manages flags for a torrent. Internally it wraps libtorrent::torrent_flags_t
which is a bitfield, and this wrapper makes it easier to work with.
See the libtorrent docs on flags.
Flags
seed_modeupload_modeshare_modeapply_ip_filterpausedauto_managedduplicate_is_errorupdate_subscribesuper_seedingsequential_downloadstop_when_readyneed_save_resumedisable_dhtdisable_lsddisable_pexno_verify_filesdefault_dont_downloadi2p_torrentdisable_v1_hashes
Example
local flags = LtTorrentFlags()
if flags:has("default_dont_download") then
flags:unset("default_dont_download")
end
Methods
has(flag: string): boolean
v1.0
Returns true if the flag is set.
set(flag: string): void
v1.0
Sets the flag.
unset(flag: string): void
v1.0
Clears a flag by its name.