diff --git a/public/index.html b/public/index.html
index c5f3ac7..06fec72 100644
--- a/public/index.html
+++ b/public/index.html
@@ -436,7 +436,7 @@
{{ metadata }}{{ rele
{{ label }}
diff --git a/public/js/app/app.js b/public/js/app/app.js
index 9635263..69d3eb7 100644
--- a/public/js/app/app.js
+++ b/public/js/app/app.js
@@ -221,13 +221,6 @@ function openQualityModal(link){
function modalQualityButton(bitrate){
var url=$(modalQuality).data("url")
- if (url.indexOf(";") != -1){
- urls = url.split(";")
- urls.forEach(url=>{
- sendAddToQueue(url, bitrate)
- })
- }else{
- sendAddToQueue(url, bitrate)
- }
+ sendAddToQueue(url, bitrate)
$(modalQuality).addClass('animated fadeOut')
}
diff --git a/public/js/app/search.js b/public/js/app/search.js
index 4058a82..de054a8 100644
--- a/public/js/app/search.js
+++ b/public/js/app/search.js
@@ -53,7 +53,14 @@ function clickElement(button) {
}
function sendAddToQueue(url, bitrate = null) {
- socket.emit('addToQueue', { url: url, bitrate: bitrate })
+ if (url.indexOf(";") != -1){
+ urls = url.split(";")
+ urls.forEach(url=>{
+ socket.emit('addToQueue', { url: url, bitrate: bitrate })
+ })
+ }else{
+ socket.emit('addToQueue', { url: url, bitrate: bitrate })
+ }
}
let MainSearch = new Vue({
@@ -173,7 +180,7 @@ $("#searchbar").keyup(function(e){
}
}else{
console.log( term );
-
+
if (term != MainSearch.results.QUERY || main_selected == 'search_tab'){
document.getElementById("search_tab_content").style.display = "none";
socket.emit("mainSearch", {term: term});
diff --git a/public/js/app/stackedTabs.js b/public/js/app/stackedTabs.js
index 974a3ea..13359ab 100644
--- a/public/js/app/stackedTabs.js
+++ b/public/js/app/stackedTabs.js
@@ -69,11 +69,20 @@ var tracklistTab = new Vue({
addToQueue: function(e){e.stopPropagation(); sendAddToQueue(e.currentTarget.dataset.link)},
openQualityModal: function(e){e.preventDefault(); openQualityModal(e.currentTarget.dataset.link)},
toggleAll: function(e){
- tracklistTab.body.forEach((item) => {
+ this.body.forEach((item) => {
if (item.type == 'track'){
item.selected = e.currentTarget.checked
}
});
+ },
+ selectedLinks: function(){
+ selected = []
+ if (this.body){
+ this.body.forEach((item) => {
+ if (item.type == 'track' && item.selected) selected.push(item.link)
+ })
+ }
+ return selected.join(";")
}
}
})