diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py
index 25a57776..fa79e5cb 100644
--- a/resources/lib/librarysync.py
+++ b/resources/lib/librarysync.py
@@ -384,6 +384,7 @@ class LibrarySync(Thread):
self.vnodes = videonodes.VideoNodes()
self.dialog = xbmcgui.Dialog()
+ self.syncThreadNumber = int(settings('syncThreadNumber'))
self.installSyncDone = settings('SyncInstallRunDone') == 'true'
self.showDbSync = settings('dbSyncIndicator') == 'true'
self.enableMusic = settings('enableMusic') == "true"
@@ -939,15 +940,16 @@ class LibrarySync(Thread):
# Populate queue: GetMetadata
for updateItem in self.updatelist:
getMetadataQueue.put(updateItem)
- # Spawn GetMetadata thread for downloading
+ # Spawn GetMetadata threads for downloading
threads = []
- thread = ThreadedGetMetadata(getMetadataQueue,
- processMetadataQueue,
- getMetadataLock,
- processMetadataLock)
- thread.setDaemon(True)
- thread.start()
- threads.append(thread)
+ for i in range(min(self.syncThreadNumber, itemNumber)):
+ thread = ThreadedGetMetadata(getMetadataQueue,
+ processMetadataQueue,
+ getMetadataLock,
+ processMetadataLock)
+ thread.setDaemon(True)
+ thread.start()
+ threads.append(thread)
log.info("%s download threads spawned" % len(threads))
# Spawn one more thread to process Metadata, once downloaded
thread = ThreadedProcessMetadata(processMetadataQueue,
diff --git a/resources/settings.xml b/resources/settings.xml
index e7066114..2110da9d 100644
--- a/resources/settings.xml
+++ b/resources/settings.xml
@@ -46,6 +46,7 @@
+