Updated name extraction with Erai-raws change

This commit is contained in:
Kenneth Jao 2024-11-09 12:32:52 +08:00
parent 7beae1b849
commit 6259266f04
2 changed files with 806 additions and 804 deletions

1
cli.go Normal file → Executable file
View File

@ -68,6 +68,7 @@ func (m *SubscriptionManager) Add() {
var available []string
i := 0
for _, title := range titles {
title = strings.Split(title, " | ")[0]
_, exists := subMap[title]
if !exists {
i++

1
main.go Normal file → Executable file
View File

@ -93,6 +93,7 @@ func GetSubList(subMap *map[string]struct{}) []string {
func (ani *Anime) InfoFromTitle(title string) error {
titleSplit := strings.Split(title, " ")
ani.Name = strings.Join(titleSplit[:len(titleSplit)-2], " ")
ani.Name = strings.Split(ani.Name, " | ")[0]
epInfo := strings.Split(titleSplit[len(titleSplit)-1], "v")
ep, err := strconv.Atoi(epInfo[0])