瀏覽代碼

Currentsong now also has requestedBy, and fixed station index bug

Kristian Vos 4 年之前
父節點
當前提交
ba44e7a0e8
共有 3 個文件被更改,包括 5 次插入1 次删除
  1. 2 1
      backend/logic/actions/stations.js
  2. 1 0
      backend/logic/db/schemas/station.js
  3. 2 0
      backend/logic/stations.js

+ 2 - 1
backend/logic/actions/stations.js

@@ -419,8 +419,9 @@ export default {
 				(items, next) => {
 					const filteredStations = [];
 
-					async.each(
+					async.eachLimit(
 						items,
+						1,
 						(station, nextStation) => {
 							async.waterfall(
 								[

+ 1 - 0
backend/logic/db/schemas/station.js

@@ -17,6 +17,7 @@ export default {
 		likes: { type: Number, default: -1 },
 		dislikes: { type: Number, default: -1 },
 		skipVotes: [{ type: String }],
+		requestedBy: { type: String },
 		requestedAt: { type: Date },
 		status: { type: String }
 	},

+ 2 - 0
backend/logic/stations.js

@@ -619,6 +619,7 @@ class _StationsModule extends CoreClass {
 											skipDuration: song.skipDuration,
 											thumbnail: song.thumbnail,
 											requestedAt: queueSong.requestedAt,
+											requestedBy: queueSong.requestedBy,
 											likes: song.likes,
 											dislikes: song.dislikes,
 											status: song.status
@@ -902,6 +903,7 @@ class _StationsModule extends CoreClass {
 								skipDuration: song.skipDuration,
 								thumbnail: song.thumbnail,
 								requestedAt: song.requestedAt,
+								requestedBy: song.requestedBy,
 								status: song.status
 							};
 						}