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

[Bug] sort_by=upload_date does not work #3734

Open
greenfoo opened this issue Apr 11, 2023 · 5 comments · May be fixed by iv-org/documentation#501
Open

[Bug] sort_by=upload_date does not work #3734

greenfoo opened this issue Apr 11, 2023 · 5 comments · May be fixed by iv-org/documentation#501
Labels
bug Something isn't working

Comments

@greenfoo
Copy link

Calling the search endpoint with sort_by=upload_date does not return the results ordered by upload date.

Examples:

I would expect (maybe I'm wrong?) for the results to be sorted according to the "published" property so that they match the order returned by this equivalent YouTube search:

But #2824 is similar, but not the same, as there is no colon in any of the parameters.

@greenfoo greenfoo added the bug Something isn't working label Apr 11, 2023
@greenfoo
Copy link
Author

I just noticed that this seems to be a more general problem with sort_by:

  • sort_by=upload_date and sort_by=view_count do not return results in the expected order.
  • sort_by=rating and sort_by=relevance might or might not work, as I don't know which returned field to check... but in any case they return results in the same order (which is also the same order returned by upload_date and view_count).

In other words... it looks like the sort_by has no effect, no matter the argument used.

Either I'm doing something wrong (quite posible!) or there is a bug or the documentation needs to be updated to remove that parameter if no longer supported. Does this make sense?

@DrSocket
Copy link

DrSocket commented Apr 17, 2023

Same issue here, sort_by: upload_date doesn't actually sort by date, but private browser window search by upload_date gives different ordered results than normal search so it seems to be a bug with invidious

update: I was looking through the code, it seems the doc is just wrong, param is just sort not sort_by and value is date and not upload_date.

Everything works. I think the issue can be closed, maybe update the doc.

@ChunkyProgrammer
Copy link
Contributor

sort=date and sort=views seem to be used instead.

@SamantazFox should the api docs be updated or should the code be updated to support both? The parameter name (sort_by => sort) and some of the values (upload_date => date, view_count => views) in the api docs don't match what is used in Invidious

Copy link

This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.

@github-actions github-actions bot added the stale label Apr 20, 2024
@ChunkyProgrammer
Copy link
Contributor

PR is still open in the docs repo so this can stay open

@github-actions github-actions bot removed the stale label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants