model/parsed_file.go

39 lines
691 B
Go
Raw Permalink Normal View History

2022-08-03 19:58:31 +02:00
package model
2022-10-08 12:46:42 +02:00
import "git.milar.in/milarin/anilist"
2022-08-03 19:58:31 +02:00
type ParsedFile struct {
2022-10-08 12:46:42 +02:00
// 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
2022-08-03 19:58:31 +02:00
}
2023-01-13 10:43:37 +01:00
func (f *ParsedFile) AnimeEpisode() AnimeEpisode {
return AnimeEpisode{
Anime: f.Anime,
2023-01-13 10:43:37 +01:00
Episode: f.Episode,
}
}