model/parsed_file.go
2023-01-17 09:16:12 +01:00

39 lines
691 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,
}
}