import { fetchData } from '@/utils/api' /** * @param {string} url * @param {number|null} bitrate */ export function sendAddToQueue(url, bitrate = null) { if (!url) throw new Error('No URL given to sendAddToQueue function!') fetchData('addToQueue', { url, bitrate }, 'POST') } export function aggregateDownloadLinks(releases) { const links = [] releases.forEach(release => { links.push(release.link) }) return links.join(';') }