Make alignment optimization optional

Disabling alignment optimization allows preserving file order in torrent
files and closes #5652
This commit is contained in:
toster
2018-04-14 03:24:08 +03:00
parent 1055cc0f45
commit e538eae726
5 changed files with 20 additions and 2 deletions

View File

@@ -92,7 +92,8 @@ void TorrentCreatorThread::run()
if (isInterruptionRequested()) return;
libt::create_torrent newTorrent(fs, m_params.pieceSize);
libt::create_torrent newTorrent(fs, m_params.pieceSize, -1
, (m_params.isAlignmentOptimized ? libt::create_torrent::optimize_alignment : 0));
// Add url seeds
foreach (QString seed, m_params.urlSeeds) {