From 528b9ea82b2b5c820876078e6b3f090929e6b4bc Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Thu, 1 May 2025 14:29:02 -0400 Subject: [PATCH] Updated nyaa.si filename format parsing --- main.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/main.go b/main.go index be6bee1..9a7a94a 100755 --- a/main.go +++ b/main.go @@ -229,7 +229,7 @@ func GetAllAvailable(name string, onlyHEVC bool) ([]Anime, error) { return }*/ - isHEVC := strings.Contains(title, "[HEVC]") + isHEVC := strings.Contains(title, "HEVC") if onlyHEVC && !isHEVC { return } @@ -240,16 +240,17 @@ func GetAllAvailable(name string, onlyHEVC bool) ([]Anime, error) { } else if strings.Contains(title, "(Repack)") { title = strings.Split(title, " (Repack)")[0] } else { - is720 := strings.Contains(title, "[720p]") - is1080 := strings.Contains(title, "[1080p]") + title = strings.Split(title, " [")[0] + // is720 := strings.Contains(title, "[720p]") + // is1080 := strings.Contains(title, "[1080p]") - if is720 { - title = strings.Split(title, " [720p]")[0] - } else if is1080 { - title = strings.Split(title, " [1080p]")[0] - } else { - e.Log(fmt.Sprintf("Episode not found, or processed incorrectly. Got: %s.", title), LogNTFY()) - } + // if is720 { + // title = strings.Split(title, " [720p]")[0] + // } else if is1080 { + // title = strings.Split(title, " [1080p]")[0] + // } else { + // e.Log(fmt.Sprintf("Episode not found, or processed incorrectly. Got: %s.", title), LogNTFY()) + // } }