LtAddTorrentParams
The LtAddTorrentParams is a pure Lua table - i.e it does not wrap a type.
The main reason for this is that wrapping it makes it quite hard to work with the different tables associated with the params, such as trackers, file priorities, etc.
This has the consequence that no actual type checking is done until the table is handed over to the C++ side and it is converted to a real object.
Factories
from_path(path: string): LtAddTorrentParams | nil, PoError | nil
v1.0
Loads a torrent file from a path and parses it into an LtAddTorrentParams.
Example
local params, err = LtAddTorrentParams.from_path("/tmp/debian.torrent")
if err then
print("Failed to load torrent file: {}", err)
return
end
print("Loaded torrent {}", params.name)