Aligns the audio rating validation with the book rating

This commit is contained in:
BinaryAlley committed 2026-09-26 17:54:54 +03:00
1 parent 7534155f0e
commit 51d7558eb3
3 files changed
+193

No files matched your search

@@ -45,6 +45,8 @@ public class AudioRating : Rating
/// </returns>
public static Result<AudioRating> Create(decimal value, decimal maxValue, Optional<AudioRatingSource> source, Optional<int> voteCount)
{
if (maxValue < 0 || value < 0)
return Errors.Metadata.RatingValueMustBePositive;
if (value > maxValue)
return Errors.Metadata.RatingValueCannotBeGreaterThanMaxValue;