feat: adjust indexer priority to the same as prowlarr

This commit is contained in:
Simon Ding
2025-04-23 16:24:20 +08:00
parent 2267b0450a
commit 8b11e72427
11 changed files with 62 additions and 5 deletions

View File

@@ -95,6 +95,8 @@ func init() {
indexersDescPriority := indexersFields[4].Descriptor()
// indexers.DefaultPriority holds the default value on creation for the priority field.
indexers.DefaultPriority = indexersDescPriority.Default.(int)
// indexers.PriorityValidator is a validator for the "priority" field. It is called by the builders before save.
indexers.PriorityValidator = indexersDescPriority.Validators[0].(func(int) error)
// indexersDescSeedRatio is the schema descriptor for seed_ratio field.
indexersDescSeedRatio := indexersFields[5].Descriptor()
// indexers.DefaultSeedRatio holds the default value on creation for the seed_ratio field.