Fix a bug

This commit is contained in:
Alexey Kostin 2021-03-14 17:41:05 +03:00
parent 04a0b7c93c
commit c39b5b41a9

View File

@ -151,7 +151,11 @@ func (newstructure *NewTorrentStructure) FillMissing() {
newstructure.FillSavePaths()
if newstructure.Unfinished != nil {
newstructure.Pieces = newstructure.FillWholePieces("0")
newstructure.PiecePriority = newstructure.FillPiecesParted()
if newstructure.HasFiles {
newstructure.PiecePriority = newstructure.FillPiecesParted()
} else {
newstructure.PiecePriority = newstructure.FillWholePieces("1")
}
} else {
if newstructure.HasFiles {
newstructure.Pieces = newstructure.FillPiecesParted()