Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement YouTube OAuth2 login #1670

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Catch potential exceptions thrown by the useOAuth2 call
  • Loading branch information
MichailiK committed Aug 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 4a8392fdb9a18ff2a69941a4f80e000a5f0b005c
9 changes: 8 additions & 1 deletion src/main/java/com/jagrosh/jmusicbot/audio/PlayerManager.java
Original file line number Diff line number Diff line change
@@ -76,7 +76,14 @@ public void init()
LOGGER.warn("Failed to read YouTube OAuth2 token file: {}",e.getMessage());
}
LOGGER.debug("Using YouTube OAuth2 refresh token {}", token);
yt.useOauth2(token, false);
try
{
yt.useOauth2(token, false);
}
catch (Exception e)
{
LOGGER.warn("Failed to authorize with YouTube. If this issue persists, delete the youtubetoken.txt file to reauthorize.", e);
}
}
registerSourceManager(yt);

Loading