### Run Setup Scripts Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/uiinstallation.md Execute the platform-specific script to install backend and frontend dependencies. ```bash setup.ps1 ``` ```bash setup.bat ``` ```bash setup.sh ``` -------------------------------- ### Start Frontend Development Server Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/uiinstallation.md Build and start the frontend interface in a dedicated terminal. ```bash # Navigate to the frontend directory cd webui/frontend # Run the development server npm run build ``` -------------------------------- ### Install ImageMagick 7 from Source Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/walkthrough.md Compiles and installs ImageMagick 7 from source code, including necessary development libraries. ```bash # Prerequisites sudo apt update sudo apt install build-essential apt install libjpeg-dev apt install libpng-dev apt install libfreetype-dev # Download/extract wget https://imagemagick.org/archive/ImageMagick.tar.gz tar xvzf ImageMagick.tar.gz cd ImageMagick-7.1.1-34 # Version can differ # Compilation and Installation ./configure make sudo make install sudo ldconfig /usr/local/lib # Check if it is working magick -version ``` -------------------------------- ### Navigate to Installation Directory Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/walkthrough.md Commands to switch to the target directory for the project. ```bash cd /opt/appdata ``` ```powershell cd C:\Github ``` -------------------------------- ### Install FanartTvAPI Module Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/walkthrough.md Installs the required FanartTvAPI PowerShell module for all users. ```powershell pwsh Install-Module -Name FanartTvAPI -Scope AllUsers -Force ``` -------------------------------- ### GET / Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Serves the React frontend application. ```APIDOC ## GET / ### Description Serve the React frontend application. ### Method GET ### Endpoint / ### Response #### Success Response (200) - Returns the compiled React SPA. ``` -------------------------------- ### Install PowerShell on ARM Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/walkthrough.md Installs PowerShell dependencies and the latest binary package for ARM architectures. ```bash # Prerequisites # Update package lists sudo apt-get update # Install dependencies sudo apt-get install jq libssl1.1 libunwind8 -y # Download and extract PowerShell # Grab the latest tar.gz bits=$(getconf LONG_BIT) release=$(curl -sL https://api.github.com/repos/PowerShell/PowerShell/releases/latest) package=$(echo $release | jq -r ".assets[].browser_download_url" | grep "linux-arm${bits}.tar.gz") wget $package # Make folder to put powershell mkdir ~/powershell # Unpack the tar.gz file tar -xvf "./${package##*/}" -C ~/powershell # Make Powershell executable PowerShell sudo chmod +x ~/powershell/pwsh # Create Symlink sudo ~/powershell/pwsh -command 'New-Item -ItemType SymbolicLink -Path "/usr/bin/pwsh" -Target "$PSHOME/pwsh" -Force' ``` -------------------------------- ### Container Startup Commands Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/walkthrough.md Commands to initialize and start the Posterizarr container on Linux and Windows. ```bash cd /opt/appdata mkdir Posterizarr # chown the dir with correct puid/pgid cd Posterizarr docker compose up -d ``` ```bash cd C:\Github mkdir Posterizarr cd Posterizarr docker compose up -d ``` -------------------------------- ### Get tooltip for configuration key Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Retrieves help text associated with a configuration option. ```python def get_tooltip(key: str) -> str: """Retrieve tooltip/help text from CONFIG_TOOLTIPS""" ``` -------------------------------- ### GET /api/overlay-creator/preview Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/README.md Previews a custom overlay configuration. ```APIDOC ## GET /api/overlay-creator/preview ### Description Provides a preview of a custom overlay configuration. ### Method GET ### Endpoint /api/overlay-creator/preview ``` -------------------------------- ### Example Error Response Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/errors.md A concrete example of an authentication failure error response. ```json { "detail": "Authentication failed: Invalid credentials", "error_code": "AUTH_INVALID_CREDENTIALS" } ``` -------------------------------- ### Start Backend Python Server Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/uiinstallation.md Launch the Uvicorn server for the backend in a dedicated terminal. ```bash # Navigate to the backend directory cd webui/backend # Run the Python server python -m uvicorn main:app --host 127.0.0.1 --port 8000 ``` -------------------------------- ### Install Wrangler CLI Source: https://github.com/fscorrupt/posterizarr/blob/main/telemetry-worker/README.md Command to install the Cloudflare Wrangler CLI globally via npm. ```bash npm install -g wrangler ``` -------------------------------- ### GET /api/system-info Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Retrieves general system information. ```APIDOC ## GET /api/system-info ### Description Returns information about the current system state. ### Method GET ### Endpoint /api/system-info ``` -------------------------------- ### Webhook Log Entry Example Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/webhooks-integrations.md Sample output format found in the BackendServer.log file. ```text 2024-01-20 15:30:45 - INFO - Webhook received: type=arr, event=Download, title=Breaking Bad 2024-01-20 15:30:46 - INFO - Processing webhook: triggering asset generation 2024-01-20 15:30:47 - INFO - Queue item created: item_12345 ``` -------------------------------- ### Get System Information Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Retrieves hardware and OS details for the host system. ```json { "platform": "Linux", "os_version": "Alpine Linux v3.22", "cpu_model": "11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz", "cpu_cores": 8, "total_memory": "63931 MB", "used_memory": "9589 MB", "free_memory": "54342 MB", "memory_percent": 15.0, "is_docker": true } ``` -------------------------------- ### Manual Script Execution Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/walkthrough.md Commands to manually start the Posterizarr script on Windows. ```bash cd C:\Github\Posterizarr pwsh .\Posterizarr.ps1 ``` -------------------------------- ### Start Posterizarr Script Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/walkthrough.md Commands to execute the main script, requiring elevated privileges on the first run. ```bash cd /opt/appdata/Posterizarr sudo pwsh Posterizarr.ps1 ``` -------------------------------- ### Set Log Level Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Example of setting the log level within the configuration file. ```json "logLevel": "2" ``` -------------------------------- ### GET /api/config Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Retrieves the full application configuration. ```APIDOC ## GET /api/config ### Description Retrieves the full application configuration. ### Method GET ### Endpoint /api/config ``` -------------------------------- ### GET /api/config/export Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/configuration.md Downloads the complete configuration as JSON. ```APIDOC ## GET /api/config/export ### Description Downloads the complete configuration as JSON. ### Method GET ### Endpoint /api/config/export ``` -------------------------------- ### Library Folders Enabled Directory Structure Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/namingconvention.md Example directory structure when Library Folders is set to true. ```text ├───Anime Shows │ └───Solo Leveling (2024) [tvdb-389597] │ poster.jpg │ S01E01.jpg │ Season01.jpg │ background.jpg │ EpisodeTemplate.jpg │ SeasonTemplate.jpg ``` -------------------------------- ### Kometa Library Configuration Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/webhooks-integrations.md Example configuration for referencing Posterizarr-generated assets within a Kometa library. ```yaml libraries: Movies: metadata: The Matrix: assets: directory: assets/Movies/The Matrix # Kometa will use poster.png, background.png, etc. ``` -------------------------------- ### Check Version Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Compares the locally installed version against the latest version available on GitHub. ```json { "local": "2.1.15", "remote": "2.1.15", "is_update_available": false } ``` -------------------------------- ### Test Tautulli Webhook with cURL Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/webhooks-integrations.md A command-line example to verify the webhook endpoint connectivity. ```bash curl -X POST http://posterizarr:8000/api/webhook/tautulli \ -d 'payload={"added_at": 1705328400, "media_type": "movie", "title": "Test Movie"}' ``` -------------------------------- ### GET /api/version Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Checks installed version against remote GitHub version. ```APIDOC ## GET /api/version ### Description Checks installed version against remote GitHub version. ### Method GET ### Endpoint /api/version ### Response #### Success Response (200) - **local** (string) - Local version - **remote** (string) - Remote version - **is_update_available** (boolean) - Update status #### Response Example { "local": "2.1.15", "remote": "2.1.15", "is_update_available": false } ``` -------------------------------- ### GET /api/config-db/status Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Get database connection and initialization status. ```APIDOC ## GET /api/config-db/status ### Description Get database connection and initialization status. ### Method GET ### Endpoint /api/config-db/status ### Response #### Success Response (200) - **status** (string) - Database status - **initialized** (boolean) - Initialization state - **sections_count** (number) - Total number of sections ``` -------------------------------- ### Get System Information via curl Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Returns general system status and information. ```bash curl http://localhost:8000/api/system-info ``` -------------------------------- ### Apprise URL Examples Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/configuration.md Common URL formats for various notification services supported by Apprise. ```text discord://webhook_id/webhook_token/ ``` ```text tgram://bot_token/chat_id ``` ```text slack://bot_token/channel_id ``` ```text pover://user_key/api_token ``` -------------------------------- ### Build the plugin from source Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/emby_plugin.md Use the .NET CLI to compile the plugin project into a deployable DLL. ```bash dotnet publish modules/Posterizarr.Plugin.Emby/Posterizarr.Plugin.Emby.csproj -c Release -o publish ``` -------------------------------- ### Initialize database tables Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Creates the required tables and indexes for the image choices database. ```python def init_database() -> None: """ Create imagechoices table with: - Title, Type, Rootfolder, LibraryName - DownloadSource, FavProviderLink, Manual flag - TMDB/TVDB/IMDB IDs - Timestamps """ ``` -------------------------------- ### SERVER_NO_LIBRARIES JSON response Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/errors.md Example JSON response when no libraries are found on the server. ```json { "detail": "No libraries found on Plex server", "error_code": "SERVER_NO_LIBRARIES" } ``` -------------------------------- ### Sync Configuration from File Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Method signature for populating the database from a configuration file. ```python def sync_from_file() -> None: """Read config.json and populate database""" ``` -------------------------------- ### Get Configuration Section Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Method signature for retrieving all key-value pairs within a specific configuration section. ```python def get_section(section: str) -> dict: """Return all key-value pairs in section as dict""" ``` -------------------------------- ### Initialize PosterizarrScheduler Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Sets up the scheduler with base directory and script path configurations. ```python class PosterizarrScheduler: def __init__(self, base_dir: Path, script_path: Path): """ Initialize scheduler. Manages cron-based and interval-based execution. """ self.base_dir = base_dir self.script_path = script_path self.config_path = base_dir / "scheduler.json" self.scheduler = AsyncIOScheduler(...) ``` -------------------------------- ### Execute and Control Scheduler Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Methods for immediate execution, starting, stopping, and timezone configuration. ```python def run_now(mode: str) -> bool: """Trigger immediate execution with specified mode""" ``` ```python async def start() -> None: """Start APScheduler instance""" ``` ```python async def shutdown() -> None: """Gracefully shutdown scheduler""" ``` ```python def update_timezone(timezone: str) -> None: """Update scheduler timezone (must be valid pytz zone)""" ``` -------------------------------- ### Posterizarr Configuration Initialization and Management Source: https://github.com/fscorrupt/posterizarr/blob/main/modules/Posterizarr.Plugin/Web/configPage.html Handles loading, displaying, and saving plugin configuration settings via the Jellyfin API. ```javascript (function() { 'use strict'; const pluginId = "f62d8560-6123-4567-89ab-cdef12345678"; let configLoaded = false; function loadConfig(page) { if (configLoaded) return; Dashboard.showLoadingMsg(); ApiClient.getPluginConfiguration(pluginId).then(function (config) { page.querySelector('#txtAssetPath').value = config.AssetFolderPath || ""; page.querySelector('#chkDebugMode').checked = config.EnableDebugMode || false; configLoaded = true; Dashboard.hideLoadingMsg(); }); } function init() { const view = document.querySelector('#PosterizarrConfigPage'); if (!view) { setTimeout(init, 100); return; } view.addEventListener('viewshow', function () { configLoaded = false; loadConfig(this); }); view.addEventListener('pageshow', function () { configLoaded = false; loadConfig(this); }); view.querySelector('#PosterizarrConfigForm').addEventListener('submit', function (e) { e.preventDefault(); Dashboard.showLoadingMsg(); const form = this; ApiClient.getPluginConfiguration(pluginId).then(function (config) { config.AssetFolderPath = view.querySelector('#txtAssetPath').value; config.EnableDebugMode = view.querySelector('#chkDebugMode').checked; ApiClient.updatePluginConfiguration(pluginId, config).then(function(result) { Dashboard.processPluginConfigurationUpdateResult(result); }); }); return false; }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })(); ``` -------------------------------- ### GET /api/queue Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Retrieves the current task queue. ```APIDOC ## GET /api/queue ### Description Get current task queue. ### Method GET ### Endpoint /api/queue ### Response #### Success Response (200) - **Array** (object) - List of tasks in the queue #### Response Example [ { "id": "task_1", "asset_path": "/assets/Movies/poster.png", "status": "processing", "created_at": "2024-01-20T15:30:00Z" } ] ``` -------------------------------- ### GET /api/fonts Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md List all uploaded font files. ```APIDOC ## GET /api/fonts ### Description List all uploaded font files. ### Method GET ### Endpoint /api/fonts ### Response #### Success Response (200) - **filename** (string) - Name of the font file - **size_bytes** (integer) - Size of the file in bytes - **uploaded_at** (string) - ISO 8601 timestamp of upload #### Response Example [ { "filename": "Colus-Regular.ttf", "size_bytes": 125000, "uploaded_at": "2024-01-15T10:30:00Z" } ] ``` -------------------------------- ### Initialize FastAPI Application Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Sets up the FastAPI instance with CORS and custom authentication middleware. ```python app = FastAPI(title="Posterizarr API", version="2.2.52") # CORS Middleware app.add_middleware(CORSMiddleware, allow_origins=["*"], ...) # Authentication Middleware app.add_middleware(BasicAuthMiddleware, config_path=CONFIG_PATH, db_path=DB_PATH) ``` -------------------------------- ### Workflow: Configuring Custom Overlays Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/README.md Steps to upload, preview, and apply custom overlay images to assets. ```text User creates overlay image → Upload via /api/overlayfiles/upload → Preview via /api/overlay-creator/preview → Apply in config: PosterOverlayPart.overlayfile → Next generation uses new overlay ``` -------------------------------- ### GET /api/config-db/export Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Export configuration database as CSV. ```APIDOC ## GET /api/config-db/export ### Description Export configuration database as CSV. ### Method GET ### Endpoint /api/config-db/export ### Response #### Success Response (200) - **file** (binary) - CSV file ``` -------------------------------- ### Library Folders Disabled Directory Structure Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/namingconvention.md Example directory structure when Library Folders is set to false. ```text ├───Anime Shows │ Solo Leveling (2024) [tvdb-389597].jpg │ Solo Leveling (2024) [tvdb-389597]_S01E01.jpg │ Solo Leveling (2024) [tvdb-389597]_Season01.jpg │ Solo Leveling (2024) [tvdb-389597]_background.jpg │ EpisodeTemplate.jpg │ SeasonTemplate.jpg ``` -------------------------------- ### Retrieve configuration Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Fetches the complete configuration structure. ```http GET /api/config ``` -------------------------------- ### Clone and Enter Repository Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/walkthrough.md Clones the Posterizarr repository and enters the directory. ```bash git clone https://github.com/fscorrupt/posterizarr.git ``` ```bash cd Posterizarr ``` -------------------------------- ### GET /api/assets/folders Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Lists all configured asset folders. ```APIDOC ## GET /api/assets/folders ### Description Retrieves a list of all asset folders currently configured. ### Method GET ### Endpoint /api/assets/folders ``` -------------------------------- ### GET /api/webui-settings Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Retrieves the current WebUI-specific configuration settings. ```APIDOC ## GET /api/webui-settings ### Description Get WebUI-specific settings. ### Method GET ### Endpoint /api/webui-settings ### Response #### Success Response (200) - **theme** (string) - UI theme - **language** (string) - UI language - **items_per_page** (integer) - Pagination limit - **refresh_interval** (integer) - Refresh interval in milliseconds #### Response Example { "theme": "dark", "language": "en", "items_per_page": 50, "refresh_interval": 30000 } ``` -------------------------------- ### Execute First Run Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/installation.md Commands to initiate the first run of the application for both Docker and local environments. ```bash # Docker docker exec -it posterizarr pwsh /app/Posterizarr.ps1 -Testing # Windows (as Admin) & Linux ./Posterizarr.ps1 -Testing ``` -------------------------------- ### GET /api/scheduler Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Retrieves a list of all currently scheduled tasks. ```APIDOC ## GET /api/scheduler ### Description Get all scheduled tasks. ### Method GET ### Endpoint /api/scheduler ### Response #### Success Response (200) - **schedules** (array) - List of scheduled tasks #### Response Example { "schedules": [ { "id": "schedule_1", "name": "Daily Poster Update", "schedule": "0 2 * * *", "enabled": true, "next_run": "2024-01-21T02:00:00Z" } ] } ``` -------------------------------- ### Initialize RuntimeDatabase Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Initializes the database connection at the specified path. ```python class RuntimeDatabase: def __init__(self, db_path: Path): """Initialize runtime database""" self.db_path = db_path ``` -------------------------------- ### GET /api/auth/check Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Checks the current authentication status of the system. ```APIDOC ## GET /api/auth/check ### Description Check current authentication status. ### Method GET ### Endpoint /api/auth/check ### Response #### Success Response (200) - **authenticated** (boolean) - Current authentication status - **requiresAuth** (boolean) - Whether authentication is required #### Response Example { "authenticated": true, "requiresAuth": false } ``` -------------------------------- ### GET /api/logs Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Lists available log files on the server. ```APIDOC ## GET /api/logs ### Description Lists available log files on the server. ### Method GET ### Endpoint /api/logs ### Response #### Success Response (200) - **logs** (array) - List of log file objects containing name, size, and directory. #### Response Example { "logs": [ { "name": "BackendServer.log", "size": 2354179, "directory": "UILogs" }, { "name": "Scriptlog.log", "size": 27563, "directory": "Logs" } ] } ``` -------------------------------- ### Run Backup Mode Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/modes.md Download all artwork from the media server based on config.json settings. ```powershell .\Posterizarr.ps1 -Backup ``` ```sh docker exec -it posterizarr pwsh /app/Posterizarr.ps1 -Backup ``` -------------------------------- ### GET /api/folder-view/browse Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Browses the root folder structure of assets. ```APIDOC ## GET /api/folder-view/browse ### Description Browses the root folder structure of assets. ### Method GET ### Endpoint /api/folder-view/browse ### Response #### Success Response (200) - **success** (boolean) - Status of the request - **path** (string) - Current path - **items** (array) - List of items in the folder #### Response Example { "success": true, "path": "", "items": [ { "type": "folder", "name": "4K Movies", "path": "4K Movies", "item_count": 66 }, { "type": "folder", "name": "TV Shows", "path": "TV Shows", "item_count": 383 } ] } ``` -------------------------------- ### GET /api/releases Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Fetches the latest release notes from GitHub. ```APIDOC ## GET /api/releases ### Description Fetches the latest release notes from GitHub. ### Method GET ### Endpoint /api/releases ### Response #### Success Response (200) - **success** (boolean) - Request success status - **releases** (array) - List of release objects #### Response Example { "success": true, "releases": [ { "version": "2.1.15", "name": "v2.1.15", "published_at": "2025-11-21T11:00:57Z", "days_ago": 4, "is_prerelease": false, "is_draft": false, "html_url": "https://github.com/fscorrupt/posterizarr/releases/tag/2.1.15", "body": "## What's Changed\r\n* Fix missing assets in gallery..." } ] } ``` -------------------------------- ### Configure Server Connections Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Set URLs and enable/disable status for Plex, Jellyfin, and Emby servers. ```json { "PlexPart": { "PlexUrl": "http://plex:32400", "UseP lex": "true" }, "JellyfinPart": { "JellyfinUrl": "http://jellyfin:8096", "UseJellyfin": "false" }, "EmbyPart": { "EmbyUrl": "http://emby:8096/emby", "UseEmby": "false" } } ``` -------------------------------- ### GET /api Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Returns the basic status of the API server. ```APIDOC ## GET /api ### Description Returns the basic status of the API server. ### Method GET ### Endpoint /api ### Response #### Success Response (200) - **message** (string) - API description - **status** (string) - Server status #### Response Example { "message": "Posterizarr Web UI API", "status": "running" } ``` -------------------------------- ### Manage WebUI Configuration Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Functions for loading, saving, and initializing UI settings and logging levels. ```python def load_webui_settings() -> dict: """Load theme, language, and UI preferences""" # Returns dict with theme, language, items_per_page, refresh_interval ``` ```python def save_webui_settings(settings: dict) -> None: """Persist UI preferences to config database""" ``` ```python def load_log_level_config() -> str: """Load logLevel from config (0-3)""" ``` ```python def initialize_webui_settings() -> None: """Create default settings if not present""" ``` -------------------------------- ### GET /api/libraries/plex/cached Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Retrieves cached Plex library information. ```APIDOC ## GET /api/libraries/plex/cached ### Description Fetches the cached list of libraries from the Plex server. ### Method GET ### Endpoint /api/libraries/plex/cached ``` -------------------------------- ### GET /api/auth/check Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/README.md Verifies the validity of the provided API key. ```APIDOC ## GET /api/auth/check ### Description Verifies the provided API key for authentication. ### Method GET ### Endpoint /api/auth/check ### Parameters #### Headers - **X-API-Key** (string) - Required - The API key for authentication. ``` -------------------------------- ### Navigate to Web UI Directory Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/uiinstallation.md Change the current working directory to the project's webui folder. ```bash cd path/to/Posterizarr/webui ``` -------------------------------- ### GET /api/config-db/value/{section}/{key} Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Retrieve a single configuration value. ```APIDOC ## GET /api/config-db/value/{section}/{key} ### Description Retrieve a single configuration value. ### Method GET ### Endpoint /api/config-db/value/{section}/{key} ### Parameters #### Path Parameters - **section** (string) - Required - Section name - **key** (string) - Required - Configuration key ### Response #### Success Response (200) - **section** (string) - Section name - **key** (string) - Configuration key - **value** (string) - Configuration value ``` -------------------------------- ### GET /api/auth/keys Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Retrieves a list of all configured API authentication keys. ```APIDOC ## GET /api/auth/keys ### Description List all API authentication keys. ### Method GET ### Endpoint /api/auth/keys ### Response #### Success Response (200) - **keys** (array) - List of authentication key objects #### Response Example [ { "id": "key_abc123", "name": "Integration Token", "created_at": "2024-01-15T10:30:00Z", "last_used": "2024-01-20T14:15:00Z" } ] ``` -------------------------------- ### GET /api/queue Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/webhooks-integrations.md Retrieves the current status of the webhook processing queue. ```APIDOC ## GET /api/queue ### Description Returns the list of items currently in the webhook processing queue. ### Method GET ### Endpoint /api/queue ``` -------------------------------- ### Configure APP_HOST via .env file Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/networking.md Use a .env file in the application root to define host and port settings. ```plaintext APP_HOST=0.0.0.0 PORT=8000 ``` -------------------------------- ### GET /api/other-media-export/statistics Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Retrieves statistics regarding non-Plex media exports. ```APIDOC ## GET /api/other-media-export/statistics ### Description Retrieves statistics regarding non-Plex media exports. ### Method GET ### Endpoint /api/other-media-export/statistics ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **statistics** (object) - Contains total_runs, total_library_records, total_episode_records, and latest_run. #### Response Example { "success": true, "statistics": { "total_runs": 0, "total_library_records": 0, "total_episode_records": 0, "latest_run": null } } ``` -------------------------------- ### Initialize ConfigDB Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Constructor for the configuration database, which handles automatic schema creation. ```python class ConfigDB: def __init__(self, db_path: Path, config_path: Path): """ Initialize configuration database. Auto-creates tables and schema. """ self.db_path = db_path self.config_path = config_path ``` -------------------------------- ### Initialize ImageChoicesDB class Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Initializes the SQLite database connection and creates necessary tables. ```python class ImageChoicesDB: def __init__(self, db_path: Path): """Initialize image choices database""" self.db_path = db_path self.lock = threading.RLock() self.init_database() ``` -------------------------------- ### GET /api/overlayfiles Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Lists available overlay image files and fonts. ```APIDOC ## GET /api/overlayfiles ### Description Lists available overlay image files and fonts. ### Method GET ### Endpoint /api/overlayfiles ### Response #### Success Response (200) - **success** (boolean) - Status of the request - **files** (array) - List of files including name, type, extension, and size #### Response Example { "success": true, "files": [ { "name": "Colus-Regular.ttf", "type": "font", "extension": ".ttf", "size": 87484 }, { "name": "overlay-innerglow.png", "type": "image", "extension": ".png", "size": 42936 } ] } ``` -------------------------------- ### Initialize App Shell Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/frontend-components.md The root component managing routing, authentication state, and global providers. ```jsx export default function App() { // State management const [authenticated, setAuthenticated] = useState(false) const [isLoading, setIsLoading] = useState(true) // Routes defined via react-router-dom return ( } /> } /> } /> } /> {/* ... more routes */} ) } ``` -------------------------------- ### GET /api/manual-assets-gallery Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Returns a structure for the manual asset selector UI. ```APIDOC ## GET /api/manual-assets-gallery ### Description Returns a structure for the manual asset selector UI. ### Method GET ### Endpoint /api/manual-assets-gallery ### Response #### Success Response (200) - **libraries** (array) - List of libraries containing folders and assets - **total_assets** (integer) - Total count of assets #### Response Example { "libraries": [ { "name": "4K TV Shows", "folders": [ { "name": "Dexter - Original Sin (2024) [tvdb-430780]", "path": "4K TV Shows/Dexter - Original Sin (2024) [tvdb-430780]", "assets": [ { "name": "poster.jpg", "path": "4K TV Shows/Dexter - Original Sin (2024) [tvdb-430780]/poster.jpg", "type": "poster", "url": "/manual_poster_assets/4K%20TV%20Shows/Dexter%20-%20Original%20Sin%20%282024%29%20%5Btvdb-430780%5D/poster.jpg" } ], "asset_count": 1 } ], "folder_count": 3 } ], "total_assets": 226 } ``` -------------------------------- ### GET /api/assets-folders Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Returns a specific list of asset folders and their counts. ```APIDOC ## GET /api/assets-folders ### Description Returns a specific list of asset folders and their counts. ### Method GET ### Endpoint /api/assets-folders ### Response #### Success Response (200) - **folders** (array) - List of folders with name, path, file count, and size #### Response Example { "folders": [ { "name": "4K Movies", "path": "4K Movies", "files": 66, "size": 152763048 }, { "name": "TV Shows", "path": "TV Shows", "files": 13795, "size": 32606586825 } ] } ``` -------------------------------- ### POST /api/libraries/{plex|jellyfin|emby}/items Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Fetches library items from a specified media server. ```APIDOC ## POST /api/libraries/{plex|jellyfin|emby}/items ### Description Fetches library items from a specified media server. ### Method POST ### Endpoint /api/libraries/{plex|jellyfin|emby}/items ### Parameters #### Path Parameters - **{plex|jellyfin|emby}** (string) - Required - The type of media server ### Request Body - **library_id** (string) - Required - The ID of the library - **limit** (integer) - Optional - Number of items to return - **offset** (integer) - Optional - Offset for pagination ``` -------------------------------- ### GET /api/config-db/section/{section} Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Retrieves a specific configuration section from the database. ```APIDOC ## GET /api/config-db/section/{section} ### Description Retrieves the configuration data for a specified section. ### Method GET ### Endpoint /api/config-db/section/{section} ### Parameters #### Path Parameters - **section** (string) - Required - The name of the configuration section to retrieve. ``` -------------------------------- ### Configure Basic Authentication Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Enable and set credentials for Basic HTTP Authentication in the configuration file. ```json { "WebUI": { "basicAuthEnabled": true, "basicAuthUsername": "admin", "basicAuthPassword": "secure_password" } } ``` -------------------------------- ### SERVER_AUTH_FAILED JSON response Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/errors.md Example JSON response for an authentication failure. ```json { "detail": "Authentication failed for Plex server: Invalid token", "error_code": "SERVER_AUTH_FAILED" } ``` -------------------------------- ### List Overlay Files Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Returns a list of available overlay images and font files. ```json { "success": true, "files": [ { "name": "Colus-Regular.ttf", "type": "font", "extension": ".ttf", "size": 87484 }, { "name": "overlay-innerglow.png", "type": "image", "extension": ".png", "size": 42936 } ] } ``` -------------------------------- ### GET /api/logs-watcher/status Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Retrieves the current log file status and recent lines. ```APIDOC ## GET /api/logs-watcher/status ### Description Get current logs and watcher status. ### Method GET ### Endpoint /api/logs-watcher/status ### Response #### Success Response (200) - **log_file** (string) - Path to log file - **lines** (array) - Recent log lines - **status** (string) - Watcher status #### Response Example { "log_file": "/config/BackendServer.log", "lines": [ "2024-01-20 15:30:00 - INFO - Configuration loaded", "2024-01-20 15:31:45 - INFO - Processing 42 posters" ], "status": "running" } ``` -------------------------------- ### Configure Asset Paths Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Define directory paths for assets, backups, and manual overrides. ```json { "PrerequisitePart": { "AssetPath": "/assets", "BackupPath": "/assetsbackup", "ManualAssetPath": "/manualassets" } } ``` -------------------------------- ### GET /api/imagechoices/{title} Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Retrieves a specific image choice record by its title. ```APIDOC ## GET /api/imagechoices/{title} ### Description Get image choice record by title. ### Method GET ### Endpoint /api/imagechoices/{title} ### Parameters #### Path Parameters - **title** (string) - Required - The title of the image choice record ### Response #### Success Response (200) - **id** (integer) - Record ID - **Title** (string) - Record title - **Type** (string) - Media type - **LibraryName** (string) - Library name - **DownloadSource** (string) - Source of the download #### Response Example { "id": 1, "Title": "The Matrix", "Type": "movie", "LibraryName": "Movies", "DownloadSource": "tmdb" } ``` -------------------------------- ### GET /api/assets/overview Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Retrieve statistical overview of all assets, categorized by type and library. ```APIDOC ## GET /api/assets/overview ### Description Get overview statistics of assets. ### Method GET ### Endpoint /api/assets/overview ### Response #### Success Response (200) - **total_assets** (integer) - Total count of assets - **by_type** (object) - Statistics grouped by media type - **by_library** (object) - Statistics grouped by library #### Response Example { "total_assets": 1250, "by_type": { "poster": 800, "background": 250, "season": 150, "titlecard": 50 }, "by_library": { "Movies": 500, "TV Shows": 750 } } ``` -------------------------------- ### Implement Library Manager Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/frontend-components.md Handles browsing and selection of media server libraries across multiple server types. ```jsx export default function LibraryManager() { const [libraries, setLibraries] = useState([]) const [serverType, setServerType] = useState('plex') const [selectedLibrary, setSelectedLibrary] = useState(null) return (
{selectedLibrary && ( )}
) } ``` -------------------------------- ### Configure Text and Overlays Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Customize font settings, colors, and point sizes for generated overlays. ```json { "PosterOverlayPart": { "fontAllCaps": "true", "AddText": "true", "AddOverlay": "true", "fontcolor": "white", "bordercolor": "black", "minPointSize": "45", "maxPointSize": "300" } } ``` -------------------------------- ### GET /api/overlayfiles/preview/{filename} Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Retrieves a preview image for a specific overlay file. ```APIDOC ## GET /api/overlayfiles/preview/{filename} ### Description Get a preview image of an overlay file. ### Method GET ### Endpoint /api/overlayfiles/preview/{filename} ### Parameters #### Path Parameters - **filename** (string) - Required - Name of overlay file ### Response #### Success Response (200) - Returns a PNG/JPG image. ``` -------------------------------- ### Get database status Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Checks the connection and initialization status of the configuration database. ```http GET /api/config-db/status ``` ```json { "status": "ready", "initialized": true, "sections_count": 45 } ``` -------------------------------- ### GET /api/dashboard/all Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Retrieves a combined status, version, and system information for the dashboard. ```APIDOC ## GET /api/dashboard/all ### Description A combined endpoint used to populate the main dashboard (Status + Version + System Info). ### Method GET ### Endpoint /api/dashboard/all ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **status** (object) - Current running status. - **version** (object) - Version information. - **scheduler_status** (object) - Scheduler configuration. - **system_info** (object) - System hardware and platform info. #### Response Example { "success": true, "status": { "running": false, "manual_running": false, "scheduler_running": false, "active_log": "Scriptlog.log" }, "version": { "local": "2.1.15", "remote": "2.1.15", "is_update_available": false }, "scheduler_status": { "enabled": true, "next_run": "2025-11-25T19:30:00+01:00" }, "system_info": { "platform": "Linux", "cpu_cores": 8, "memory_percent": 15.0, "is_docker": true } } ``` -------------------------------- ### POST /api/overlay-creator/preview Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Generates a PNG image preview of an overlay based on provided parameters. ```APIDOC ## POST /api/overlay-creator/preview ### Description Generate a preview of an overlay with parameters. ### Method POST ### Endpoint /api/overlay-creator/preview ### Request Body - **overlay_file** (string) - Required - Filename of the overlay - **base_image** (string) - Required - Path to the base image - **text** (string) - Optional - Custom text to overlay - **font** (string) - Optional - Font filename - **font_color** (string) - Optional - Hex color code - **stroke_width** (integer) - Optional - Width of the text stroke ### Request Example { "overlay_file": "overlay-innerglow.png", "base_image": "/assets/Movies/poster.png", "text": "Custom Text", "font": "Colus-Regular.ttf", "font_color": "#FFFFFF", "stroke_width": 6 } ### Response #### Success Response (200) - Returns a PNG image preview. ``` -------------------------------- ### GET /api/other-media-export/runs Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Retrieves a list of timestamps for previous non-Plex export runs. ```APIDOC ## GET /api/other-media-export/runs ### Description Retrieves a list of timestamps for previous non-Plex export runs. ### Method GET ### Endpoint /api/other-media-export/runs ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **runs** (array) - List of timestamps. - **count** (integer) - Total number of runs. #### Response Example { "success": true, "runs": [], "count": 0 } ``` -------------------------------- ### Run Posterizarr in Testing Mode Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/blueprints.md Use this command to preview configuration changes without applying them to the entire library. ```powershell pwsh /app/Posterizarr.ps1 -Testing ``` -------------------------------- ### GET /api/plex-export/runs Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Retrieves a list of timestamps for previous Plex export runs. ```APIDOC ## GET /api/plex-export/runs ### Description Retrieves a list of timestamps for previous Plex export runs. ### Method GET ### Endpoint /api/plex-export/runs ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **runs** (array) - List of timestamps. - **count** (integer) - Total number of runs. #### Response Example { "success": true, "runs": [ "2025-11-25T16:31:22.63845", "2025-11-22T01:31:13.933402" ], "count": 8 } ``` -------------------------------- ### GET /api/plex-export/statistics Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Retrieves statistics regarding the Plex library export CSVs. ```APIDOC ## GET /api/plex-export/statistics ### Description Retrieves statistics regarding the Plex library export CSVs. ### Method GET ### Endpoint /api/plex-export/statistics ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **statistics** (object) - Contains total_runs, total_library_records, total_episode_records, and latest_run. #### Response Example { "success": true, "statistics": { "total_runs": 8, "total_library_records": 2315, "total_episode_records": 2145, "latest_run": "2025-11-25T16:31:22.63845" } } ``` -------------------------------- ### Import configuration Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Imports configuration settings from an uploaded JSON file. ```http POST /api/config/import Content-Type: multipart/form-data [binary file data] ``` ```json { "success": true, "imported_sections": 8 } ``` -------------------------------- ### Get Other Media Export Statistics Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Returns statistics for non-Plex media exports. ```json { "success": true, "statistics": { "total_runs": 0, "total_library_records": 0, "total_episode_records": 0, "latest_run": null } } ``` -------------------------------- ### Backup configuration Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/api-reference.md Creates a backup file of the current configuration. ```http POST /api/config/backup ``` ```json { "backup_file": "config.backup.2024-01-20.json", "timestamp": "2024-01-20T15:30:00Z" } ``` -------------------------------- ### Get API Status Source: https://github.com/fscorrupt/posterizarr/blob/main/docs/endpoints.md Returns the basic operational status of the API server. ```json { "message": "Posterizarr Web UI API", "status": "running" } ``` -------------------------------- ### View Directory Structure Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/QUICK-REFERENCE.md Overview of the file system layout inside the Docker container. ```text Inside Docker container: /config/ # Configuration directory ├── config.json # Main config file ├── config.db # Configuration database ├── Cache/ │ └── images/ # Cached images ├── logs/ │ └── BackendServer.log └── scheduler.json # Schedule definitions /assets/ # Generated assets ├── Movies/ │ ├── Movie Title/ │ │ ├── poster.png │ │ ├── background.png │ │ └── logo.png └── TV Shows/ └── ... /app/ # Application files ├── webui/ │ ├── backend/ │ │ └── main.py │ └── frontend/ │ └── dist/ └── Posterizarr.ps1 ``` -------------------------------- ### Initialize BasicAuthMiddleware Source: https://github.com/fscorrupt/posterizarr/blob/main/_autodocs/backend-modules.md Defines the constructor for the authentication middleware, requiring paths for configuration and database files. ```python class BasicAuthMiddleware(BaseHTTPMiddleware): def __init__(self, app, config_path: Path, db_path: Path): """ Initialize authentication middleware. Loads config from file and database. """ self.config_path = config_path self.db_path = db_path self.auth_db = ConfigDB(db_path, config_path) self.enabled = False self.username = "admin" self.password_hash = "" ```