fix: don't save blocks bitfield to resume when we are seed
This commit is contained in:
parent
2ff3ae07d1
commit
a586f8d743
|
@ -467,14 +467,16 @@ void saveProgress(tr_variant* dict, tr_torrent const* tor, tr_torrent::ResumeHel
|
|||
// add the 'checked pieces' bitfield
|
||||
bitfieldToRaw(helper.checked_pieces(), tr_variantDictAdd(prog, TR_KEY_pieces));
|
||||
|
||||
/* add the progress */
|
||||
// add the progress
|
||||
if (tor->is_seed())
|
||||
{
|
||||
// shortcut for faster load times for when we have all blocks
|
||||
tr_variantDictAddStrView(prog, TR_KEY_have, "all"sv);
|
||||
}
|
||||
|
||||
/* add the blocks bitfield */
|
||||
bitfieldToRaw(helper.blocks(), tr_variantDictAdd(prog, TR_KEY_blocks));
|
||||
else
|
||||
{
|
||||
bitfieldToRaw(helper.blocks(), tr_variantDictAdd(prog, TR_KEY_blocks));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue