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

[Enhancement]: Random library sorting #3166

Closed
gavinorland opened this issue Jul 16, 2024 · 8 comments
Closed

[Enhancement]: Random library sorting #3166

gavinorland opened this issue Jul 16, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@gavinorland
Copy link

gavinorland commented Jul 16, 2024

Describe the Feature/Enhancement

For this issue you introduced the "Discover" feature. Thanks! I think it would still be good, though, if there was a "Randomly" option available for the library sorting menu as well (as I think Plex has, for example).

Why would this be helpful?

This would enable us to see audiobooks we haven't seen for some time, helping us to choose which to play.

Future Implementation (Screenshot)

"Randomly" option would be among the existing options shown in the screenshot.

Audiobookshelf Server Version

2.11.0

Current Implementation (Screenshot)

Sort options
@gavinorland gavinorland added the enhancement New feature or request label Jul 16, 2024
@ZLoth
Copy link

ZLoth commented Jul 21, 2024

This is something that the Plex media server even uses....

image

advplyr added a commit that referenced this issue Jul 25, 2024
- Fixed author sort and match button not showing
@advplyr advplyr added the awaiting release Issue is resolved and will be in the next release label Jul 25, 2024
@gavinorland
Copy link
Author

@advplyr Many thanks for adding this - and so quickly.

@ZLoth
Copy link

ZLoth commented Jul 26, 2024

Thank you!

Copy link

github-actions bot commented Aug 4, 2024

Fixed in v2.12.0.

@github-actions github-actions bot closed this as completed Aug 4, 2024
@github-actions github-actions bot removed the awaiting release Issue is resolved and will be in the next release label Aug 4, 2024
@gavinorland
Copy link
Author

@advplyr Just trying this out (thanks again). It seems to give two different randomised orders when "toggled", but these two never change, even on page refresh. Is that the intended functionality? I thought perhaps it might randomise the view every time that option is selected.

@advplyr
Copy link
Owner

advplyr commented Aug 6, 2024

All of the library API requests are cached for 30 minutes.

The caching system setup right now is very basic. The cache gets cleared if any of the items are updated. This will be improved eventually to only clear what is necessary.

That specific request could probably be setup to skip the cache.

@advplyr
Copy link
Owner

advplyr commented Aug 6, 2024

I was wrong about the cache. The 30 minute cache is only applied to the home page shelves. Otherwise the cache remains until something in the database changes.

I made the update so that random sort skips the cache. That makes sense.
Here is the issue for that #3249

@gavinorland
Copy link
Author

Sounds great, thanks. btw I guess to enable this sorting in the app (as well as in the web UI) a task or issue would need raising in the other repo.

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

3 participants