This commit is contained in:
lordwelch 2017-09-27 14:17:58 -06:00
parent 678d618ffa
commit 01fbf22e90
2 changed files with 5 additions and 9 deletions

View File

@ -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)

View File

@ -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 {