Logging tracks/albums updates
This commit is contained in:
@@ -80,6 +80,10 @@ func (i *Importer) lastModifiedSince() time.Time {
|
|||||||
beego.Warn("Couldn't read LastScan:", err)
|
beego.Warn("Couldn't read LastScan:", err)
|
||||||
return time.Time{}
|
return time.Time{}
|
||||||
}
|
}
|
||||||
|
if ms == "" {
|
||||||
|
beego.Debug("First scan")
|
||||||
|
return time.Time{}
|
||||||
|
}
|
||||||
s, _ := strconv.ParseInt(ms, 10, 64)
|
s, _ := strconv.ParseInt(ms, 10, 64)
|
||||||
return time.Unix(0, s*int64(time.Millisecond))
|
return time.Unix(0, s*int64(time.Millisecond))
|
||||||
}
|
}
|
||||||
@@ -108,6 +112,9 @@ func (i *Importer) importLibrary() (err error) {
|
|||||||
if err := i.search.IndexMediaFile(mf); err != nil {
|
if err := i.search.IndexMediaFile(mf); err != nil {
|
||||||
beego.Error("Error indexing artist:", err)
|
beego.Error("Error indexing artist:", err)
|
||||||
}
|
}
|
||||||
|
if !i.lastScan.IsZero() {
|
||||||
|
beego.Debug("Updated Track:", mf.Title)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
j = 0
|
j = 0
|
||||||
@@ -123,6 +130,9 @@ func (i *Importer) importLibrary() (err error) {
|
|||||||
if err := i.search.IndexAlbum(al); err != nil {
|
if err := i.search.IndexAlbum(al); err != nil {
|
||||||
beego.Error("Error indexing artist:", err)
|
beego.Error("Error indexing artist:", err)
|
||||||
}
|
}
|
||||||
|
if !i.lastScan.IsZero() {
|
||||||
|
beego.Debug(fmt.Sprintf(`Updated Album:"%s" from "%s"`, al.Name, al.Artist))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
j = 0
|
j = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user