Skip to content

Commit

Permalink
fix(player): response status when downloading a song
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed Jul 10, 2024
1 parent 2802dc2 commit 5ec2504
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/static/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,10 @@ function playebackSpeeder() {
* @param {string} songYtId
*/
async function downloadSong(songYtId) {
return await fetch("/api/song?id=" + songYtId).catch((err) =>
console.error(err),
);
return await fetch("/api/song?id=" + songYtId).catch((err) => {
console.error(err);
return { ok: false };
});
}

/**
Expand Down

0 comments on commit 5ec2504

Please sign in to comment.