$ account pymedusa
Medusa is an automatic TV show management and download application (PVR) that monitors RSS feeds, torrent indexers, and Usenet providers to search for, download, and manage TV episodes. It provides a full web UI (Vue.js frontend with Tornado backend), a REST API v2, background schedulers for daily and backlog searches, subtitle downloading, metadata generation for media centers (Kodi, Plex, Emby), and a wide array of notification services (Discord, Slack, Pushbullet, email, etc.). The codebase is structured around a monolith architecture with a plugin-like provider system for search sources and an event-driven queue for background tasks. The application is deployed as a self-contained Python package with a Docker image, bundling many third-party libraries (tornado, requests, guessit, subliminal, oauthlib, etc.) in the `ext/` and `lib/` directories to avoid external runtime dependencies. Entry points include `start.py`, `medusa/__main__.py`, and the Docker init scripts. The primary data flow involves periodic scheduler execution that queries configured providers, parses results via the `NameParser`, updates the local SQLite database, triggers post-processing when downloads complete, and notifies configured services. Despite its feature-rich nature, the repository suffers from significant technical drift. It carries heavy Python 2/3 compatibility shims (six, future, libfuturize), a large volume of vendored libraries at uncertain versions, and uses legacy frontend build tools (Bower, Grunt). The provider and notifier systems show duplication and fragility, and there are over 497 open issues, suggesting ongoing maintenance challenges. However, the core scheduling, search, and processing logic is functional and has been refined over years of development.