From 9e6c4a3313992dda44c1b00df8a8339fe084ef50 Mon Sep 17 00:00:00 2001 From: Timon Ringwald Date: Wed, 3 Aug 2022 23:43:16 +0200 Subject: [PATCH] improved model --- parsed_file.go | 3 --- parsed_torrent.go | 4 +--- torrent.go | 16 ++++++++-------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/parsed_file.go b/parsed_file.go index 75aea87..bb95213 100644 --- a/parsed_file.go +++ b/parsed_file.go @@ -1,10 +1,7 @@ package model -import "git.milar.in/milarin/anilist" - type ParsedFile struct { FileName string - Anime *anilist.Media Episode int Parser *Parser } diff --git a/parsed_torrent.go b/parsed_torrent.go index 79cda21..d03a000 100644 --- a/parsed_torrent.go +++ b/parsed_torrent.go @@ -1,10 +1,8 @@ package model -import "git.milar.in/milarin/anilist" - type ParsedTorrent struct { Torrent *Torrent - Anime *anilist.Media + Name string Episode int Parser *Parser } diff --git a/torrent.go b/torrent.go index 1e0ef51..dbe2a1f 100644 --- a/torrent.go +++ b/torrent.go @@ -3,14 +3,14 @@ package model import "time" type Torrent struct { - ID TorrentID `json:"id"` - Title string `json:"title"` - Link string `json:"link"` - Time time.Time `json:"time"` - Seeders int `json:"seeders"` - Leechers int `json:"leechers"` - Downloads int `json:"downloads"` - Trusted bool `json:"trusted"` + ID TorrentID + Title string + Link string + Time time.Time + Seeders int + Leechers int + Downloads int + Trusted bool } type TorrentID string