diff --git a/.env b/.env index 80fc4c3..d9d869a 100644 --- a/.env +++ b/.env @@ -1,24 +1,24 @@ # Required -JELLYFIN_URL=http://localhost:8096 -JELLYFIN_API_KEY= -JELLYFIN_USER_ID= -TMDB_API_KEY= +JELLYFIN_URL=http://jellyfin.internal +JELLYFIN_API_KEY=4e8416e25e404688a202fec082af21fc +JELLYFIN_USER_ID=182031712c9240eb91f571003f2d3ba5 +TMDB_API_KEY=ad49c6908213b3aae1788825df8a08d1 # LLM (disabled by default — works with Ollama, OpenAI, LM Studio, etc.) -LLM_ENABLED=false -LLM_BASE_URL=http://localhost:11434/v1 -LLM_API_KEY= -LLM_MODEL=gpt-oss-4080 +LLM_ENABLED=true +LLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai +LLM_API_KEY=AIzaSyCPSXWsWw78n_Wn4GOXMAyruAz5-05gF3Q +LLM_MODEL=gemini-2.5-flash # Radarr (disabled by default) -RADARR_ENABLED=false -RADARR_URL=http://localhost:7878 -RADARR_API_KEY= +RADARR_ENABLED=true +RADARR_URL=http://radarr.internal +RADARR_API_KEY=3f0e10ad239f4be5b33abcdf06f6e373 RADARR_QUALITY_PROFILE_ID=1 RADARR_ROOT_FOLDER=/movies # Cron auto-run (disabled by default) -CRON_ENABLED=false +CRON_ENABLED=true CRON_SCHEDULE=0 3 * * * # HTTP API (enabled by default) @@ -26,5 +26,5 @@ API_ENABLED=true API_PORT=8080 # Tuning -RECOMMEND_COUNT=10 +RECOMMEND_COUNT=20 MIN_RATED_MOVIES=5 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/docker-compose.yml b/docker-compose.yml index f00d286..fb614fd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,4 +23,3 @@ services: networks: media: - external: true diff --git a/internal/client/llm.go b/internal/client/llm.go index 34fdc53..b78f8d6 100644 --- a/internal/client/llm.go +++ b/internal/client/llm.go @@ -70,7 +70,11 @@ func (c *LLMClient) Recommend(prompt string) ([]model.MovieSuggestion, error) { defer resp.Body.Close() if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("llm returned status %d", resp.StatusCode) + var chatResp interface{} + if err := json.NewDecoder(resp.Body).Decode(&chatResp); err != nil { + return nil, fmt.Errorf("decoding llm response: %w", err) + } + return nil, fmt.Errorf("llm returned status %d with body: %s", resp.StatusCode, chatResp) } var chatResp chatResponse