avoonix / material-e621

Material e621 is a modern, open source web client for e621.net. It is customizable, comes with a bunch of additional features that are not available on e621.net, and makes browsing posts a delightful experience.
https://material-e621.vercel.app
GNU Affero General Public License v3.0
54 stars 6 forks source link

[Bug]: Tag Limit of 6 when API should support up to 40 #20

Closed Temmie-Flakes closed 1 year ago

Temmie-Flakes commented 1 year ago

Expected Behavior

something like "anthro male fur tail claws clothing" would have many results but "anthro male fur tail claws clothing touching_cheek" would have roughly 3 results.

Actual Behavior

It ignores the last index of tags and only uses the first 6. And in the example of "anthro male fur tail claws clothing touching_cheek" it produces several thousand results rather then just the 3 it should.

Steps to Reproduce the Problem

type "anthro male fur tail claws clothing touching_cheek" in material search bar...... I believe createTagQuery.ts
return allTags.slice(0, 6).join(" ");
is what causes this.

I know the API used to be at a 6 tag limit on the old system but its been updated to 40 so I assume it should be
return allTags.slice(0, 40).join(" ");
or just return allTags if the API calls can work with ones longer then 40.

I don't know if this is intentional or a workaround of something else, but I'm assuming its not desired to have fewer tags then what E6 can support.

avoonix commented 1 year ago

Changed it to 40 for now, as supplying more than that causes an error.

I initially added the limit of 6 because going over that limit caused an error - this was easily achieved by adding a few blacklist tags, as I am merging the blacklist tags with the user's query.