model/parsed_torrent.go

33 lines
615 B
Go

package model
import (
"fmt"
"strings"
"git.milar.in/milarin/anilist"
)
type ParsedTorrent struct {
// parsed data
Anime *anilist.Media
OriginalAnimeTitle string
Episode int
Languages []string
Subtitles []string
Resolution Resolution
// meta data
Torrent *Torrent
Parser *Parser
}
func (t ParsedTorrent) String() string {
return fmt.Sprintf("title: %s | episode: %d | resolution: %s | languages: %s | subtitles: %s",
t.Anime.Title.Native,
t.Episode,
t.Resolution,
strings.Join(t.Languages, ", "),
strings.Join(t.Subtitles, ", "),
)
}