Move the responsibility of the maximum number of threads to the UI.

Previously the user was able to set any number to limitThreads UI
component but internally that was reduced to be a maximum of 50 which is
deceiving to the user. Set this is set as a boundary in the UI.

This also fixes a bug that the user could set the number of threads to
zero which follows from GIGO; but let the UI assist by placing a min
number of threads to 1.
This commit is contained in:
Chuddah 2020-02-17 11:59:48 +00:00
parent 4649d2371f
commit 2bf2206a1e
2 changed files with 3 additions and 3 deletions

View file

@ -23,7 +23,7 @@ from jellyfin import Jellyfin
##################################################################################################
LOG = logging.getLogger("JELLYFIN." + __name__)
LIMIT = min(int(settings('limitIndex') or 50), 50)
LIMIT = int(settings('limitIndex') or 15)
DTHREADS = int(settings('limitThreads') or 3)
MEDIA = {
'Movie': Movies,

View file

@ -25,8 +25,8 @@
<setting label="30511" id="useDirectPaths" type="enum" lvalues="33036|33037" default="1" />
<setting label="33175" type="lsep" />
<setting label="30515" id="limitIndex" type="number" default="15" option="int" />
<setting label="33174" id="limitThreads" type="number" default="3" option="int" />
<setting label="30515" id="limitIndex" type="slider" default="15" range="1, 1, 100" option="int" />
<setting label="33174" id="limitThreads" type="slider" default="3" range="1, 1, 50" option="int" />
<setting label="33176" type="lsep" />
<setting label="30512" id="enableTextureCache" type="bool" default="true" />
<setting label="30157" id="enableCoverArt" type="bool" default="true" />