Better logging

This commit is contained in:
Deluan 2016-03-04 22:50:04 -05:00
parent 7a21665c97
commit 36adace7a3
1 changed files with 5 additions and 3 deletions

View File

@ -37,7 +37,10 @@ func (s *ItunesScanner) ScanLibrary(path string) (int, error) {
ar := s.collectArtists(&t)
mf := s.collectMediaFiles(&t)
s.collectAlbums(&t, mf, ar)
i++
}
i++
if i%1000 == 0 {
beego.Info("Processed", i, "tracks.", len(s.artists), "artists,", len(s.albums), "albums", len(s.mediaFiles), "songs")
}
}
return len(l.Tracks), nil
@ -152,10 +155,9 @@ func artistId(t *itl.Track) string {
}
func hasCoverArt(path string) bool {
beego.Trace("hasCOverArt:", path)
defer func() {
if r := recover(); r != nil {
beego.Error("Recovered from tag panic:", r)
beego.Error("Reading tag for", path, "Panic:", r)
}
}()