PropertyHolder implemented
This commit is contained in:
parent
9959e68157
commit
87208e95e7
@ -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
|
||||
}
|
||||
|
7
property_holder.go
Normal file
7
property_holder.go
Normal file
@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
type PropertyHolder interface {
|
||||
GetLanguages() []string
|
||||
GetSubtitles() []string
|
||||
GetResolution() Resolution
|
||||
}
|
Loading…
Reference in New Issue
Block a user