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

Search Results showing Max of 5 Results via Search #433

Closed
maiteemate opened this issue May 28, 2024 · 5 comments
Closed

Search Results showing Max of 5 Results via Search #433

maiteemate opened this issue May 28, 2024 · 5 comments

Comments

@maiteemate
Copy link

When accessing this URL: 'https://zen-audio-player.github.io/'
the web app is limited to show the Max Results of '5' results when searching for any song or video.

Is there a way to increase this via a setting or configuration file? This hugely limits what can be played with the web interface on the URL above.

Please let me know if I'm missing anything.
In any event, thank you for a very simple, and useful YT web app.

@shakeelmohamed
Copy link
Member

Hi @maiteemate!

The YouTube API defaults to a value of 5 for maxResults, so we’re just consuming their default.

It’s not ideal, but as a workaround you can search on youtube.com then copy/paste a link over.

If you’re interested in making a PR for this feature, I’m happy to guide you through it.

@RLalor
Copy link
Contributor

RLalor commented Jul 9, 2024

A PR to increase the results you mean? Do you want to change it or stick with 5? How would you like it? This seems like an easy edit

@shakeelmohamed
Copy link
Member

@RLalor I believe youtube.com fetches results in batches of 10, so a quick change is to set maxResults to 10.

A more nuanced solution would be loading multiple batches of results.
Here are some possible approaches, ranked most to least preferred (by me):

  1. A “load more” button
  2. Pagination
  3. Infinite scroll like youtube.com

Happy to discuss this further if you’re interested in working on this.

@RLalor
Copy link
Contributor

RLalor commented Jul 9, 2024

Thanks for the reply. I cloned it and if I end up playing with it and completing something I will let you know.

RLalor added a commit to RLalor/zen-audio-player.github.io that referenced this issue Jul 10, 2024
shakeelmohamed added a commit that referenced this issue Jul 10, 2024
@shakeelmohamed
Copy link
Member

@maiteemate I’m closing this for now as we can get 10 results per search now. If you want to see a different solution, please reopen and let’s continue the discussion.

Thanks to @RLalor the quick PR #436.

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

No branches or pull requests

3 participants