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

fix(Playlists): socket events handled properly when song removed from playlist

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan преди 4 години
родител
ревизия
d4bc775d02

+ 1 - 1
frontend/src/components/modals/EditStation.vue

@@ -529,7 +529,7 @@ export default {
 				this.playlists.forEach((playlist, index) => {
 					if (playlist._id === data.playlistId) {
 						this.playlists[index].songs.forEach((song, index2) => {
-							if (song._id === data.songId) {
+							if (song.songId === data.songId) {
 								this.playlists[index].songs.splice(index2, 1);
 							}
 						});

+ 1 - 1
frontend/src/pages/Profile.vue

@@ -328,7 +328,7 @@ export default {
 												].songs.forEach(
 													(song, index2) => {
 														if (
-															song._id ===
+															song.songId ===
 															data.songId
 														) {
 															this.playlists[

+ 1 - 1
frontend/src/pages/Station/components/Sidebar/MyPlaylists.vue

@@ -102,7 +102,7 @@ export default {
 				this.playlists.forEach((playlist, index) => {
 					if (playlist._id === data.playlistId) {
 						this.playlists[index].songs.forEach((song, index2) => {
-							if (song._id === data.songId) {
+							if (song.songId === data.songId) {
 								this.playlists[index].songs.splice(index2, 1);
 							}
 						});