feat: Update player API to use id_type in path

All Russian players now use format: /players/{player}/{id_type}/{id}
- id_type can be kp (Kinopoisk) or imdb
- Alloha, Lumex, Vibix, HDVB support both ID types
- Added validation for id_type parameter
- Updated handlers to parse id_type from path
This commit is contained in:
2025-10-18 20:21:13 +00:00
parent 567b287322
commit 28555a83e1
12 changed files with 838 additions and 88 deletions

View File

@@ -25,6 +25,9 @@ type Config struct {
FrontendURL string
VibixHost string
VibixToken string
KPAPIKey string
HDVBToken string
KPAPIBaseURL string
}
func New() *Config {
@@ -50,6 +53,9 @@ func New() *Config {
FrontendURL: getEnv(EnvFrontendURL, ""),
VibixHost: getEnv(EnvVibixHost, DefaultVibixHost),
VibixToken: getEnv(EnvVibixToken, ""),
KPAPIKey: getEnv(EnvKPAPIKey, ""),
HDVBToken: getEnv(EnvHDVBToken, ""),
KPAPIBaseURL: getEnv("KPAPI_BASE_URL", DefaultKPAPIBase),
}
}