From cbe3adf9873af6d255c5476d2fde54116968f01c Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 13 Jan 2023 13:53:21 -0500 Subject: [PATCH] Don't show error when it is nil --- scanner/metadata/taglib/taglib_wrapper.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scanner/metadata/taglib/taglib_wrapper.go b/scanner/metadata/taglib/taglib_wrapper.go index a00adca26..50438d523 100644 --- a/scanner/metadata/taglib/taglib_wrapper.go +++ b/scanner/metadata/taglib/taglib_wrapper.go @@ -46,8 +46,10 @@ func Read(filename string) (tags map[string][]string, err error) { if os.IsPermission(fileErr) { return nil, fmt.Errorf("navidrome does not have permission: %w", fileErr) - } else { + } else if fileErr != nil { return nil, fmt.Errorf("cannot parse file media file: %w", fileErr) + } else { + return nil, fmt.Errorf("cannot parse file media file") } case C.TAGLIB_ERR_AUDIO_PROPS: return nil, fmt.Errorf("can't get audio properties from file")