rr- / szurubooru

Image board engine, Danbooru-style.
GNU General Public License v3.0
693 stars 174 forks source link

Add tag blocklist for registered and anonymous users #613

Open Soblow opened 11 months ago

Soblow commented 11 months ago

This patchset introduces a "tag blocklist". Features:

Everything is added to a separate database table for easier management.

Fixes: #317 Replaces: #583

Soblow commented 11 months ago

Regarding tests, I provide only fixes for existing tests, as well as 2 minimal tests, because for some reason, tests are failing with nonsensical states (posts created from a previous test reappearing way later, blocklist tests executed before non-related other tests will break them...) I think this is due to bad interactions with the database, snapshots and other things but it is out of my technical knowledge and experience...

SpaghettiMonkey commented 8 months ago

Hello, I'm trying to use this fork but I can't find any UI element related to blocklists. I had to remove the "THREADS" line from the docker-compose.yml file, is this the reason this feature doesn't work ?

Soblow commented 8 months ago

Hello, I'm trying to use this fork but I can't find any UI element related to blocklists. I had to remove the "THREADS" line from the docker-compose.yml file, is this the reason this feature doesn't work ?

Hi! The blocklist should be located on a user profile directly. You can also access instance-wide settings in the config file.

Also, did you properly build the containers? Default docker compose pulls official images, but to test the features you gotta build containers from the repo

SpaghettiMonkey commented 7 months ago

Hi! The blocklist should be located on a user profile directly. You can also access instance-wide settings in the config file.

Also, did you properly build the containers? Default docker compose pulls official images, but to test the features you gotta build containers from the repo

I don't think I did that, but I don't know how to build from a pull request. How am I supposed to do that ?

Soblow commented 7 months ago

I don't think I did that, but I don't know how to build from a pull request. How am I supposed to do that ?

The same way as you'd do for main Szurubooru repo, but instead you use the repo and branch from which this PR takes the changes. You clone our repo, switch to the PR branch, and proceed to build the docker from here (see /doc/INSTALL.md file, "Building" section) .

SpaghettiMonkey commented 7 months ago

I don't think I did that, but I don't know how to build from a pull request. How am I supposed to do that ?

The same way as you'd do for main Szurubooru repo, but instead you use the repo and branch from which this PR takes the changes. You clone our repo, switch to the PR branch, and proceed to build the docker from here (see /doc/INSTALL.md file, "Building" section) .

Sorry, didn't see that. I do however have another problem now. When building, I keep getting this error : "Could not build wheels for pillow-avif-plugin which use PEP 517 and cannot be installed directly".

Lugrim commented 7 months ago

Sorry, didn't see that. I do however have another problem now. When building, I keep getting this error : "Could not build wheels for pillow-avif-plugin which use PEP 517 and cannot be installed directly".

Yes, this was a problem with the dockers used to build. It was fixed on master branch. I just rebased, it should be fixed now.

SpaghettiMonkey commented 7 months ago

Yes, this was a problem with the dockers used to build. It was fixed on master branch. I just rebased, it should be fixed now.

Thanks, I could make it work ! Had to remove that "THREAD" thing in the yaml though, but again, thank you guys for your work.

WawaCallMePepe commented 4 months ago

can i ask how soon this will be pushed to master branch, so my docker container could update?

bakedhorse commented 4 months ago

can i ask how soon this will be pushed to master branch, so my docker container could update?

@WawaCallMePepe Updates/merges for szurubooru are pretty... slow. The maintainers are very busy. So for the moment, it's just best to fork the project and merge any PRs into your fork. Along with using build instead of the image, which allows you to change the theme/colors of szurubooru as well. Only downside is having to maintain your own fork.

WawaCallMePepe commented 1 week ago

is there any way to blacklist tag categories?

i would like to add category:something to default_tag_blocklist in config.yaml to wipe all images in specified category (or in user settings in webUI)

any help or suggestions would be greatly appreciated