Silly bug... Where are the tests?!?

This commit is contained in:
Deluan 2016-03-07 09:24:35 -05:00
parent 0e492a053c
commit 56e9ad3def

@ -43,8 +43,6 @@ func (s *ItunesScanner) ScanLibrary(lastModifiedSince time.Time, path string) (i
ar := s.collectArtists(&t) ar := s.collectArtists(&t)
mf := s.collectMediaFiles(&t) mf := s.collectMediaFiles(&t)
s.collectAlbums(&t, mf, ar) s.collectAlbums(&t, mf, ar)
} else {
beego.Trace("Skipped", t.Location, " - kind:", t.Kind)
} }
i++ i++
if i%1000 == 0 { if i%1000 == 0 {
@ -94,13 +92,13 @@ func (s *ItunesScanner) collectMediaFiles(t *itl.Track) *domain.MediaFile {
mf.Path = path mf.Path = path
mf.Suffix = strings.TrimPrefix(filepath.Ext(path), ".") mf.Suffix = strings.TrimPrefix(filepath.Ext(path), ".")
mf.CreatedAt = t.DateAdded
mf.UpdatedAt = t.DateModified
if mf.UpdatedAt.After(s.lastModifiedSince) { if mf.UpdatedAt.After(s.lastModifiedSince) {
mf.HasCoverArt = hasCoverArt(path) mf.HasCoverArt = hasCoverArt(path)
} }
mf.CreatedAt = t.DateAdded
mf.UpdatedAt = t.DateModified
s.mediaFiles[mf.Id] = mf s.mediaFiles[mf.Id] = mf
return mf return mf