feat(search): add logging, rate limiting, and genre ID support
Enhance the ITunesProvider by adding logging with detailed caller information, implementing rate limiting to prevent API abuse, and supporting genre IDs for more precise searches. Also, update the User-Agent string and improve error handling and logging throughout the search and charts functionality.
This commit is contained in:
@@ -108,3 +108,13 @@ func GetGenreByLanguage(language string) map[string]string {
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
func GetGenreID(language string, genre string) string {
|
||||
for genreId, v := range Genres {
|
||||
genreOffical, ok := v[language]
|
||||
if ok && genreOffical == genre {
|
||||
return genreId
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user