Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Feature Request - Sort by date #26

Open
Lopunny1 opened this issue Nov 8, 2020 · 1 comment
Open

Feature Request - Sort by date #26

Lopunny1 opened this issue Nov 8, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Lopunny1
Copy link

Lopunny1 commented Nov 8, 2020

Hi,
I was wondering if it were possible to be able to sort by date?
A lot of my files ID's aren't in order of oldest to newest, so I wanted to know if there was a way of sorting by the files modified date so it looks more like proper online booru's.

Also the random sort retains its order, even once other filters have been applied and you can't change the random order unless the server is restart. Is it possible to reshuffled the random order whilst in the web browser? Maybe even allow someone to manually change the seed?

@imtbl
Copy link
Owner

imtbl commented Nov 10, 2020

Hey,

I was wondering if it were possible to be able to sort by date?

It would certainly be possible to add. Though iirc, hydrus server doesn't store any date, so this would only be useful when pulling the data from hydrus client (and I'm generally somewhat averse to implementing features that don't work with both client and server).

Also the random sort retains its order, even once other filters have been applied and you can't change the random order unless the server is restart.

SQLite doesn't support seeding the random() function; that means it's unusable in combination with paginated results. So instead, whenever a sync runs, we insert a random integer into the random column of the files table and use that for "random" sorting. Updating that on demand would be potentially very slow (depending on the number of files) and would also cause complications with multi-user instances (as the instance would effectively be unusable during this update). So overall, that's not a feature I'd like to see added.


I am not too opposed to the first idea (sorting by date), though I also no longer add new features to hyve; it's basically in a maintenance-only state. I'll leave this open and label it with help wanted in case someone else wants to tackle it.

@imtbl imtbl added enhancement New feature or request help wanted Extra attention is needed labels Nov 10, 2020
@imtbl imtbl changed the title Feature Request - Sort by date and Sort Random Seeds Feature Request - Sort by date Nov 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants