hotfix repair; handle 206 requests; increases log retention

This commit is contained in:
Mukhtar Akere
2025-03-11 04:22:51 +01:00
parent 2b2a682218
commit 4f92b135d4
2 changed files with 5 additions and 6 deletions

View File

@@ -32,11 +32,10 @@ func GetLogPath() string {
func NewLogger(prefix string, level string, output *os.File) zerolog.Logger {
rotatingLogFile := &lumberjack.Logger{
Filename: GetLogPath(),
MaxSize: 2,
MaxBackups: 2,
MaxAge: 28,
Compress: true,
Filename: GetLogPath(),
MaxSize: 10,
MaxAge: 15,
Compress: true,
}
consoleWriter := zerolog.ConsoleWriter{

View File

@@ -532,7 +532,7 @@ func (r *Repair) getZurgBrokenFiles(media arr.Content) []arr.ContentFile {
continue
}
if resp.StatusCode != http.StatusOK {
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
r.logger.Debug().Msgf("Failed to get download url for %s", fullURL)
resp.Body.Close()
brokenFiles = append(brokenFiles, f...)