From 01fbf22e907a8588519cc90742c13dff6584b556 Mon Sep 17 00:00:00 2001 From: lordwelch Date: Wed, 27 Sep 2017 14:17:58 -0600 Subject: [PATCH] refactor --- main.go | 6 +++--- type.go | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/main.go b/main.go index 2743e2d..5e33325 100644 --- a/main.go +++ b/main.go @@ -49,10 +49,10 @@ func main() { } } -func process(torrentFile string) *MediaTorrent { +func process(torrentFile string) *SceneVideoTorrent { var ( - mt *MetaTorrent = new(MetaTorrent) - vt *MediaTorrent = new(MediaTorrent) + mt *MetaTorrent = new(MetaTorrent) + vt *SceneVideoTorrent = new(SceneVideoTorrent) ) f, _ := os.OpenFile(torrentFile, os.O_RDONLY, 755) mt.ReadFile(f) diff --git a/type.go b/type.go index 8798a6a..4f1389b 100644 --- a/type.go +++ b/type.go @@ -33,19 +33,15 @@ type Torrent struct { Size int64 } -type MediaTorrent struct { +type SceneVideoTorrent struct { Torrent Scene.Scene } -type EpisodeTorrent []MediaTorrent +type EpisodeTorrent []SceneVideoTorrent type SeriesTorrent []EpisodeTorrent -type SeriesInterface interface { - Title() string -} - func NewTorrent(mt MetaTorrent) (T Torrent) { if mt.Info.Length == 0 { for i, path := range mt.Info.Files {