22 lines
451 B
Go
22 lines
451 B
Go
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,
|
|
}
|
|
}
|