logic/file_priority.go

22 lines
451 B
Go
Raw Normal View History

2023-01-13 10:39:59 +01:00
package logic
import (
"git.milar.in/nyaanime/model"
)
type FilePriority struct {
Properties model.PropertyHolder
Priority int
PreferredProperties map[string]int
}
func NewFilePriority(props model.PropertyHolder) *FilePriority {
priority, preferredProperties := DeterminePriority(props)
return &FilePriority{
Properties: props,
Priority: priority,
PreferredProperties: preferredProperties,
}
}