Skip to content

Add Proof-of-origin token provider#53

Open
PGgamer2 wants to merge 3 commits into
arif-banai:masterfrom
PGgamer2:master
Open

Add Proof-of-origin token provider#53
PGgamer2 wants to merge 3 commits into
arif-banai:masterfrom
PGgamer2:master

Conversation

@PGgamer2

@PGgamer2 PGgamer2 commented Mar 11, 2026

Copy link
Copy Markdown

This pull request...

  • Fixes a bug
  • Introduces a new feature
  • Improves an existing feature
  • Boosts code quality or performance

Description

Adds the generatePOT option (disabled by default) for automatic POT generation through bgutil-ytdlp-pot-provider-rs.
See the yt-dlp wiki for more information regarding PO tokens.

Purpose

Can be used as fallback/replacement for OAuth when having issues with 403 errors.

Relevant Issue(s)

This PR closes issue #49

PGgamer2 and others added 2 commits March 11, 2026 16:00
@arif-banai

arif-banai commented Mar 18, 2026

Copy link
Copy Markdown
Owner

Interesting, have you tested this and verified that it works?

AKA: can this play from YT when hosted from a typical cloud provider/VPS?

How do we setup bgutils?

Is it possible to package bgutils into the final jar as part of build/package step in maven (by defining a dependency in the pom.xml)?

@arif-banai arif-banai self-requested a review March 18, 2026 19:23
@codecov

codecov Bot commented Mar 18, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
232 2 230 0
View the top 2 failed test(s) by shortest run time
OAuth Flow Integration Tests::oauthFlowNotTriggeredWhenUseOauthIsFalse
Stack Traces | 0.006s run time
com.jagrosh.jmusicbot.audio.AudioSource.setupYoutubeAudioSourceManager(boolean,int)
OAuth Flow Integration Tests::oauthFlowTriggeredWhenUseOauthIsTrue
Stack Traces | 0.013s run time
com.jagrosh.jmusicbot.audio.AudioSource.setupYoutubeAudioSourceManager(boolean,int)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@PGgamer2

Copy link
Copy Markdown
Author

Interesting, have you tested this and verified that it works?

AKA: can this play from YT when hosted from a typical cloud provider/VPS?

How do we setup bgutils?

Is it possible to package bgutils into the final jar as part of build/package step in maven (by defining a dependency in the pom.xml)?

Firstly, nope, I don't really have a reliable way to check if it works since I don't have access to a VPS, so further testing is needed.

To setup the pot provider, just go to the releases tab in bgutil-ytdlp-pot-provider-rs, download the .dll/.so/.dylib file (use the one matching your os and architecture) and place it next to the JMusicBot jar file (or, generally, in your working directory), then enable the generatePOT option in the config file. After playing any song and thus reloading the visitor data, a message should pop up displaying the PoToken.

Lastly, the library is in another language (Rust, which is a compiled language and therefore platform-dependent), so if it were to be shipped with the .jar the code would have to extract only the right file for that specific platform, which alone weighs about 43MB. The most feasible solutions are either to have the user download the library manually, or to automatically download it directly from GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants