This document serves as a persistent memory for GitHub Copilot to track project rules, goals, workflows, decisions, and roadblocks.
- Goal: Complete media center solution for ARM/x86 SBC on Linux.
- Technology Stack: Linux, Docker Compose (v2), ARM/x86 architecture.
- Repository: https://github.com/VenomekPL/MediaCenter.git
- Target Hardware: Raspberry Pi 5 8GB+ or equivalent (optimizing for 8GB-16GB, but functional on 4GB).
- Minimal: Radarr, Sonarr, Transmission.
- Extended: Minimal + Audiobookshelf, Lidarr, Prowlarr, FlareSolverr, Watchtower.
- Full: Extended + Home Assistant, Portainer, Jellyfin.
- Kodi: Media player (direct hardware access).
- Plugins: Elementum, Elementum Burst, Elementum Context Menu.
- Samba: File sharing.
- Git Workflow: Use
[email protected]/AngeIVfor commits. - Exclusions: Build data for Python, C++, and Shell scripts are ignored via
.gitignore. - Modular Structure: Each service in
modules/<service_name>/with its own configuration. - Configuration: Use
.envfor all passwords, paths, and environment-specific variables. - Scripts:
start.sh,stop.sh,update.shin the root directory. Other scripts inscripts/. - Automation:
start.shhandles hardware discovery, pre-seeding configurations, and native installation. - Pre-seeding: Default configurations for Transmission and *arr apps are stored in
configs/and processed byscripts/setup_configs.sh. - Service Linking:
scripts/link_services.shuses APIs to link Transmission, Prowlarr, and *arr apps automatically, and configures quality profiles/naming. - Documentation: Keep
README.mdupdated with any changes to profiles, services, or installation steps.
- Docker Compose v2: Utilizing profiles for installation levels.
- Native Kodi/Samba: Decided for better hardware integration and performance on SBCs.
- Elementum over Jackett: Using Kodi-native Elementum for torrent streaming.
- FlareSolverr: Added to handle Cloudflare challenges for indexers like 1337x.
- Watchtower: Included in Extended/Full for automated container updates.
- Hardlinks & Unified Root:
- Implemented "Unified Root" architecture to enable atomic moves and hardlinks.
- All containers mount the host's
DATA_ROOT_PATH(default:~) to/data. - Internal paths:
/data/Downloads,/data/Videos/Movies,/data/Videos/TvSeries. - This prevents double space usage and allows instant imports.
- Samba Strategy: Share only the organized
Videos,Music, andBooksfolders. TheDownloadsfolder remains hidden from the non-technical user to avoid confusion. - Cleanup:
scripts/cleanup.shis called byupdate.sh. It removes finished torrents via Transmission API and deletes "dangling" files (link count = 1) inDownloadsthat aren't in the library. - Library Audit:
scripts/library_audit.pyperforms deep audit: finds duplicates, re-hardlinks orphans, remaps anime absolute numbering, cross-checks Sonarr/Radarr tracking vs disk, and triggers rescans. Supports--dry-run. See.github/skills/media-library-cleanup/for the full cleanup skill. - Standardized Ports: All web interfaces mapped to the 8020-8028 range for consistency, while keeping Portainer on 9443.
- Docker & Docker Compose v2
- Linux (ARM/x86)
- Kodi & Samba (Native)
- *arr Suite (Radarr, Sonarr, Lidarr, Prowlarr)
- Transmission, Jellyfin, Home Assistant, Portainer, Audiobookshelf
- Elementum (Kodi Plugin)
- FlareSolverr
- Watchtower
- To be populated as encountered.
- Implement hardware discovery script (
scripts/discover_hardware.sh). - Automate
start.shto run discovery and native installation. - Configure Elementum in Kodi (via
scripts/install_native.sh). - Refine Samba configuration for media sharing.
- Implement Nginx Proxy Manager module.
- Implement Watchtower module.
- Automate Docker installation on any device.
- Automate service linking (Transmission, *arr, Prowlarr).
- Handle missing hardware devices gracefully in Docker Compose.