Add option to align file to piece boundary when creating new torrent

Alignment is achieved by adding dummy pad files between files which is
handled by libtorrent.
Closes #10460.
This commit is contained in:
Chocobo1
2019-09-10 00:59:43 +08:00
parent b144d3b797
commit edcc74c1ae
5 changed files with 89 additions and 21 deletions

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>592</width>
<height>658</height>
<height>731</height>
</rect>
</property>
<property name="acceptDrops">
@@ -225,13 +225,58 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkOptimizeAlignment">
<property name="text">
<widget class="QGroupBox" name="checkOptimizeAlignment">
<property name="title">
<string>Optimize alignment</string>
</property>
<property name="checked">
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="lblPaddedFileSizeLimit">
<property name="text">
<string>Align to piece boundary for files larger than:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinPaddedFileSizeLimit">
<property name="specialValueText">
<string>Disabled</string>
</property>
<property name="suffix">
<string> KiB</string>
</property>
<property name="minimum">
<number>-1</number>
</property>
<property name="maximum">
<number>2147483647</number>
</property>
<property name="value">
<number>-1</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>