mirror of
https://gitlab.com/foxixus/neomovies-api.git
synced 2025-10-28 01:48:51 +05:00
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:
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ const (
|
||||
EnvFrontendURL = "FRONTEND_URL"
|
||||
EnvVibixHost = "VIBIX_HOST"
|
||||
EnvVibixToken = "VIBIX_TOKEN"
|
||||
EnvKPAPIKey = "KPAPI_KEY"
|
||||
EnvHDVBToken = "HDVB_TOKEN"
|
||||
|
||||
// Default values
|
||||
DefaultJWTSecret = "your-secret-key"
|
||||
@@ -29,6 +31,7 @@ const (
|
||||
DefaultRedAPIBase = "http://redapi.cfhttp.top"
|
||||
DefaultMongoDBName = "database"
|
||||
DefaultVibixHost = "https://vibix.org"
|
||||
DefaultKPAPIBase = "https://kinopoiskapiunofficial.tech/api"
|
||||
|
||||
// Static constants
|
||||
TMDBImageBaseURL = "https://image.tmdb.org/t/p"
|
||||
|
||||
Reference in New Issue
Block a user