Commit Graph
39 Commits
Author SHA1 Message Date
nessi 806886da46 feat: expand language detection patterns with 8 additional languages and enhanced token matching
Add Italian/Portuguese/Korean/Chinese/Dutch/Russian to patterns list with standard/ISO 639-2 codes (ita/por/pt br/kor/chi/zho/nld/ned/rus). Enhance German patterns with " ger "/" deu " tokens and French with " français "/" fre " variants. Add corresponding language codes to codes dict (it/pt/ko/zh/nl/ru). Format patterns list with multi-line structure for readability
2026-08-17 19:33:39 +02:00
nessi d4c24f02d4 feat: add smart_serial() function to extract manufacturer serial numbers from SMART data with fallback chain and parallel execution
Add smart_serial() function with smartctl -i command execution, fallback to -d sat mode, and Serial Number: field regex extraction with WWN/0x prefix filtering to prefer physical serial over logical identifiers. Add serial_futures dict with service_check_executor.submit() calls for parallel serial reads alongside smart_futures/temperature_futures. Update raid_status() disk
2026-08-17 19:27:21 +02:00
nessi b275164be9 feat: add Linux PSI I/O pressure monitoring with real-time dashboard panel and auto-refresh on DOM mutations
Add io_pressure() function to parse /proc/pressure/io with line splitting, key-value extraction from some/full metrics, and OSError/ValueError exception handling returning available:False on failure. Add io_pressure() call to datastore_snapshot() return dict. Add DOMContentLoaded script to create #ioPressurePanel section with datastore-panel/io-pressure-panel classes, innerHTML with I/O-
2026-08-17 19:21:49 +02:00
nessi c6c2437732 refactor: prioritize Temperature_Celsius raw value extraction before unit-based parsing in SMART temperature detection
Swap Temperature_Celsius to first position in ordered list before Current Drive Temperature/Drive Temperature/Temperature: patterns. Add Temperature_Celsius.*-\s*(-?\d{1,3}) regex to extract raw value from attribute line with 0-150 range validation before falling back to explicit unit pattern matching to improve accuracy when both formatted and raw temperature values are present
2026-08-16 20:13:34 +02:00
nessi 01b6a7fd4e refactor: prioritize Current Drive Temperature and Temperature: field patterns over Temperature_Celsius in SMART parsing and reorder -x before -A in sat mode commands
Update temperature line matching to first search for Current Drive Temperature/Drive Temperature/Temperature: patterns, then append Temperature_Celsius lines, before falling back to generic temperature/airflow keywords. Swap smartctl -x -d sat command before -A -d sat in fallback chain to improve attribute detection on SATA drives behind
2026-08-16 20:12:28 +02:00
nessi c2e2f7552f feat: prioritize Temperature_Celsius over Airflow_Temperature in SMART parsing to prefer physical drive temperature
Reorder temperature line matching to first search for Temperature_Celsius/Drive_Temperature/Current Drive Temperature attributes before falling back to generic temperature/airflow keywords. Add ordered list construction with preferred patterns first, then append remaining temperature lines, to ensure physical drive temperature is selected over airflow sensor when both are present in
2026-08-16 20:11:34 +02:00
nessi f820a99c7c refactor: reorder smartctl command fallback chain to prioritize -d sat mode before standard commands
Move -d sat variants of -A and -x commands to front of fallback chain before non-sat equivalents in smart_temperature() function to improve compatibility with SATA drives behind USB/RAID controllers
2026-08-16 20:09:53 +02:00
nessi 9373e93e7f feat: improve SMART temperature parsing with multi-command fallback and enhanced line-based extraction logic
Replace regex pattern matching with extract() helper that iterates through output lines, filters for temperature/airflow keywords, and extracts values using explicit unit patterns (°C/Celsius/degrees C) with 0-150 range validation or fallback to last plausible number in line. Add smartctl -x/-x -d sat commands to fallback chain after -A/-A -d sat attempts with early return on first successful
2026-08-16 20:08:29 +02:00
nessi 310b36317e feat: add drive temperature monitoring with async updates and multi-pattern SMART parsing
Add smart_temperature() function with smartctl -A command execution, fallback to -d sat mode, and regex patterns for Temperature_Celsius/Airflow_Temperature_Cel/Drive_Temperature/Current Drive Temperature attributes plus Temperature: field parsing with 1-3 digit capture and °C formatting. Add temperature_futures dict with service_check_executor.submit() calls for parallel temperature reads alongside smart_futures. Add disk["
2026-08-16 20:07:19 +02:00
nessi 71752483f6 feat: add error_summary() helper to replace verbose exception tracebacks with concise German error messages
Add error_summary() function to format exceptions as single-line log messages with 240-char limit and special handling for requests.RequestException as "Dienst nicht erreichbar". Replace log.exception() calls with log.error() using error_summary() across service_monitor, scan_datastore_storage, sab_downloads, scan_one, start_scan, index, downloads, system, and datastore endpoints. Update user-facing error messages to German "momentan nicht verfügbar/
2026-08-16 17:31:21 +02:00
nessi 5723a5d2a0 feat: add service worker route with cache-control headers and update PWA manifest icons for proper maskable support
Add /sw.js route with send_from_directory to serve service worker from root scope with Service-Worker-Allowed:/ and Cache-Control:no-cache headers. Add navigator.serviceWorker.register() script to index.html with load event listener and scope:/ parameter. Update service worker cache to v4 with media-mark-192.svg/media-mark-512.svg additions to SHELL array.

Update manifest.json icons
2026-08-16 17:29:21 +02:00
nessi 44fbfaded4 feat: add RAID/storage error resilience with stale data fallback and parallel SMART health checks
Add datastore_cache raid/raid_at fields for RAID status caching with 60-second fallback window. Extract smart_status() function from raid_status() to enable parallel execution. Add ThreadPoolExecutor submission for SMART checks across all RAID disks with concurrent futures. Update SMART logging to check "PASSED" status explicitly instead of regex match presence. Add stale/warning fields to datastore_snapshot() when fresh
2026-08-16 12:34:26 +02:00
nessi cc7d719465 feat: add system load average, uptime, and process count to dashboard with responsive detail cards and iconify indicators
Add os.getloadavg() to system_metrics() with (0,0,0) fallback for AttributeError/OSError. Add /proc/uptime parsing for uptime_seconds with float conversion and 0 fallback. Add /proc process counting by iterating numeric entries with OSError exception handling. Add load/uptime_seconds/processes fields to /api/system response with rounded values.

Add DOMContentLoaded script to inject #
2026-08-16 12:32:08 +02:00
nessi 24b2a3a12f feat: add file-based logging with hourly rotation and configurable retention period
Add LOG_FILE and LOG_RETENTION_HOURS environment variables to .env.example with defaults /data/media-max.log and 6 hours. Install TimedRotatingFileHandler with hourly rotation, 1 backup, UTF-8 encoding, and UTC timestamps. Add OSError exception handling with warning log when file logging unavailable. Add warn_on_nonzero parameter to _read_command() with default True and disable for smartctl -H calls to suppress expected
2026-08-16 12:22:06 +02:00
nessi 02a5db61be feat: add udev serial detection, comprehensive logging, and SAT fallback for SMART health checks on RAID disks
Install udev package and mount /run/udev:/host-run-udev:ro for udev by-id symlink access. Add raid_log_state global to track RAID status changes and hardware_log_once set to prevent duplicate hardware warnings. Update scan_datastore_storage() with info/error logging for scan lifecycle and disk usage. Add _read_command() debug/warning/error logging for all subprocess calls with command text
2026-08-16 12:18:40 +02:00
nessi 10eb3a4191 feat: add /host-sys volume mount and HOST_SYS_PATH environment variable for sysfs serial fallback and SMART health detection
Add HOST_SYS_PATH=/host-sys to .env.example and app.py config with /host-sys default. Update _device_serial() to check HOST_SYS_PATH/class/block and HOST_SYS_PATH/block before fallback /sys paths for serial reads. Update raid_status() SMART regex to match both "SMART overall-health self-assessment test result" and "SMART Health Status" with case-insensitive flag for NVMe/SSD compatibility. Add /
2026-08-16 12:14:10 +02:00
nessi f7638dd5d5 feat: add sysfs serial fallback for RAID disks and responsive disk grid layout with improved styling
Add _device_serial() to read disk serials from /sys/class/block/{name}/device/serial and /sys/block/{name}/device/serial when lsblk cannot expose them in Docker containers. Update raid_status() to use sysfs fallback before defaulting to "—" for missing serials. Add .raid-disks 2-column grid with 6px gap, .raid-disk 7px/9px padding, .raid-disk small 1px top margin, and .raid-smart 85% opacity. Add mobile
2026-08-16 12:11:47 +02:00
nessi 0c922d4f5d feat: add human-readable RAID recovery formatting with German time units and improved member detection from mdstat
Add format_transfer_rate() to convert mdstat rates (e.g., 133628K/sec) into readable values like "130.5 MB/s" using 1024-based units. Add format_remaining_time() to convert mdstat durations (e.g., 450.1min) into compact German format like "7 Std. 30 Min." with day/hour/minute components. Update raid_status() to parse member devices directly from array_line in /proc/mdstat to avoid cross
2026-08-16 12:10:17 +02:00
nessi 5ddf506f20 feat: add datastore view with storage categories, RAID status monitoring, and live recovery tracking
Add scan_datastore_storage() to walk DATASTORE_PATH and categorize media by directory structure (movies/series/anime/kdrama/downloads/other) with size/file counts. Add raid_status() to parse /proc/mdstat and mdadm --detail for RAID level, active/failed devices, and recovery progress. Add /api/datastore endpoint with 15-minute cache for storage scans and live RAID updates. Install mdadm/util-linux/
2026-08-16 11:55:45 +02:00
nessi 42ed29ac51 refactor: rebrand application from "Radarr Language Dashboard" to "Media Max" across all files
Update project name from "Radarr Language Dashboard v2" to "Media Max" in README.md, docker-compose.yml service/container names, app.py logger name and service definition, manifest.json name/short_name/description, and templates/index.html title and header elements. Update docker exec command example in README to use new container name.
2026-08-15 13:06:54 +02:00
nessi d0c29b7a38 feat: add season zero visibility toggle in settings with dynamic filtering for Sonarr and missing episodes views
Add showSeasonZero checkbox in settings panel with toggle styling (42x23px switch, green when active). Implement applySeasonZeroPreference() to filter S00E episodes via .season-zero-hidden class and hide empty series with .season-zero-empty. Update missing count in nav badge and stats to exclude hidden season zero episodes. Add dynamic hint text toggle between "eingeblendet"/"ausgeblendet". Remove season zero exclusion from is_german_review_candidate() in app.py to
2026-08-15 12:53:19 +02:00
nessi e49216dca5 feat: add category-based grouping for Sonarr series with anime and K-drama tag detection
Add tag fetching from Sonarr API and category_for() function to classify series based on normalized tags (anime, kdrama, standard). Parse tag labels/names into normalized strings removing non-alphanumeric characters for matching. Add category and category_label fields to series groups.

Update index route to build series_categories list grouping series by category key (anime/Anime, kdrama/K-Dramen, standard/Standard) and pass
2026-08-15 12:37:58 +02:00
nessi d69f82d995 feat: add service status monitoring to dashboard with parallel health checks for 14 services
Add SERVICE_DEFINITIONS list with Radarr, Sonarr, SABnzbd, Jellyfin, Seerr, Prowlarr, Easynews as Indexer, qBittorrent, Bazarr, Lingarr, LibreTranslate, Sonarr-Prowlarr Proxy, Radarr-Prowlarr Proxy, and Dashboard. Add check_service() to perform HTTP/API health checks with configurable timeout. Add refresh_services() to run checks in parallel using service_check_executor ThreadPoolExecutor with 16 workers.
2026-08-15 12:28:14 +02:00
nessi a90b516f49 fix: replace glob() with iterdir() in external_subtitle_files() to handle square brackets in media filenames
Replace glob pattern matching with iterdir() + startswith() filtering to avoid glob interpreting square brackets (e.g., [Bluray-1080p]) as pattern characters. Add OSError exception handling to return empty list when directory access fails.
2026-08-14 14:32:28 +02:00
nessi 04ca437054 feat: merge external subtitle files with embedded subtitle languages in media row display
Update media_row() to combine embedded subtitle_languages from ffprobe with external subtitle files detected via external_subtitle_languages(). Apply unique_langs() to deduplicate language codes when local_path is available, ensuring both .mkv internal subs and external .srt/.ass files appear in the subtitle language list.
2026-08-14 14:30:22 +02:00
nessi 61d65d5988 feat: add external subtitle file detection with language parsing and cache invalidation on subtitle changes
Add EXTERNAL_SUBTITLE_EXTENSIONS set with common subtitle formats (.srt, .ass, .ssa, .vtt, .sub, .idx, .sup). Add external_subtitle_files() to glob subtitle files matching media stem and external_subtitle_languages() to parse language codes from filenames (de/deu/ger/german/deutsch, en/eng/english, fr/fra/fre/french/französisch, es/spa/spanish/spanisch, it/ita/italian/italienisch).

Update run_ffprobe() to merge external subtitle
2026-08-14 13:25:37 +02:00
nessi b5365170fb feat: add parallel file scanning with dedicated executor and support for scanning all sources simultaneously
Add scan_executor ThreadPoolExecutor with 4 workers for parallel file scanning. Import as_completed from concurrent.futures to process scan results. Replace sequential scan_one() loop with parallel futures submission and result collection using as_completed().

Update /api/rescan endpoint to accept "all" source parameter for scanning both Radarr and Sonarr simultaneously. Fix cache deletion
2026-08-14 13:22:15 +02:00
nessi bcefa02c32 feat: add dashboard insights section with media statistics and status cards showing file counts, missing items, and monitoring status
Add dashboard_stats dictionary to index() route calculating movie/episode totals, available files, missing items, and downloading counts. Pass stats to template for dashboard insights display.

Add dashboard-insights CSS grid with 4 insight cards showing media availability (movies/episodes), monitoring status, and live updates. Each card has color-coded icon with
2026-08-14 11:08:31 +02:00
nessi 7daee41f65 feat: rename "Daten" disk mount to "Medien" and consolidate Filme/Serien mount paths with explanatory comment
Add German comment explaining that Filme and Serien share the same host storage (/nesflix) and are made visible in the container via media mounts. Update mount_paths list to replace "Daten" label with "Medien" and combine Filme/Serien paths under single "Medien" label. Add dashboard-view CSS class with flex layout, min-height constraints, and increased disk-list gap for improved vertical
2026-08-13 16:42:20 +02:00
nessi 5912b7078c feat: add system metrics dashboard with live CPU, RAM, and disk usage monitoring plus service status overview
Add system_metrics() function to read CPU usage from /proc/stat with delta calculation, memory stats from /proc/meminfo, and disk usage for System/Daten/Filme/Serien mounts with device deduplication. Add /api/system endpoint returning metrics JSON with error handling.

Add dashboard view as default tab with hero section, 4-card overview grid showing movie/series/missing/download counts, system
2026-08-13 16:38:19 +02:00
nessi 3d4fb52fa3 feat: filter "Without German" tab to show only existing or downloading media and exclude season 0 episodes
Add is_german_review_candidate() helper function to filter media that exists locally or is currently being downloaded, excluding season 0 (specials) episodes. Apply filter to missing_german_movies and missing_german_series lists to show only actionable items. Update tab description text from "Kein deutsches Audio und keine deutschen Untertitel" to "Vorhanden oder wird gerade geladen · Staffel
2026-08-13 16:32:21 +02:00
nessi 05e32fb5af feat: add enhanced SABnzbd download dashboard with remaining data calculation and visual redesign
Add parse_size_bytes() and format_bytes() helper functions to convert and format file sizes. Calculate total remaining bytes from queue and include active_count, history_count, remaining_bytes, and formatted remaining in downloads API response. Update error responses to include new fields.

Add media-mark.svg favicon with gradient background, golden lines, and green checkmark. Replace text logo with inline
2026-08-13 16:28:10 +02:00
nessi 7b788f7dc8 feat: add "Without German" tab to filter media missing German audio or subtitles
Add new navigation tab showing count of movies and episodes without German tracks. Implement has_german_track() helper to check for German audio or subtitles. Filter movies and series to create missing_german_movies and missing_german_series lists passed to template. Add dedicated view section with tables for movies and series lacking German content, including empty state message. Update navigation translation logic
2026-08-13 16:25:57 +02:00
nessi 6da8204855 feat: add season dividers to series episode lists
Add visual separators between seasons in series episode tables. Extract season number from episode data and insert divider rows with "Staffel N" labels when season changes. Style dividers with dark background and subtle borders to improve readability of long episode lists.
2026-08-13 11:37:25 +02:00
nessi d252024dbc feat: improve download matching with fuzzy token-based algorithm and add downloading state styling
Replace exact title matching with token-based fuzzy matching that requires 75% of significant tokens (3+ chars) to match. Add "downloading" class to state column and apply purple badge styling to quality column for downloading items. Update download refresh to trigger markDownloading() and initialize download markers on page load.
2026-08-13 11:35:55 +02:00
nessi 6ab78ff9ad feat: mark missing files as pending and auto-mount series volume when Sonarr is active
Add "pending" flag to cached() error response for missing files to enable download status detection. Update docker-compose to always mount series volume with fallback default path instead of requiring manual uncomment. Update README to clarify that SERIES_MEDIA_VOLUME must point to actual host path when Sonarr is enabled.
2026-08-13 11:07:40 +02:00
nessi f78944795c feat: add SABnzbd download monitoring with language detection and source tracking
Add SABnzbd integration to display active and completed downloads with progress tracking, speed monitoring, and automatic language detection from release names. Downloads are matched against Radarr/Sonarr queues to identify source application. Add new Downloads tab in navigation, API endpoint for queue/history data, and auto-refresh every 4 seconds. Include configuration for SAB_URL and SAB_API_KEY in docker-compose and
2026-08-13 11:00:57 +02:00
nessi acbf3215bb feat: add Sonarr support with background scanning and progress tracking
Add Sonarr integration alongside existing Radarr functionality. Implement background ffprobe scanning with ThreadPoolExecutor, progress tracking API, and separate navigation for movies/series. Series are grouped by show with collapsible episodes. Reduce Gunicorn workers to 1, add scan status endpoint, and update README with Sonarr configuration instructions.
2026-08-13 10:49:39 +02:00
nessi 6ee9610b11 feat: add Radarr language dashboard with Docker support
Add a Flask-based dashboard for monitoring audio/subtitle languages in Radarr media files. Includes ffprobe integration for media analysis, SQLite caching, path mapping between Radarr and host filesystems, and a responsive web UI with filtering and statistics.
2026-08-13 10:46:45 +02:00