model/parsed_file.go

39 lines
692 B
Go

package model
import "git.milar.in/milarin/anilist"
type ParsedFile struct {
// parsed data
Anime *anilist.Media
OriginalAnimeTitle string
Episode int
Languages []string
Subtitles []string
Resolution Resolution
// meta data
File string
Parser *Parser
}
var _ PropertyHolder = &ParsedFile{}
func (f *ParsedFile) GetLanguages() []string {
return f.Languages
}
func (f *ParsedFile) GetSubtitles() []string {
return f.Subtitles
}
func (f *ParsedFile) GetResolution() Resolution {
return f.Resolution
}
func (f *ParsedFile) AnimeEpisode() AnimeEpisode {
return AnimeEpisode{
Anime: *f.Anime,
Episode: f.Episode,
}
}