Kraigie / nostrum

Elixir Discord Library
https://kraigie.github.io/nostrum/
MIT License
589 stars 125 forks source link

Check for youtube-dl version on application startup #591

Closed jb3 closed 1 month ago

jb3 commented 1 month ago

Recent updates to YouTube break old versions of youtube-dl, including the last released version from 2021.

We add a startup check to attempt to fetch the version using the youtube-dl command line if the configured youtube-dl path contains youtube-dl (to avoid running this check for yt-dlp).

The warning advises the user to switch to a maintained fork and outputs the located youtube-dl binary and the path it is at.

To give the user flexibility, this warning can be disabled using another configuration key which will suppress the check from running.

jchristgit commented 1 month ago

This works, but do we want it? There are other platforms that do not run non-free JavaScript and allow even older youtube-dl versions to access it.

jb3 commented 1 month ago

This works, but do we want it? There are other platforms that do not run non-free JavaScript and allow even older youtube-dl versions to access it.

I agree with you, but given that I'd guess at least 90% of the requests will be for YouTube, and I hit this roadblock just the other day personally, I do not think there is harm in adding a warning, especially as it can be easily dismissed.

jb3 commented 1 month ago

[!NOTE]
I've pushed my work here for reference, but Brandt is going to look over the executable checks anyway and refactor them, including this check in there. I'll close this PR with the goal of it being superseded by that future PR.

jchristgit commented 1 month ago

[!NOTE]
Your comment has been received by the nostrum committee and will be forwarded to Betty for detailed inspection. Please remain seated in your nostrum programming chair until the review has completed.