mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 11:39:46 +08:00
feat: file size limiter
This commit is contained in:
@@ -29,6 +29,7 @@ func (Media) Fields() []ent.Field {
|
||||
field.Int("storage_id").Optional(),
|
||||
field.String("target_dir").Optional(),
|
||||
field.Bool("download_history_episodes").Optional().Default(false).Comment("tv series only"),
|
||||
field.JSON("limiter", &MediaLimiter{}).Optional(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,3 +39,8 @@ func (Media) Edges() []ent.Edge {
|
||||
edge.To("episodes", Episode.Type),
|
||||
}
|
||||
}
|
||||
|
||||
type MediaLimiter struct {
|
||||
SizeMin int `json:"size_min"`
|
||||
SizeMax int `json:"size_max"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user