DownloadPriority

Per-piece and per-file download priority constants. This is a pure-Kotlin port of libtorrent's download_priority.hpp.

libtorrent models priority as a std::uint8_t strong typedef in the range [0, 7]. We keep the plain Int convention of v0 KiteTorrent. Priority 0 (DONT_DOWNLOAD) means the piece is filtered and is never picked.

The piece picker squeezes the value into 3 bits, so only 0..7 are legal.

Properties

Link copied to clipboard
const val DEFAULT_PRIORITY: Int = 4

The default priority a piece starts at.

Link copied to clipboard
const val DONT_DOWNLOAD: Int = 0

Don't download this piece/file (the piece is "filtered").

Link copied to clipboard
const val LOW_PRIORITY: Int = 1

The lowest non-zero priority.

Link copied to clipboard
const val TOP_PRIORITY: Int = 7

The highest priority.