@ -537,7 +537,7 @@ func DownloadMissingEpisodes() error {
SetPodcastItemAsDownloaded ( item . ID , url )
} ( item , * setting )
if index % 5 == 0 {
if index % setting . MaxDownloadConcurrency == 0 {
wg . Wait ( )
}
}
@ -764,7 +764,7 @@ func GetSearchFromPodcastIndex(pod *podcastindex.Podcast) *model.CommonSearchRes
func UpdateSettings ( downloadOnAdd bool , initialDownloadCount int , autoDownload bool ,
appendDateToFileName bool , appendEpisodeNumberToFileName bool , darkMode bool , downloadEpisodeImages bool ,
generateNFOFile bool , dontDownloadDeletedFromDisk bool , baseUrl string ) error {
generateNFOFile bool , dontDownloadDeletedFromDisk bool , baseUrl string , maxDownloadConcurrency int ) error {
setting := db . GetOrCreateSetting ( )
setting . AutoDownload = autoDownload
@ -777,6 +777,7 @@ func UpdateSettings(downloadOnAdd bool, initialDownloadCount int, autoDownload b
setting . GenerateNFOFile = generateNFOFile
setting . DontDownloadDeletedFromDisk = dontDownloadDeletedFromDisk
setting . BaseUrl = baseUrl
setting . MaxDownloadConcurrency = maxDownloadConcurrency
return db . UpdateSettings ( setting )
}