Revert "Download one item at a time"
This commit is contained in:
parent
a7820a9cf6
commit
219cdd9fba
2 changed files with 11 additions and 8 deletions
|
@ -384,6 +384,7 @@ class LibrarySync(Thread):
|
||||||
self.vnodes = videonodes.VideoNodes()
|
self.vnodes = videonodes.VideoNodes()
|
||||||
self.dialog = xbmcgui.Dialog()
|
self.dialog = xbmcgui.Dialog()
|
||||||
|
|
||||||
|
self.syncThreadNumber = int(settings('syncThreadNumber'))
|
||||||
self.installSyncDone = settings('SyncInstallRunDone') == 'true'
|
self.installSyncDone = settings('SyncInstallRunDone') == 'true'
|
||||||
self.showDbSync = settings('dbSyncIndicator') == 'true'
|
self.showDbSync = settings('dbSyncIndicator') == 'true'
|
||||||
self.enableMusic = settings('enableMusic') == "true"
|
self.enableMusic = settings('enableMusic') == "true"
|
||||||
|
@ -939,15 +940,16 @@ class LibrarySync(Thread):
|
||||||
# Populate queue: GetMetadata
|
# Populate queue: GetMetadata
|
||||||
for updateItem in self.updatelist:
|
for updateItem in self.updatelist:
|
||||||
getMetadataQueue.put(updateItem)
|
getMetadataQueue.put(updateItem)
|
||||||
# Spawn GetMetadata thread for downloading
|
# Spawn GetMetadata threads for downloading
|
||||||
threads = []
|
threads = []
|
||||||
thread = ThreadedGetMetadata(getMetadataQueue,
|
for i in range(min(self.syncThreadNumber, itemNumber)):
|
||||||
processMetadataQueue,
|
thread = ThreadedGetMetadata(getMetadataQueue,
|
||||||
getMetadataLock,
|
processMetadataQueue,
|
||||||
processMetadataLock)
|
getMetadataLock,
|
||||||
thread.setDaemon(True)
|
processMetadataLock)
|
||||||
thread.start()
|
thread.setDaemon(True)
|
||||||
threads.append(thread)
|
thread.start()
|
||||||
|
threads.append(thread)
|
||||||
log.info("%s download threads spawned" % len(threads))
|
log.info("%s download threads spawned" % len(threads))
|
||||||
# Spawn one more thread to process Metadata, once downloaded
|
# Spawn one more thread to process Metadata, once downloaded
|
||||||
thread = ThreadedProcessMetadata(processMetadataQueue,
|
thread = ThreadedProcessMetadata(processMetadataQueue,
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
<setting id="dbSyncIndicator" label="30507" type="bool" default="true" />
|
<setting id="dbSyncIndicator" label="30507" type="bool" default="true" />
|
||||||
<setting type="sep" /><!-- show syncing progress -->
|
<setting type="sep" /><!-- show syncing progress -->
|
||||||
<setting id="limitindex" type="number" label="30515" default="200" option="int" /><!-- Maximum items to request from the server at once -->
|
<setting id="limitindex" type="number" label="30515" default="200" option="int" /><!-- Maximum items to request from the server at once -->
|
||||||
|
<setting id="syncThreadNumber" type="slider" label="39003" default="5" option="int" range="1,1,20"/>
|
||||||
<setting type="lsep" label="39052" /><!-- Background Sync -->
|
<setting type="lsep" label="39052" /><!-- Background Sync -->
|
||||||
<setting id="enableBackgroundSync" type="bool" label="39026" default="true" visible="true"/>
|
<setting id="enableBackgroundSync" type="bool" label="39026" default="true" visible="true"/>
|
||||||
<setting id="saftyMargin" type="slider" label="39051" default="60" option="int" range="10,1,300" visible="eq(-1,true)"/>
|
<setting id="saftyMargin" type="slider" label="39051" default="60" option="int" range="10,1,300" visible="eq(-1,true)"/>
|
||||||
|
|
Loading…
Reference in a new issue