1fe7392063
This commit adds comprehensive Sonarr webhook integration and implements critical security improvements identified in code review. ## Sonarr Integration - Full webhook support for Grab, Download, Rename, Delete, and Test events - HMAC SHA256 signature verification for webhook authentication - Series mapping system (Sonarr TVDB ID → Anime Provider URL) - 11 new API endpoints for configuration, mappings, search, and downloads - Comprehensive test suite (31 tests, all passing) - Complete documentation in docs/SONARR_INTEGRATION.md ## Security Enhancements - CORS restricted to specific origins (user's IP: 192.168.1.204:3000) - Path traversal prevention via sanitize_filename() and is_safe_filename() - Structured logging infrastructure (replaced all print() statements) - Environment-based configuration with .env support - Filename sanitization prevents malicious path attacks ## New Features - Lpayer and Sibnet downloader support - Kitsu API integration for anime metadata - Recommendation engine based on download history - Latest releases endpoint for new anime - Modular web interface with component-based templates ## Configuration - Centralized settings via app/config.py with pydantic-settings - Sonarr config auto-created in config/ directory - Example configurations provided for easy setup ## Tests - 31 Sonarr integration tests (23 functionality + 9 security) - 100+ tests passing in core test files - Security utilities fully tested ## Documentation - Updated CLAUDE.md with Sonarr and testing info - Added IMPROVEMENTS_2024-01-24.md analysis - Added SONARR_IMPLEMENTATION.md technical summary Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
34 lines
1.7 KiB
HTML
34 lines
1.7 KiB
HTML
<!-- Home Section: Recommendations & Latest Releases -->
|
|
<div id="tab-home" class="tab-content active">
|
|
<!-- Loading State -->
|
|
<div id="homeLoading" class="loading-spinner">Chargement des recommandations...</div>
|
|
|
|
<!-- Recommendations Section -->
|
|
<div id="recommendationsSection" style="display: none;">
|
|
<div class="section-header">
|
|
<h2>🎯 Recommandé pour vous</h2>
|
|
<button class="btn-small btn-secondary" onclick="loadRecommendations()">
|
|
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" style="width:14px;height:14px;">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
|
|
</svg>
|
|
Actualiser
|
|
</button>
|
|
</div>
|
|
<div id="recommendationsList" class="search-results"></div>
|
|
</div>
|
|
|
|
<!-- Latest Releases Section -->
|
|
<div id="releasesSection" style="display: none; margin-top: 40px;">
|
|
<div class="section-header">
|
|
<h2>🔥 Dernières sorties de la saison</h2>
|
|
<button class="btn-small btn-secondary" onclick="loadLatestReleases()">
|
|
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" style="width:14px;height:14px;">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
|
|
</svg>
|
|
Actualiser
|
|
</button>
|
|
</div>
|
|
<div id="releasesList" class="search-results"></div>
|
|
</div>
|
|
</div>
|