Proper log rotation, filename compatibility with windows

This commit is contained in:
Ben Adrian Sarmiento
2024-07-06 12:44:25 +02:00
parent b501b800dd
commit 467f51bdec
6 changed files with 67 additions and 15 deletions

View File

@@ -190,7 +190,7 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *realdebrid.T
}
func (t *TorrentManager) convertToTorrent(info *realdebrid.TorrentInfo) *Torrent {
torrent := t.readTorrentFromFile("data/" + info.Hash + ".zurgtorrent")
torrent := t.readTorrentFromFile("data/" + t.getTorrentInfoFilename(info) + ".zurgtorrent")
if torrent != nil && torrent.DownloadedIDs.ContainsOne(info.ID) {
return torrent
}
@@ -391,7 +391,7 @@ func (t *TorrentManager) assignDirectory(tor *Torrent, triggerHook bool, outputL
listing, _ := t.DirectoryMap.Get(directory)
listing.Set(accessKey, tor)
if directory != INT_ALL {
if directory != config.ALL_TORRENTS {
dirs = append(dirs, directory)
}