Skip to content

Commit

Permalink
Avoid logging an error when a player cache entry does not exist (Free…
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue authored and SudharakaP committed Jan 28, 2025
1 parent 696e0c6 commit 312b1f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,12 @@ function runApp() {

return contents.buffer
} catch (e) {
console.error(e)
// Don't log the error if the file doesn't exist as we'll just fetch it from YouTube
// this usually happens when YouTube updates their player JavaScript
if (e.code !== 'ENOENT') {
console.error(e)
}

return undefined
}
})
Expand Down

0 comments on commit 312b1f4

Please sign in to comment.