aboutsummaryrefslogtreecommitdiff
path: root/utils/mappers/queryfilters.go
blob: 807a36de5878de53664881e4545b04554e5e10bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package mappers

import "strings"

// SpecialAnimeIDMappings maps specific anime titles to their correct IDs
var SpecialAnimeIDMappings = map[string]string{
	"one piece": "ReooPAxPMsHM4KPMY",
}

// GetSpecialAnimeID checks if an anime title has a special ID mapping
// Returns the special ID and true if found, empty string and false otherwise
func GetSpecialAnimeID(title string) (string, bool) {
	uppercaseTitle := strings.ToLower(strings.TrimSpace(title))
	id, exists := SpecialAnimeIDMappings[uppercaseTitle]
	return id, exists
}