model/parsed_torrent.go

33 lines
615 B
Go
Raw Normal View History

2022-08-03 19:58:31 +02:00
package model
import (
"fmt"
"strings"
"git.milar.in/milarin/anilist"
)
2022-08-04 00:23:02 +02:00
2022-08-03 19:58:31 +02:00
type ParsedTorrent struct {
2022-08-15 11:35:49 +02:00
// parsed data
Anime *anilist.Media
OriginalAnimeTitle string
Episode int
Languages []string
Subtitles []string
Resolution Resolution
2022-08-15 11:35:49 +02:00
// meta data
Torrent *Torrent
Parser *Parser
2022-08-03 19:58:31 +02:00
}
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, ", "),
)
}