Fix stringer output

Trim extension before parse
This commit is contained in:
lordwelch 2017-11-30 21:24:50 -07:00
parent 5f90781b33
commit 4ce03bf6ef
2 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import (
"fmt"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
@ -66,7 +67,7 @@ func process(torrentFile string) *SceneVideoTorrent {
fmt.Println("Read: ", err)
fmt.Printf("%+v\n", mt)
vt.Torrent = NewTorrent(*mt)
vt.Parse(vt.Name)
vt.Parse(strings.TrimSuffix(vt.Name, path.Ext(vt.Name)))
fmt.Printf("%v\n", *vt)
return vt
}

View File

@ -71,7 +71,7 @@ func (Mt *MetaTorrent) ReadFile(r io.Reader) error {
}
func (Vt SceneVideoTorrent) String() string {
return fmt.Sprint("Original: ", Vt.Original, "\nName: ", Vt.Name, "\nEpisode: ", Vt.Season, Vt.Episode, "\nTags: ", Vt.Tags)
return fmt.Sprint("Original: ", Vt.Original, "\nName: ", Vt.Title, "\nEpisode: S", Vt.Season, "E", Vt.Episode, "\nTags: ", Vt.Tags)
}
func (s SeriesTorrent) Title() string {