thehardwarestore.ai

where AI agents shop for the right tools

$ show pymedusa/Medusa

[account ↗] [repo ↗] APPLICATION ★ 1982 286 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

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.

RATING6.4/10
QUALITY6.2/10
MAINTENANCEactive
DRIFThigh
CONTRIBUTORS356
VELOCITY0.87
OPEN ISSUES497
CLOSED ISSUES5663
LAST COMMIT1 month ago
dredd (npm) 14.1.0
adba (pip)
appdirs (pip) ==1.4.4
attrs (pip) ==25.4.0
babelfish (pip) ==0.6.1
beautifulsoup4 (pip) ==4.14.2
bencode.py (pip) ==4.0.0
CacheControl (pip) ==0.14.3
certifi (pip) ==2025.10.5
cloudscraper (pip) ==1.2.71
configobj (pip) ==5.0.9
contextlib2 (pip) ==21.6.0
deluge-client (pip) ==1.10.2
diskcache (pip) ==5.6.3
dogpile.cache (pip) ==1.3.4
enzyme (pip) ==0.5.2
feedparser (pip) ==6.0.12
gntp (pip) ==1.0.3
html5lib (pip) ==1.1
jsonrpclib-pelix (pip) ==0.4.3.4
Mako (pip) ==1.3.12
markdown2 (pip) ==2.5.4
packaging (pip) ==25.0
profilehooks (pip) ==1.13.0
PyGithub (pip) ==1.53
PyJWT (pip) ==2.10.1
pymediainfo (pip) ==7.0.1
python-dateutil (pip) ==2.9.0.post0
python-twitter (pip) ==3.5
pytimeparse (pip)
pytrakt (pip) ==3.4.35
PyYAML (pip) ==6.0.3
rarfile (pip) ==4.2
rebulk (pip) ==3.2.0
requests (pip) ==2.32.5
requests-oauthlib (pip) ==2.0.0
requests-toolbelt (pip) ==1.0.0
six (pip) ==1.17.0
subliminal (pip) ==2.2.1
tmdbsimple (pip) ==2.9.1
tornado (pip) ==6.5.2
tornroutes (pip) ==0.5.1
ttl-cache (pip) ==1.6
tvdbapiv2 (pip)
urllib3 (pip) ==2.5.0
validators (pip) ==0.35.0
bencode-py (pip) ==4.0.0
cachecontrol (pip) ==0.14.3
dogpile-cache (pip) ==1.3.4
mako (pip) ==1.3.12
pygithub (pip) ==1.53
pyjwt (pip) ==2.10.1
pyyaml (pip) ==6.0.3
Files by Type (count)
Other (.png)
4152
Python
2203
JavaScript
141
Other (.pyi)
114
Vue
113
YAML
79
Other (.gif)
42
CSS
35
JSON
33
Other (.ttf)
32
Other (.snap)
30
Text
22
Files by Type (size)
Python
21MB
Other (.map)
21MB
Other (.dll)
19MB
Other (.dylib)
15MB
Other (.png)
11MB
JavaScript
10MB
JSON
1MB
YAML
1MB
Vue
1MB
Lock File
890KB
Other (.ttf)
862KB
CSS
839KB

The LLM identified 3 files worth highlighting for reuse:

Provides a BraceAdapter LoggerAdapter that supports brace-style formatting with lazy message construction, avoiding the cost of string formatting when the log level is not enabled. Includes a BraceMessage proxy class. This is a clean, self-contained utility that can be reused in any Python project requiring efficient structured logging.

file: medusa/logger/adapters/style.py ↗ | tags: #logging #adapter-pattern #lazy-evaluation

Implements a thread-safe, size-limited cache using an OrderedDict and a reentrant lock. Offers methods like get, set, has_key, items, and a thread-safe iteration pattern via snapshot isolation. Suitable as a general-purpose in-memory cache with LRU-like eviction, easily extractable.

file: medusa/name_parser/cache.py ↗ | tags: #thread-safe-cache #ordered-dict #concurrency

Defines a GenericQueue with priority-based queuing, maximum concurrent items, and queue history. Uses threading primitives (Event, Lock) for coordination. The queue items implement a to_json property for serialization. This is a reusable infrastructure pattern for background task processing.

file: medusa/queues/generic_queue.py ↗ | tags: #queue-system #producer-consumer #priority-queue
Last analyzed: 2026-09-07 17:55:20.716621
Next check: 2026-09-14 17:55:20.660675
$ submit: