Skip to content

chore(release): bump version to v1.9.0#108

Merged
TimilsinaBimal merged 18 commits intomainfrom
dev
Mar 1, 2026
Merged

chore(release): bump version to v1.9.0#108
TimilsinaBimal merged 18 commits intomainfrom
dev

Conversation

@TimilsinaBimal
Copy link
Owner

No description provided.

@vercel
Copy link

vercel bot commented Feb 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
watchly Ready Ready Preview, Comment Feb 25, 2026 10:23am

@TimilsinaBimal TimilsinaBimal linked an issue Feb 14, 2026 that may be closed by this pull request
@gemini-code-assist
Copy link

Summary of Changes

Hello @TimilsinaBimal, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces significant enhancements to user personalization and external service integration. It centralizes API key management, expands user settings to include new API keys and catalog sorting preferences, and integrates AI capabilities from Gemini for taste profile summaries and dynamic catalog generation. Additionally, it adds Simkl integration for improved recommendations and refines the HTTP client's retry mechanism for better stability. The frontend has been updated to support these new configurations, offering users more control over their content discovery experience.

Highlights

  • API Key Management Refactor: The API key validation endpoints for poster ratings, TMDB, Simkl, and Gemini have been centralized into a new validation.py endpoint, improving organization and consistency.
  • Enhanced User Settings: User settings now include options for catalog sorting order (movies first, series first, or default) and personal API keys for Simkl, Gemini, and TMDB, allowing for greater customization and integration.
  • AI-Powered Interest Summaries and Catalog Generation: A new service generates LLM-based summaries of user taste profiles using Gemini, and the catalog generation process can now leverage Gemini API keys to create more personalized and creative catalog rows.
  • Simkl Integration for Recommendations: The recommendation services now integrate Simkl, using user-provided Simkl API keys to fetch recommendations as an alternative or supplement to TMDB, enhancing recommendation diversity.
  • Improved TMDB API Key Handling: The system now supports user-specific TMDB API keys, allowing users to override the server's default key for metadata and recommendations, with a utility to resolve the active key.
  • Robust HTTP Client Retries: The internal HTTP client has been updated with more intelligent retry logic, specifically retrying only on rate limit (429) and server error (5xx) HTTP status codes to improve resilience.
  • Frontend Updates for New Features: The user interface has been updated to allow users to input and validate their Simkl, Gemini, and TMDB API keys, and to select their preferred catalog sorting order, providing a seamless user experience for new features.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • app/api/endpoints/poster_rating.py
    • Removed the dedicated poster rating API key validation endpoint.
  • app/api/endpoints/tokens.py
    • Added sorting_order, simkl_api_key, gemini_api_key, and tmdb_api_key fields to TokenRequest.
    • Updated create_token to process new API key and sorting order fields.
    • Modified check_stremio_identity to reconstruct UserSettings for backward compatibility with new default values.
  • app/api/endpoints/validation.py
    • Added new endpoint for validating Gemini, TMDB, Simkl, and Poster Rating API keys.
  • app/api/main.py
    • Renamed to app/api/router.py.
    • Removed import of poster_rating_router.
    • Added import of validation_router.
  • app/api/models/validation.py
    • Added new Pydantic models BaseValidationInput, BaseValidationResponse, and PosterRatingValidationInput for API key validation.
  • app/core/app.py
    • Updated import path for api_router due to file rename.
    • Added logic to fetch and display the total number of users on the configure page.
  • app/core/base_client.py
    • Modified the _request method to implement more specific retry logic, retrying only on 429 and 5xx HTTP status codes.
  • app/core/settings.py
    • Added sorting_order, simkl_api_key, gemini_api_key, and tmdb_api_key fields to the UserSettings Pydantic model.
    • Introduced resolve_tmdb_api_key function to determine the effective TMDB API key (user-provided or server default).
  • app/core/version.py
    • Updated the application version to 1.9.0-rc.3.
  • app/models/taste_profile.py
    • Added an optional interest_summary field to the TasteProfile model for LLM-generated summaries.
  • app/services/catalog.py
    • Imported interest_summary_service and user_cache.
    • Modified DynamicCatalogService constructor to accept an optional tmdb_api_key.
    • Updated get_theme_based_catalogs to accept a token parameter and integrate Gemini for generating and saving interest summaries.
    • Modified row_generator.generate_rows call to pass an optional api_key.
  • app/services/catalog_updater.py
    • Updated import for sort_catalogs utility.
    • Modified refresh_catalogs_for_credentials to pass tmdb_api_key and token to DynamicCatalogService.
    • Replaced manual catalog sorting logic with the new sort_catalogs utility.
    • Added error handling to update the addon description with an error message if catalog updates fail.
  • app/services/gemini.py
    • Removed asyncio import.
    • Added FLASH_MODEL constant for Gemini's flash model.
    • Introduced _get_client to handle API key provision.
    • Added generate_flash_content_async for general content generation using the flash model.
    • Added generate_structured_async for generating structured JSON output from Gemini.
  • app/services/interest_summary.py
    • Added new service for generating LLM-based summaries of user taste profiles using Gemini.
  • app/services/manifest.py
    • Imported resolve_tmdb_api_key and sort_catalogs.
    • Modified cache_library_and_profiles and _build_dynamic_catalogs to use resolve_tmdb_api_key and pass tmdb_api_key and token to relevant services.
    • Replaced manual catalog sorting logic with the new sort_catalogs utility.
  • app/services/profile/constants.py
    • Added GENRE_MAP for mapping TMDB genre IDs to their names.
  • app/services/profile/integration.py
    • Modified ProfileIntegration constructor to accept an optional tmdb_api_key.
  • app/services/profile/vectorizer.py
    • Imported httpx.
    • Added specific error handling for httpx.HTTPStatusError (e.g., 404 Not Found) during feature extraction from TMDB.
  • app/services/recommendation/all_based.py
    • Imported simkl_service.
    • Modified get_recommendations_from_all_items to integrate Simkl recommendations if a simkl_api_key is available, falling back to TMDB otherwise.
    • Added _fetch_simkl_candidates method to fetch recommendations from Simkl.
  • app/services/recommendation/catalog_service.py
    • Imported resolve_tmdb_api_key.
    • Modified _get_trending_fallback to use user_settings for tmdb_api_key and language.
    • Updated _initialize_services to pass tmdb_api_key to TMDBService and ProfileIntegration.
    • Modified _get_recommendations to accept user_settings and pass it to _get_trending_fallback.
  • app/services/recommendation/item_based.py
    • Imported simkl_service.
    • Modified get_recommendations_for_item to concurrently fetch candidates from Simkl and TMDB, then combine them.
    • Added _fetch_candidates_from_simkl method to retrieve Simkl recommendations.
  • app/services/recommendation/top_picks.py
    • Imported simkl_service.
    • Modified get_top_picks to integrate Simkl recommendations if a simkl_api_key is available, falling back to TMDB otherwise.
    • Added _fetch_simkl_recommendations method to fetch Simkl recommendations for top library items.
  • app/services/recommendation/utils.py
    • Modified filter_items_by_settings to include item.get("released") when parsing release dates, supporting Simkl data.
  • app/services/row_generator.py
    • Imported Field from pydantic.
    • Added LLMRowTheme Pydantic model for structured LLM output.
    • Modified generate_rows to optionally use LLM for row generation if an api_key is provided, falling back to tiered sampling.
    • Added _resolve_keyword_to_id to map keyword names to TMDB IDs.
    • Added _generate_rows_with_llm to generate creative catalog rows using Gemini.
    • Updated _generate_titles to clarify it uses the server's default Gemini model.
  • app/services/simkl.py
    • Added new service for interacting with the Simkl API, including functions for fetching trending items, item details, and batch recommendations.
    • Implemented normalize_simkl_to_tmdb to convert Simkl item formats to TMDB-compatible structures.
  • app/services/stremio/addons.py
    • Added update_description method to modify only the addon's description.
    • Modified update_catalogs to include a more descriptive and formatted 'Last Updated' message in the addon description.
  • app/services/tmdb/service.py
    • Added search_keywords method to search for TMDB keywords by name.
    • Modified get_tmdb_service to accept an optional api_key parameter, allowing user-specific TMDB keys to be used.
    • Increased the lru_cache size for get_tmdb_service.
  • app/services/token_store.py
    • Added encryption and decryption logic for simkl_api_key, gemini_api_key, and tmdb_api_key within user settings for secure storage.
  • app/static/js/modules/auth.js
    • Updated fetchStremioIdentity to send and receive sorting_order, tmdb_api_key, simkl_api_key, and gemini_api_key in user settings.
  • app/static/js/modules/form.js
    • Updated initializeForm to call new initialization functions for TMDB, Simkl, and Gemini API key inputs.
    • Modified initializeFormSubmission to collect and send new API keys and sorting order to the backend.
    • Added initializeTmdb, initializeSimkl, and initializeGemini functions for frontend API key input, validation, and visibility toggles.
  • app/templates/components/section_config.html
    • Added UI elements for selecting catalog sorting_order.
    • Added input fields and validation buttons for TMDB, Simkl, and Gemini API keys, including password toggle functionality.
  • app/templates/components/section_welcome.html
    • Updated the styling of the version badge.
    • Added a new badge to display the total number of users.
  • app/utils/catalog.py
    • Added sort_catalogs function to sort catalogs based on user's sorting_order preference (default, movies first, or series first).
  • pyproject.toml
    • Added pre-commit to project dependencies.
  • uv.lock
    • Updated dependency lock file to include pre-commit.
