ParsedFile improved

This commit is contained in:
Timon Ringwald 2022-10-08 12:46:42 +02:00
parent 2504dcc85f
commit 466e1111dd
3 changed files with 30 additions and 6 deletions

2
go.mod
View File

@ -2,4 +2,4 @@ module git.milar.in/nyaanime/model
go 1.18 go 1.18
require git.milar.in/milarin/anilist v1.4.1 require git.milar.in/milarin/anilist v1.5.0

4
go.sum
View File

@ -1,2 +1,2 @@
git.milar.in/milarin/anilist v1.4.1 h1:XxpKZ3CZiwKf7tUW2z+OMktWt/fLKMd8xAGPr+eodQE= git.milar.in/milarin/anilist v1.5.0 h1:fSiAXY/topNk4ISEp2QtcG9HHKLJfMc8w05iqc+Paf0=
git.milar.in/milarin/anilist v1.4.1/go.mod h1:8PTHXFMA45JpfRFIpcdrKwDHue8fbT/wwV1BuHFn6c0= git.milar.in/milarin/anilist v1.5.0/go.mod h1:8PTHXFMA45JpfRFIpcdrKwDHue8fbT/wwV1BuHFn6c0=

View File

@ -1,7 +1,31 @@
package model package model
import "git.milar.in/milarin/anilist"
type ParsedFile struct { type ParsedFile struct {
FileName string // parsed data
Episode int Anime *anilist.Media
Parser *Parser 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
} }