mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #10228] Replaced some magic values used in property attributes [MaxLength] and [StringLength] in data entities
#12388
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/jellyfin/jellyfin/pull/10228
State: closed
Merged: No
Changes
The length of strings in many data entities is constrained by
[MaxLength]and[StringLength]attributes, which are passed a numeric value. However, these constraints come without an explanation. In this pull request, those values that could be neatly represented by theMaxValueconstants of numeric value types were changed accordingly. Presumably, these values of these constraints mean something, and this is a first step towards making the code more self-documenting. I envision that, in the future, it will all be named constants.