Revert "Always index songs and albums"

This reverts commit 4aa02e68e5.
This commit is contained in:
Deluan 2016-03-16 23:11:52 -04:00
parent cc89cb5bd1
commit 86da33f91d
1 changed files with 6 additions and 6 deletions

View File

@ -151,15 +151,15 @@ func (i *Importer) importLibrary() (err error) {
for _, mf := range i.scanner.MediaFiles() {
mfs[j] = *mf
j++
if err := i.search.IndexMediaFile(mf); err != nil {
beego.Error("Error indexing artist:", err)
}
if mf.UpdatedAt.Before(i.lastScan) {
continue
}
if err := i.mfRepo.Put(mf); err != nil {
beego.Error(err)
}
if err := i.search.IndexMediaFile(mf); err != nil {
beego.Error("Error indexing artist:", err)
}
mfu++
if !i.lastScan.IsZero() {
beego.Debug("-- Updated Track:", mf.Title)
@ -170,15 +170,15 @@ func (i *Importer) importLibrary() (err error) {
for _, al := range i.scanner.Albums() {
als[j] = *al
j++
if err := i.search.IndexAlbum(al); err != nil {
beego.Error("Error indexing artist:", err)
}
if al.UpdatedAt.Before(i.lastScan) {
continue
}
if err := i.albumRepo.Put(al); err != nil {
beego.Error(err)
}
if err := i.search.IndexAlbum(al); err != nil {
beego.Error("Error indexing artist:", err)
}
alu++
if !i.lastScan.IsZero() {
beego.Debug(fmt.Sprintf(`-- Updated Album:"%s" from "%s"`, al.Name, al.Artist))