Преглед на файлове

fix: notify to station that private playlist is no longer selected on remove

Kristian Vos преди 5 години
родител
ревизия
208bf32b70
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      backend/logic/actions/playlists.js

+ 4 - 2
backend/logic/actions/playlists.js

@@ -649,8 +649,10 @@ let lib = {
 							},
 
 							(res, next) => {
-								if (!station.partyMode) moduleManager.modules["stations"].updateStation(station._id, next);
-								else next();
+								if (!station.partyMode) {
+									moduleManager.modules["stations"].updateStation(station._id, next);
+									cache.pub('privatePlaylist.selected', { playlistId: null, stationId: station._id });
+								} else next();
 							}
 						], (err) => {
 							next();