feat: download all button in Favorites page, this solves #37

This commit is contained in:
Roberto Tonino
2020-10-07 20:29:20 +02:00
parent 1646f6b0e5
commit d3e1b71faf
6 changed files with 90 additions and 21 deletions

View File

@@ -1,11 +1,21 @@
import { socket } from '@/utils/socket'
export function sendAddToQueue(url, bitrate = null) {
if (!url) return
if (!url) throw new Error('No URL given to sendAddToQueue function!')
socket.emit('addToQueue', { url, bitrate }, () => {})
}
export function aggregateDownloadLinks(releases) {
let links = []
releases.forEach(release => {
links.push(release.link)
})
return links.join(';')
}
export default {
sendAddToQueue
}