From 1913498cbe420a807b281f7efe732e77d43d8d63 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Sat, 27 Jan 2024 16:47:05 +0100 Subject: [PATCH] Change defaults --- internal/config/types.go | 10 +++++----- internal/torrent/repair.go | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/internal/config/types.go b/internal/config/types.go index 735c818..ef0ccd8 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -98,7 +98,7 @@ func (z *ZurgConfig) GetProxy() string { func (z *ZurgConfig) GetNumOfWorkers() int { if z.NumOfWorkers == 0 { - return 50 + return 32 } return z.NumOfWorkers } @@ -112,7 +112,7 @@ func (z *ZurgConfig) GetRefreshEverySeconds() int { func (z *ZurgConfig) GetRepairEveryMinutes() int { if z.RepairEveryMins == 0 { - return 10 + return 60 } return z.RepairEveryMins } @@ -127,7 +127,7 @@ func (z *ZurgConfig) GetOnLibraryUpdate() string { func (z *ZurgConfig) GetNetworkBufferSize() int { if z.NetworkBufferSize == 0 { - return 64 * 1024 // 64kb + return 1024 * 1024 * 4 // 4MB } return z.NetworkBufferSize } @@ -158,7 +158,7 @@ func (z *ZurgConfig) ShouldForceIPv6() bool { func (z *ZurgConfig) GetRetriesUntilFailed() int { if z.RetriesUntilFailed == 0 { - return 5 + return 2 } return z.RetriesUntilFailed } @@ -169,7 +169,7 @@ func (z *ZurgConfig) EnableDownloadMount() bool { func (z *ZurgConfig) GetRealDebridTimeout() int { if z.RealDebridTimeout == 0 { - return 10 + return 4 } return z.RealDebridTimeout } diff --git a/internal/torrent/repair.go b/internal/torrent/repair.go index d94dc05..b59dbb2 100644 --- a/internal/torrent/repair.go +++ b/internal/torrent/repair.go @@ -106,6 +106,8 @@ func (t *TorrentManager) repairAll(torrent *Torrent) { }) if hasBrokenFiles { info.BrokenLinks = torrent.BrokenLinks + } else { + info.BrokenLinks = mapset.NewSet[string]() } }) }