Add country metadata extraction and assignment features
- Updated `README.md` to include instructions for setting up the TMDB API key and new admin endpoints for managing country metadata. - Implemented `/admin/missing-countries` endpoint to list media items without country metadata, with filtering options for source and media type. - Added `/admin/assign-country` endpoint to manually assign a country code to a media item. - Enhanced country extraction logic in `sync.py` to utilize TMDB and MusicBrainz APIs for automatic country retrieval based on available metadata. - Updated configuration in `config.py` to include optional TMDB API key setting. - Improved error handling and logging for country extraction failures. - Ensured that country data is stored and utilized during media item synchronization across Radarr, Sonarr, and Lidarr.
This commit is contained in:
@@ -29,6 +29,9 @@ class Settings(BaseSettings):
|
||||
# Admin
|
||||
admin_token: Optional[str] = os.getenv("MOVIEMAP_ADMIN_TOKEN")
|
||||
|
||||
# External APIs (optional)
|
||||
tmdb_api_key: str = os.getenv("TMDB_API_KEY", "")
|
||||
|
||||
@property
|
||||
def database_url(self) -> str:
|
||||
"""Build PostgreSQL connection string using Unix socket"""
|
||||
|
||||
Reference in New Issue
Block a user