Just-Some-Bots / MusicBot

:musical_note: The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)
https://just-some-bots.github.io/MusicBot/
MIT License
3.14k stars 2.36k forks source link

Ytdlp oauth2 plugin integration #2421

Closed itsTheFae closed 2 months ago

itsTheFae commented 2 months ago

Description

This PR contains a modified version of the yt-dlp OAuth2 plugin found here:
https://github.com/coletdjnz/yt-dlp-youtube-oauth2

By default, the original oauth2 plugin will be used if it is installed. This prevents conflicts between the original and the MusicBot integration, and allows folks to pick which one they want to use. However, the original will wait indefinitely for authorization which will cause MusicBot to not fully shut down if authorization is still pending. Users must manually kill the process in this case.

The integration adds a few options to control if the oauth2 feature is enabled, if it should prompt for authorization at start-up, and options to set your own API credentials should there be a need to in the future.

This seems to be working in a test environment with versions 2024.07.16 and 2024.08.06 of yt-dlp. But it could be broken with any older or newer version.

I have not verified the issue about extractor name / permissions. So getting that tested before this gets merged may be a good idea.