Activity
  • The pull request was created by TimilsinaBimal.
  • The title 'chore(release): bump version to v1.9.0' indicates a version update, suggesting a new release with accumulated features.
  • Extensive changes across multiple files, including new services and API endpoints, point to a significant feature release rather than a minor fix.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances recommendation sources and API key management by integrating Simkl and Google Gemini, and improving HTTP client retry logic. However, it introduces a high-severity SSRF/Path Traversal vulnerability in Simkl and TMDB integrations due to unsanitized user input in URLs. There are also medium-severity issues with insecure API key storage (flawed encryption checks) and a privacy leak from predictable Stremio user IDs. Further improvements are needed for error handling consistency, code duplication, and the TMDB API key user experience.

@TimilsinaBimal
Copy link
Owner Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant number of new features and improvements, including integrations with Simkl and Gemini for enhanced recommendations, the ability for users to provide their own TMDB API keys, and a new validation framework for API keys. The changes are extensive and well-structured, with notable refactorings in the HTTP client's retry logic and catalog sorting. My review includes a critical security suggestion to prevent leaking exception details to users, and a couple of recommendations to reduce code duplication in both the backend and frontend for better maintainability.

@TimilsinaBimal TimilsinaBimal merged commit f13a7de into main Mar 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add option to fetch recommendations from Simkl

1 participant