1
0

Do not log songs whose artist and title tags are empty.

This commit is contained in:
Alexander Andreev 2024-05-13 01:14:05 +04:00
parent 40d2993b03
commit 51a0ef167c
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -109,7 +109,8 @@ func (dj *DJHandlers) PlaylistNext(w http.ResponseWriter, _ *http.Request) {
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 {
log.Println("cannot add a song to a stats DB:", err)
}