model/parsed_torrent.go
2022-08-21 14:38:44 +02:00

34 lines
633 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 | %s",
t.Anime.Title.Native,
t.Episode,
t.Resolution,
strings.Join(t.Languages, ", "),
strings.Join(t.Subtitles, ", "),
t.Torrent,
)
}