mirror of
https://github.com/Viren070/MediaFusion.git
synced 2025-12-01 23:21:11 +01:00
make poster url as optional config & use default host url
This commit is contained in:
+8
-1
@@ -1,3 +1,4 @@
|
||||
from pydantic import model_validator
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
|
||||
@@ -9,7 +10,7 @@ class Settings(BaseSettings):
|
||||
|
||||
# API and service URLs
|
||||
host_url: str
|
||||
poster_host_url: str
|
||||
poster_host_url: str | None = None
|
||||
scraper_proxy_url: str | None = None
|
||||
torrentio_url: str = "https://torrentio.strem.fun"
|
||||
prowlarr_url: str = "http://prowlarr-service:9696"
|
||||
@@ -82,6 +83,12 @@ class Settings(BaseSettings):
|
||||
# Optional security settings
|
||||
api_password: str | None = None
|
||||
|
||||
@model_validator(mode="after")
|
||||
def default_poster_host_url(self) -> "Settings":
|
||||
if not self.poster_host_url:
|
||||
self.poster_host_url = self.host_url
|
||||
return self
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
extra = "ignore"
|
||||
|
||||
@@ -19,7 +19,7 @@ This guide describes the environment variables available in MediaFusion for conf
|
||||
- **logo_url** (default: GitHub RAW Addon URL): The URL of the MediaFusion logo.
|
||||
- **secret_key** (required): A secret key for securely signing the session.
|
||||
- **host_url** (required): The URL where MediaFusion is hosted.
|
||||
- **poster_host_url** (required): The URL where MediaFusion is hosted. Use the same value as `host_url`. This setting intends to serve the poster images from the cached location.
|
||||
- **poster_host_url** (default: Use the Host URL value): The URL where MediaFusion is hosted. Use the same value as `host_url`. This setting intends to serve the poster images from the cached location.
|
||||
- **logging_level** (default: `"INFO"`): The logging level of the application.
|
||||
- **enable_tamilmv_search_scraper** (default: `False`): Toggle the TamilMV search scraper.
|
||||
- **is_scrap_from_torrentio** (default: `False`): Enable or disable scraping from Torrentio.
|
||||
|
||||
Reference in New Issue
Block a user