Skip to content

0.10.4

Compare
Choose a tag to compare
@alphatownsman alphatownsman released this 17 Jul 13:42
· 58 commits to main since this release

Configuration

NEODB_LANGUAGE is deprecated, added three new configurations in .env:

  • NEODB_PREFERRED_LANGUAGES - preferred languages when importing titles from 3rd party sites like TMDB and Steam, comma-separated list of ISO-639-1 two-letter codes, en,zh by default. It can includes languages with no UI translations yet, e.g. if set to ja,en,zh, NeoDB scraper will fetch catalog metadata in three languages if they are available from third party sites, Japanese users (= whose browser language set to ja-JP) will see English UI with Japanese metadata.
  • NEODB_DISCOVER_FILTER_LANGUAGE - False by default; when set to True, /discover/ will only show items with languages match one of NEODB_PREFERRED_LANGUAGES.
  • NEODB_DISCOVER_SHOW_LOCAL_ONLY - False by default; when set to True, only show items marked by local users rather than entire network on /discover/
  • NEODB_DISCOVER_UPDATE_INTERVAL - minutes between each update for popular items on /discover/

Catalog scrapers will try to get title and description in each languages configured in NEODB_PREFERRED_LANGUAGES. the coverage of languages may vary by sites, e.g. TMDB and Steam may have better coverage than others. some fields including people and company names do not support multi-language yet, which will be improved in the future

Discover page will show item titles matching the user's preference, and fallback to site preference (NEODB_PREFERRED_LANGUAGES), if neither match, it will show just a random language available.

Migration

after upgrading to this version, existing items in database will need to be migrated to support multiple languages

alias neodb-manage='docker compose --profile production run --rm shell neodb-manage'
neodb-manage catalog --localize
neodb-manage cron --runonce DiscoverGenerator

the actual language of those titles are auto-detected during the migration, which means some may not be correct (e.g. a common error I noticed is some short en titles are mistaken as pt), but you can manually correct them by either editing the item metadata or use the Refetch option in the edit page.

API

  • in order to get a specific language version of title and description, Accept-Language has to be specified in the request HTTP header
  • brief has been renamed to description, hosts has been renamed to host; supports of these legacy fields will be removed in 0.11
  • Edition.language is now a list of strings

Full Changelog: 0.10.3.2...0.10.4beta1