Commit aab34617 authored by Henrik Hüttemann's avatar Henrik Hüttemann 🤔

Add notifications for downloads

parent 4c74728b
Pipeline #743 passed with stage
in 46 seconds
......@@ -256,7 +256,13 @@ export default {
console.log(
'getRelease',
dl
)
)
if (
Notification.permission !== 'granted' &&
Notification.permission !== 'denied'
) {
Notification.requestPermission()
}
axios.get(`${this.config.backend}release/${dl.releaseId}/start`)
.then(response => {
console.log(
......@@ -279,6 +285,11 @@ export default {
)
clearInterval(dl.intervalId)
if (Notification.permission === "granted") {
new Notification(`Download finished: ${dl.status}`, {
body: `${dl.artist} - ${dl.album}`
})
}
this.getSongs()
}
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment