Fix stringer output
Trim extension before parse
This commit is contained in:
parent
5f90781b33
commit
4ce03bf6ef
3
main.go
3
main.go
@ -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
|
||||
}
|
||||
|
2
type.go
2
type.go
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user