add file size

This commit is contained in:
Simon Ding
2024-07-15 15:46:02 +08:00
parent f0b334ebcd
commit 688e51dbb1
10 changed files with 253 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ package ent
import (
"polaris/ent/downloadclients"
"polaris/ent/history"
"polaris/ent/indexers"
"polaris/ent/schema"
"polaris/ent/series"
@@ -47,6 +48,12 @@ func init() {
downloadclients.DefaultTags = downloadclientsDescTags.Default.(string)
episodeFields := schema.Episode{}.Fields()
_ = episodeFields
historyFields := schema.History{}.Fields()
_ = historyFields
// historyDescSize is the schema descriptor for size field.
historyDescSize := historyFields[5].Descriptor()
// history.DefaultSize holds the default value on creation for the size field.
history.DefaultSize = historyDescSize.Default.(int)
indexersFields := schema.Indexers{}.Fields()
_ = indexersFields
// indexersDescEnableRss is the schema descriptor for enable_rss field.