Updated name extraction with Erai-raws change
This commit is contained in:
parent
7beae1b849
commit
6259266f04
1
cli.go
Normal file → Executable file
1
cli.go
Normal file → Executable file
@ -68,6 +68,7 @@ func (m *SubscriptionManager) Add() {
|
|||||||
var available []string
|
var available []string
|
||||||
i := 0
|
i := 0
|
||||||
for _, title := range titles {
|
for _, title := range titles {
|
||||||
|
title = strings.Split(title, " | ")[0]
|
||||||
_, exists := subMap[title]
|
_, exists := subMap[title]
|
||||||
if !exists {
|
if !exists {
|
||||||
i++
|
i++
|
||||||
|
|||||||
1
main.go
Normal file → Executable file
1
main.go
Normal file → Executable file
@ -93,6 +93,7 @@ func GetSubList(subMap *map[string]struct{}) []string {
|
|||||||
func (ani *Anime) InfoFromTitle(title string) error {
|
func (ani *Anime) InfoFromTitle(title string) error {
|
||||||
titleSplit := strings.Split(title, " ")
|
titleSplit := strings.Split(title, " ")
|
||||||
ani.Name = strings.Join(titleSplit[:len(titleSplit)-2], " ")
|
ani.Name = strings.Join(titleSplit[:len(titleSplit)-2], " ")
|
||||||
|
ani.Name = strings.Split(ani.Name, " | ")[0]
|
||||||
|
|
||||||
epInfo := strings.Split(titleSplit[len(titleSplit)-1], "v")
|
epInfo := strings.Split(titleSplit[len(titleSplit)-1], "v")
|
||||||
ep, err := strconv.Atoi(epInfo[0])
|
ep, err := strconv.Atoi(epInfo[0])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user