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{
|
2023-01-17 09:16:12 +01:00
|
|
|
Anime: f.Anime,
|
2023-01-13 10:43:37 +01:00
|
|
|
Episode: f.Episode,
|
|
|
|
}
|
|
|
|
}
|