Repository navigation
ShokoBridge v5.0.0 - The Complete Rewrite
This release marks a complete, ground-up rewrite of ShokoBridge, evolving it from a single monolithic script into a robust, modular, and maintainable application. The focus of this release is on reliability, testability, and a vastly improved user experience.
🏗️ Major Architectural Overhaul
Contrasting with the previous version, which was a single ~400-line script, the project is now a structured Python package with a clear separation of concerns:
- 📦 Monolith to Modular: The single
ShokoBridge.pyhas been replaced by ashokobridge/package. The core logic now resides inbridge.py, which orchestrates dedicated manager and client classes. - 📡 Dedicated Clients: API interactions are now handled by
clients/shoko.pyandclients/tmdb.py, which manage requests, caching, and data parsing. - 📁 Filesystem Abstraction: All file operations (linking, moving, cleaning) are now managed by
file_manager.py, which also handles transactional processing for media and supplemental files. - 🗃️ Database Manager: All SQLite logic is now encapsulated within
database.py, providing a clean interface for state management.
🧪 Unprecedented Reliability and Testing
For the first time, ShokoBridge has a comprehensive test suite, ensuring stability and preventing regressions.
- ✅ Full Test Coverage: Over 20 unit tests have been introduced, covering the core application logic, database operations, and file management.
- 🎭 Mocked Dependencies: Tests use extensive mocking to ensure they are fast, reliable, and independent of external services.
- 🛡️ Graceful Error Handling: The new architecture allows the application to handle errors gracefully, logging issues to a report file and continuing its run without crashing.
📚 Documentation and User Experience
The user-facing documentation and setup process have been completely revamped for clarity and ease of use.
- 📖 Overhauled
README.md: The documentation is now a comprehensive guide covering the "why," features, and a clear, step-by-step setup for both Docker and Manual installations. - 🐳 Streamlined Docker Setup: The
docker-compose.ymlis now clearer and better documented. All persistent data is centralized into a single./datavolume mount, simplifying setup and backups. - ⚙️ Clearer Configuration: The
config.jsonand its documentation have been refined to be more intuitive.
✨ Enhanced Features
- 🔄 Transactional File Groups: The script now processes a media file and all its supplemental files (e.g.,
.srt,.ass) as a single atomic unit. If any part fails, the entire group is rolled back. - 🧠 Smarter Fallbacks: The script now includes more intelligent fallback mechanisms, such as title-similarity matching for episodes that lack a direct TMDb ID.
- 🎬 Improved Movie Pathing: Correctly handles movie placement in a subfolder of the main destination if a separate movie destination is not specified.