Browse Source

Fixed bug where officialplaylist cache didn't get initialized on station initialize.

KrisVos130 8 years ago
parent
commit
5da8f7afba
1 changed files with 6 additions and 0 deletions
  1. 6 0
      backend/logic/stations.js

+ 6 - 0
backend/logic/stations.js

@@ -56,6 +56,12 @@ module.exports = {
 		_this.getStation(stationId, (err, station) => {
 			if (!err) {
 				if (station) {
+					cache.hget('officialPlaylists', stationId, (err, playlist) => {
+						if (err || !playlist) {
+							_this.calculateOfficialPlaylistList(stationId, station.playlist, ()=>{});
+						}
+					});
+
 					let notification = notifications.subscribe(`stations.nextSong?id=${station._id}`, _this.skipStation(station._id), true);
 					if (!station.paused ) {
 						/*if (!station.startedAt) {