2020-07-16 22:11:28 +00:00
|
|
|
import { socket } from '@/utils/socket'
|
2020-04-22 20:06:59 +00:00
|
|
|
|
2020-09-17 16:11:41 +00:00
|
|
|
export function sendAddToQueue(url, bitrate = null) {
|
2020-10-07 18:29:20 +00:00
|
|
|
if (!url) throw new Error('No URL given to sendAddToQueue function!')
|
2020-08-11 19:12:47 +00:00
|
|
|
|
|
|
|
socket.emit('addToQueue', { url, bitrate }, () => {})
|
2020-04-22 20:06:59 +00:00
|
|
|
}
|
|
|
|
|
2020-10-07 18:29:20 +00:00
|
|
|
export function aggregateDownloadLinks(releases) {
|
|
|
|
let links = []
|
|
|
|
|
|
|
|
releases.forEach(release => {
|
|
|
|
links.push(release.link)
|
|
|
|
})
|
|
|
|
|
|
|
|
return links.join(';')
|
|
|
|
}
|
|
|
|
|
2020-04-22 20:06:59 +00:00
|
|
|
export default {
|
2020-07-14 20:27:48 +00:00
|
|
|
sendAddToQueue
|
2020-04-22 20:06:59 +00:00
|
|
|
}
|