FanvidDB / fanviddb-server

Server of the fanviddb
Other
0 stars 1 forks source link

Validate audio language field #37

Closed sandalwoodbox closed 3 years ago

sandalwoodbox commented 3 years ago

We need to have server-side validation of audio language, because pydantic likes to throw errors for invalid server output (which is... fine. We could work around it by making response models not do validation to the same extent as request models... but also, we do want server data to be valid.)

So if we implement this validation later, we'll have to do data cleanup, which would potentially be annoying.

sandalwoodbox commented 3 years ago

Potentially this should be more based around whether it could be a valid language code rather than by whether it's in a specific list - that way, we can provide an "other" option on the frontend and allow arbitrary languages, which reduces the risk of not supporting a language by accident.

sandalwoodbox commented 3 years ago

Audio language shouldn't be required; instrumental tracks don't have an audio language. We should instead have this be a json field that allows 0+ language strings.