34 lines
633 B
Go
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,
|
|
)
|
|
}
|