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

Have queryResolver be handled by extractors #1969

Open
iTsMaaT opened this issue Jan 22, 2025 · 0 comments
Open

Have queryResolver be handled by extractors #1969

iTsMaaT opened this issue Jan 22, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@iTsMaaT
Copy link
Contributor

iTsMaaT commented Jan 22, 2025

Describe the feature you would like

This was already an idea that twilight siggested, but I wanted to make this suggestion to maybe give a idea of how it could work.

It would be a breaking change, but my idea is that validate would be able to return 4 values, "search", "track", "playlist" or null. If not null, validate is successful. For queryResolver, it would call all extractor's validate method, and for the one that doesnt return null, it would know what extractor can handle the query, and the type of said query, so QueryResolver could return the identifier of the successful extractor, and the type (example: { ext: "com.discord-player.soundcloud", type: "search" }), so it could be better used in code to know what a query is supposed to be before playing it.

Expected behavior

Screenshots

Additional context

@iTsMaaT iTsMaaT added the enhancement New feature or request label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant