mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-23 23:20:57 +03:00
Logging errors during import
This commit is contained in:
parent
3ab09c4b2c
commit
e9a46b77ff
@ -6,7 +6,9 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strconv"
|
||||
"fmt"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
type ItunesScanner struct{}
|
||||
@ -47,9 +49,13 @@ func (s *ItunesScanner) LoadFolder(path string) []Track {
|
||||
return mediaFiles[0:i]
|
||||
}
|
||||
|
||||
func unescape(s string) string {
|
||||
s, _ = url.QueryUnescape(s)
|
||||
return strings.Replace(s, "&", "&", -1)
|
||||
func unescape(str string) string {
|
||||
s := strings.Replace(str, "&", "&", -1)
|
||||
s, err := url.QueryUnescape(s)
|
||||
if err != nil {
|
||||
beego.Warn("Error importing string", str, ":", err)
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
var _ Scanner = (*ItunesScanner)(nil)
|
||||
|
Loading…
x
Reference in New Issue
Block a user