hotfix repair; handle 206 requests; increases log retention
This commit is contained in:
@@ -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{
|
||||
|
||||
@@ -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...)
|
||||
|
||||
Reference in New Issue
Block a user