Documentation ¶
Index ¶
Constants ¶
View Source
const FingerprintSep = '|'
Variables ¶
View Source
var Movie = Class{ Name: "movie", Constraints: map[string]*regexp.Regexp{ "title": regexp.MustCompile(`\w+`), "director": regexp.MustCompile(`\w+`), "year": regexp.MustCompile(`\d{4}`), "duration": regexp.MustCompile(`[\d:]+`), }, Minimum: map[string]int{ "title": 1, "year": 1, }, IndexBy: []string{ "title", }, Path: func(m map[string][]string) string { return fmt.Sprintf("%s (%s)", m["title"], m["year"]) }, Fingerprint: []string{ "title", "director", "year", }, }
View Source
var Music = Class{ Name: "music", Constraints: map[string]*regexp.Regexp{ "title": regexp.MustCompile(`\w+`), "artist": regexp.MustCompile(`\w+`), "album": regexp.MustCompile(`\w+`), "albumartist": regexp.MustCompile(`\w+`), "genre": regexp.MustCompile(`\w+`), "mood": regexp.MustCompile(`\w+`), "number": regexp.MustCompile(`\d+`), "duration": regexp.MustCompile(`\d+`), }, Minimum: map[string]int{ "title": 1, "artist": 1, }, IndexBy: []string{ "title", "artist", "albumartist", }, Path: func(m map[string][]string) string { aslice := m["albumartist"] if len(aslice) < 1 { aslice = m["artist"] } aa := aslice[0] if len(m["album"]) < 1 { return fmt.Sprintf("%s/%s", aa, m["title"][0]) } return fmt.Sprintf("%s/%s/%s", aa, m["album"][0], m["title"][0]) }, Fingerprint: []string{ "artist", "title", }, }
View Source
var TV = Class{ Name: "tv", Constraints: map[string]*regexp.Regexp{ "title": regexp.MustCompile(`\w+`), "show": regexp.MustCompile(`\w+`), "director": regexp.MustCompile(`\w+`), "season": regexp.MustCompile(`\d+`), "number": regexp.MustCompile(`\d+`), "year": regexp.MustCompile(`\d{4}`), "duration": regexp.MustCompile(`[\d:]+`), }, Minimum: map[string]int{ "show": 1, "season": 1, "number": 1, }, IndexBy: []string{ "show", }, Path: func(m map[string][]string) string { return fmt.Sprintf("%s (%s)", m["title"], m["year"]) }, Fingerprint: []string{ "show", "season", "number", }, }
Functions ¶
Types ¶
type Blob2IdeaAdapter ¶
type Blob2ReprAdapter ¶
type ErrNotEnoughInfo ¶
func (*ErrNotEnoughInfo) Error ¶
func (err *ErrNotEnoughInfo) Error() string
type Fingerprint ¶
type Fingerprint string
type Idea ¶
type Idea struct {
// contains filtered or unexported fields
}
func (*Idea) Fingerprint ¶
func (idea *Idea) Fingerprint() Fingerprint
func (*Idea) MarshalJSON ¶
func (*Idea) UnmarshalJSON ¶
type Repr ¶
type Repr struct { Idea blobs.ID Container string AudioInfo *AudioInfo `"json:omitempty"` VideoInfo *VideoInfo `"json:omitempty"` Tags []Tag Chunks []Chunk }
func (*Repr) QualityString ¶
type Resolution ¶
func (*Resolution) String ¶
func (r *Resolution) String() string
type VideoInfo ¶
type VideoInfo struct {
Resolution Resolution
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.