-
Notifications
You must be signed in to change notification settings - Fork 42
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
Allow streaming from other yt-dlp supported sources #209
Comments
Asking for your input @joao-conde and @afonsojramos as to what would be the best approach for distinguishing a YouTube query from a valid YouTube link. |
Not just valid youtube link, but all other links from https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md right? Additionally, we could have blacklisted sites, like p**rnhub, or allow that to be set on a per guild basis, using our guild settings |
@joao-conde I've got an implementation in the works, it's just missing the blacklist. How would you add this? Would mods have to add every single 18+ website manually? There are a lot of supported websites, would be a chore. |
Better to have some control than none. Mods would do something of an includes logic, like "/block porn" would block sites with porn in the name. "/block actuallydomain.com" would block URLs with that. |
Easiest solution to implement would be have a switch to toggle default behavior (allow/block all) and then mods provide overrides for each domain. It goes without saying that any command specific solution would depend on #124 , unless we just want to say whoever sets up the bot gets to decide and slap it into an env var. |
Nah we need the settings. I am un-assigning myself, can't finish it. Feel free to @StaticRocket or @aquelemiguel |
@StaticRocket @joao-conde I'm experimenting with the new modals feature for this allow/block domains config. Opinions? I think it looks neat and cuts down on the # of commands we'd need otherwise. |
@aquelemiguel , the only concern I have is if the default behavior should be an allow list or a block list. I see one being useful for keeping things under lock and key but for those running the bot on a trusted server it may be tedious to allow almost all domains one by one. |
I think it should be a black list approach, by default allow all. The modal looks good to me. |
@StaticRocket @joao-conde Taking both your inputs into account, please feedback on this approach where we'd add two required fields to the modal - an allow list and a block list:
Is this implementation confusing? Am I overlooking any nasty edge cases? |
I'd say that's the fairest implementation of this feature. I do believe that in the case that if neither have a wildcard, you assume the default behaviour. Question about the modals:
|
@aquelemiguel I was suggesting the exact opposite, and so was @StaticRocket I think.
|
@joao-conde Initially, I was also supporting that approach, however, I do see the value for large servers to work on an AllowList. |
Yes, it reads from and writes to the GuildSettings, so if you were to block a domain, I would see it upon opening the modal.
Definitely, that's what I suggested! |
@joao-conde yt-dlp supports too many supported 18+ domains, it'd be hell for some servers to manually block all (and having to periodically check for new undesired domains). However simultaneously, some other servers may want to allow most. I think that was the point @StaticRocket was making and what prompted my approach. |
Agreed, go with 2 lists for allowed and unallowed |
Right, that and the general extractor they have can apply to domains that aren't necessarily listed on yt-dlp's compatibility page. An allow list approach becomes tedious with that. I run a server with a bunch of impatient goofs that'll pitch a fit if they can't blast a random meme across voice chat from god-knows-where. |
📝 Description
yt-dlp allows for streaming from multiple other sources other than YouTube. A lot more actually.
In the play command, we check the query/url in this fashion:
There are a few issues with this approach:
🪜 Reproduction Steps
N/A
ℹ Environment / Computer Info
v1.4.2
📸 Screenshots
No response
The text was updated successfully, but these errors were encountered: