Adjust logging for unplayable dir and assigning directories

This commit is contained in:
Ben Adrian Sarmiento
2024-07-05 16:47:36 +02:00
parent dacf2983a6
commit b501b800dd
3 changed files with 17 additions and 7 deletions

View File

@@ -103,14 +103,14 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
t.workerPool.Submit(func() {
defer wg.Done()
// load *.zurgtorrent files
// initial load of existing *.zurgtorrent files
allTorrents, _ := t.DirectoryMap.Get(INT_ALL)
t.getTorrentFiles("data").Each(func(filePath string) bool {
torrent := t.readTorrentFromFile(filePath)
if torrent != nil {
accessKey := t.GetKey(torrent)
allTorrents.Set(accessKey, torrent)
t.assignDirectory(torrent, false)
t.assignDirectory(torrent, false, false)
}
return false
})