ShokoAnime / ShokoServer

Repository for Shoko Server.
http://shokoanime.com/shoko-server/
MIT License
386 stars 75 forks source link

refactor: update tags #1026

Closed revam closed 1 year ago

revam commented 1 year ago

This commit/PR changes some of the data we store about tags, update how we handle tag renaming and exposes some new data in the api. I've tested that it works with a SQLite database, but have not tried for MySQL or SQL Server.

Changes in this PR

da3dsoul commented 1 year ago

Ok, after those two changes, looks good

revam commented 1 year ago

Also updated the tests and added back some of the custom behavior that I broke.

revam commented 1 year ago

Fixed the tests (again) and ensured we always have lower case letters

Is this ready for merge now? @da3dsoul

da3dsoul commented 1 year ago

Do we want lowercase tag names?

revam commented 1 year ago

I made it so it ensures the tag name is always lower case because the tag filter expects the values to be lower case (as indicated by the hash sets. Alternatively I can change it so it changes it to lower case the value right before it's used in the tag filter. Actually, I'll do that instead. I'll also tweak the tests to test that it does not matter if the input tags names are upper cased, lower cased or a mix of the two.

da3dsoul commented 1 year ago

I'll review it again later. I had adjusted the case stuff intentionally to improve the speed. I'll also add unit tests to take casing into account

da3dsoul commented 1 year ago

Ok, looks good