Updated nyaa.si filename format parsing

This commit is contained in:
Kenneth Jao 2025-05-01 14:29:02 -04:00
parent 672826979c
commit 528b9ea82b

21
main.go
View File

@ -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())
// }
}