Bladeren bron

Small commit.

KrisVos130 8 jaren geleden
bovenliggende
commit
ac8b3c961e
2 gewijzigde bestanden met toevoegingen van 17 en 1 verwijderingen
  1. 5 0
      frontend/components/Modals/AddSongToQueue.vue
  2. 12 1
      frontend/components/Modals/Playlists/Edit.vue

+ 5 - 0
frontend/components/Modals/AddSongToQueue.vue

@@ -77,6 +77,11 @@
 					query.pop();
 					query = query.join('');
 				}
+				if (query.indexOf('&list=') !== -1) {
+					query = query.split('&list=');
+					query.pop();
+					query = query.join('');
+				}
 				_this.socket.emit('apis.searchYoutube', query, results => {
 					results = results.data;
 					_this.queryResults = [];

+ 12 - 1
frontend/components/Modals/Playlists/Edit.vue

@@ -90,7 +90,18 @@
 		methods: {
 			searchForSongs: function () {
 				let _this = this;
-				_this.socket.emit('apis.searchYoutube', _this.songQuery, res => {
+				let query = _this.songQuery;
+				if (query.indexOf('&index=') !== -1) {
+					query = query.split('&index=');
+					query.pop();
+					query = query.join('');
+				}
+				if (query.indexOf('&list=') !== -1) {
+					query = query.split('&list=');
+					query.pop();
+					query = query.join('');
+				}
+				_this.socket.emit('apis.searchYoutube', query, res => {
 					if (res.status == 'success') {
 						_this.songQueryResults = [];
 						for (let i = 0; i < res.data.items.length; i++) {