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() newstructure.FillSavePaths()
if newstructure.Unfinished != nil { if newstructure.Unfinished != nil {
newstructure.Pieces = newstructure.FillWholePieces("0") newstructure.Pieces = newstructure.FillWholePieces("0")
if newstructure.HasFiles {
newstructure.PiecePriority = newstructure.FillPiecesParted() newstructure.PiecePriority = newstructure.FillPiecesParted()
} else {
newstructure.PiecePriority = newstructure.FillWholePieces("1")
}
} else { } else {
if newstructure.HasFiles { if newstructure.HasFiles {
newstructure.Pieces = newstructure.FillPiecesParted() newstructure.Pieces = newstructure.FillPiecesParted()