hydrus-web icon indicating copy to clipboard operation
hydrus-web copied to clipboard

Sort order, file limit and password protection.

Open MediaMoots opened this issue 1 year ago • 8 comments

Hi!

Thanks so much for making this app, it works amazingly!

After using it for a while I found a few things that could be improved to make it even more amazing: It would be great if we could sort the files https://hydrusnetwork.github.io/hydrus/developer_api.html#get_files_search_files file_sort_type For example, sort by random so that we get different images each time.

Also, if we could customize the number of files got each time that would also be cool. (Now it gets just 96 files per scroll request)

Another feature that would be great is a simple PIN or password authentication before accessing the website when run locally (e.g., Docker) For now, I can just add a simple auth to nginx but it would be nice if it were built in.

Thanks!

MediaMoots avatar Aug 30 '22 09:08 MediaMoots

Your first two suggestions are definitely planned features. As for the idea of a pin or password for Hydrus Web, I'm not quite sure what you're asking for. Hydrus Web already requires your API key be entered to access anything. There is no reason to try to restrict access to Hydrus Web itself even when self-hosted.

floogulinc avatar Aug 30 '22 15:08 floogulinc

Hi thanks for the fast response!

The pin/password is more of a privacy thing, so like, each time or within a fixed time period the pin needs to be entered to access the site. This would be so that other people can't access the site, like how it's possible to lock apps on some phones so people don't pry.

I already setup a auth config with nginx and cookies to get a similar effect but having the auth page be in the app itself would be sweet.

Config I used: https://stackoverflow.com/questions/10718895/very-simple-authentication-using-one-time-cookie-on-nginx

MediaMoots avatar Aug 30 '22 15:08 MediaMoots

I think you misunderstand how Hydrus Web works. The Hydrus Web docker container or hydrus.app doesn't connect to your Hydrus client. Only your browser connects to your Hydrus client API. It stores the API key in the browser local storage. So there is no need to secure access to Hydrus Web itself.

If you're concerned about someone with access to the device you use Hydrus Web on, any password or pin controlling access to Hydrus Web itself provides no true security as one could still get the API key from the browser storage and directly connect to your Hydrus client API.

If you just want to casually prevent someone from just stumbling on what you have in hydrus then yeah something like what you did would work. I might consider a non-secure password lock similar to the Hydrus client for this usecase but its not high priority.

floogulinc avatar Aug 30 '22 18:08 floogulinc

Yeah you're right, this feature would only be for preventing casual access.

By the way, when are the planned features going to be implemented? Just curious.

Thanks for the help!

MediaMoots avatar Aug 31 '22 00:08 MediaMoots

56642ABB-3FEC-4790-A217-64C5B9F54668

Also, there's this issue where when using the docker version, the hash causes the ui to overflow.

MediaMoots avatar Aug 31 '22 00:08 MediaMoots

Haha. I don't test the Docker build very often. Apparently my script to grab the got branch is returning that in the GitHub Actions build.

floogulinc avatar Aug 31 '22 00:08 floogulinc

Quick update, sorting has been added on the dev branch and I think I've fixed that issue with the docker branch name in the top bar.

floogulinc avatar Oct 05 '22 14:10 floogulinc

Thank you! It works great, would it be possible to save the sort order between sessions?

MediaMoots avatar Oct 06 '22 02:10 MediaMoots