From 904b6975747bcf77611593db786387ed3f27b561 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Mon, 30 Dec 2019 13:37:53 +0100 Subject: [PATCH] Fixed bug on duplicate song --- libs/ArtistSong.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ArtistSong.js b/libs/ArtistSong.js index aec5703..eb6f2a6 100644 --- a/libs/ArtistSong.js +++ b/libs/ArtistSong.js @@ -12,7 +12,9 @@ class ArtistSong { saveCurrent (value) { // Find if previous song was the same (on bot reload) this.models.Histories - .find({}) + .find({ + radio: value.radio + }) .sort({ createdAt: 'desc' })