Do not log songs whose artist and title tags are empty.
This commit is contained in:
parent
40d2993b03
commit
51a0ef167c
@ -109,7 +109,8 @@ func (dj *DJHandlers) PlaylistNext(w http.ResponseWriter, _ *http.Request) {
|
|||||||
|
|
||||||
dj.curSong.Listeners, dj.curSong.PeakListeners = dj.listeners.Reset()
|
dj.curSong.Listeners, dj.curSong.PeakListeners = dj.listeners.Reset()
|
||||||
|
|
||||||
if dj.curSong.Artist != "" {
|
if dj.curSong.Artist != "" && !strings.Contains(dj.curSong.Artist, "no artist tag") &&
|
||||||
|
!strings.Contains(dj.curSong.Artist, "No title tag") {
|
||||||
if err := dj.stats.Add(dj.curSong); err != nil {
|
if err := dj.stats.Add(dj.curSong); err != nil {
|
||||||
log.Println("cannot add a song to a stats DB:", err)
|
log.Println("cannot add a song to a stats DB:", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user