Forráskód Böngészése

Merge branch 'v3.3.1'

Owen Diffey 3 éve
szülő
commit
62704718ca

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

@@ -2971,7 +2971,7 @@ export default {
 					)
 						.then(response => {
 							const { song } = response;
-							const { _id, title, skipDuration, artists, thumbnail, duration, status } = song;
+							const { _id, title, skipDuration, artists, thumbnail, duration, verified } = song;
 							next(
 								null,
 								{
@@ -2982,7 +2982,7 @@ export default {
 									artists,
 									thumbnail,
 									duration,
-									status
+									verified
 								},
 								station
 							);

+ 34 - 34
backend/logic/migration/migrations/migration18.js

@@ -77,9 +77,37 @@ export default async function migrate(MigrationModule) {
 					);
 				},
 
+				next => {
+					playlistModel.updateMany({ documentVersion: 5 }, { $set: { documentVersion: 6 } }, (err, res) => {
+						if (err) next(err);
+						else {
+							this.log(
+								"INFO",
+								`Migration 18 (playlist). Matched: ${res.matchedCount}, modified: ${res.modifiedCount}, ok: ${res.ok}.`
+							);
+
+							next();
+						}
+					});
+				},
+
+				next => {
+					stationModel.updateMany({ documentVersion: 6 }, { $set: { documentVersion: 7 } }, (err, res) => {
+						if (err) next(err);
+						else {
+							this.log(
+								"INFO",
+								`Migration 18 (station). Matched: ${res.matchedCount}, modified: ${res.modifiedCount}, ok: ${res.ok}.`
+							);
+
+							next();
+						}
+					});
+				},
+
 				next => {
 					this.log("INFO", `Migration 18. Updating playlist songs and queue songs.`);
-					songModel.find({ documentVersion: 6 }, (err, songs) => {
+					songModel.find({ documentVersion: 7 }, (err, songs) => {
 						if (err) next(err);
 						else {
 							async.eachLimit(
@@ -102,15 +130,15 @@ export default async function migrate(MigrationModule) {
 										title,
 										artists,
 										thumbnail,
-										duration,
-										skipDuration,
+										duration: +duration,
+										skipDuration: +skipDuration,
 										verified
 									};
 									async.waterfall(
 										[
 											next => {
 												playlistModel.updateMany(
-													{ "songs._id": song._id, documentVersion: 5 },
+													{ "songs._id": song._id, documentVersion: 6 },
 													{ $set: { "songs.$": trimmedSong } },
 													next
 												);
@@ -118,7 +146,7 @@ export default async function migrate(MigrationModule) {
 
 											(res, next) => {
 												stationModel.updateMany(
-													{ "queue._id": song._id, documentVersion: 6 },
+													{ "queue._id": song._id, documentVersion: 7 },
 													{ $set: { "queue.$": trimmedSong } },
 													next
 												);
@@ -126,7 +154,7 @@ export default async function migrate(MigrationModule) {
 
 											(res, next) => {
 												stationModel.updateMany(
-													{ "currentSong._id": song._id, documentVersion: 6 },
+													{ "currentSong._id": song._id, documentVersion: 7 },
 													{ $set: { currentSong: null } },
 													next
 												);
@@ -143,34 +171,6 @@ export default async function migrate(MigrationModule) {
 							);
 						}
 					});
-				},
-
-				next => {
-					playlistModel.updateMany({ documentVersion: 5 }, { $set: { documentVersion: 6 } }, (err, res) => {
-						if (err) next(err);
-						else {
-							this.log(
-								"INFO",
-								`Migration 18 (playlist). Matched: ${res.matchedCount}, modified: ${res.modifiedCount}, ok: ${res.ok}.`
-							);
-
-							next();
-						}
-					});
-				},
-
-				next => {
-					stationModel.updateMany({ documentVersion: 6 }, { $set: { documentVersion: 7 } }, (err, res) => {
-						if (err) next(err);
-						else {
-							this.log(
-								"INFO",
-								`Migration 18 (station). Matched: ${res.matchedCount}, modified: ${res.modifiedCount}, ok: ${res.ok}.`
-							);
-
-							next();
-						}
-					});
 				}
 			],
 			err => {

+ 1 - 1
backend/package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "musare-backend",
-  "version": "3.3.0",
+  "version": "3.3.1",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {

+ 1 - 1
backend/package.json

@@ -1,7 +1,7 @@
 {
   "name": "musare-backend",
   "private": true,
-  "version": "3.3.0",
+  "version": "3.3.1",
   "type": "module",
   "description": "An open-source collaborative music listening and catalogue curation application. Currently supporting YouTube based content.",
   "main": "index.js",

+ 1 - 1
frontend/package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "musare-frontend",
-  "version": "3.3.0",
+  "version": "3.3.1",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
frontend/package.json

@@ -5,7 +5,7 @@
     "*.vue"
   ],
   "private": true,
-  "version": "3.3.0",
+  "version": "3.3.1",
   "description": "An open-source collaborative music listening and catalogue curation application. Currently supporting YouTube based content.",
   "main": "main.js",
   "author": "Musare Team",