diff --git a/parsed_torrent.go b/parsed_torrent.go index bad5e02..6966a0b 100644 --- a/parsed_torrent.go +++ b/parsed_torrent.go @@ -21,6 +21,8 @@ type ParsedTorrent struct { Parser *Parser } +var _ PropertyHolder = &ParsedTorrent{} + func (t ParsedTorrent) String() string { return fmt.Sprintf("title: %s | episode: %d | resolution: %s | languages: %s | subtitles: %s | %s", t.Anime.Title.Native, @@ -31,3 +33,15 @@ func (t ParsedTorrent) String() string { t.Torrent.StringWithoutTitle(), ) } + +func (t *ParsedTorrent) GetLanguages() []string { + return t.Languages +} + +func (t *ParsedTorrent) GetSubtitles() []string { + return t.Subtitles +} + +func (t *ParsedTorrent) GetResolution() Resolution { + return t.Resolution +} diff --git a/property_holder.go b/property_holder.go new file mode 100644 index 0000000..9d83713 --- /dev/null +++ b/property_holder.go @@ -0,0 +1,7 @@ +package model + +type PropertyHolder interface { + GetLanguages() []string + GetSubtitles() []string + GetResolution() Resolution +}