This is a Kodi video addon (plugin.video.themoviedb.helper) that provides rich metadata enrichment, browsing, discovery, player resolution, and synchronization for movies and TV shows. It integrates with multiple external APIs including TMDb, Trakt, TVDb, MDbList, FanartTV, OMDb, and Gemini AI. The architecture follows the Kodi addon pattern with three entry points: a plugin for directory listings, a background service for monitoring and scrobbling, and a script for one-off actions. The codebase is heavily modular with over 200 Python files organized into API wrappers, caching layers, database factories, sync engines, player configuration, and UI dialogs. It features extensive SQLite caching with thread-safe mutex locks, a custom import hook for API key permissions, and a flexible player resolution system based on JSON configuration files. While primarily an application, it includes significant data engineering patterns for caching, incremental syncing, and data transformation.
IMDB-Trakt-Syncer is a Python CLI application that synchronizes user watchlists, ratings, reviews, and watch history bidirectionally between Trakt.tv and IMDb. The system uses the Trakt API (OAuth2) for all Trakt operations and Selenium WebDriver to automate browser interactions with IMDb, since IMDb lacks a public API for these operations. The architecture is a monolithic script with modular helper modules: credential management, Chrome/Chromedriver auto-download, Trakt data fetching, IMDb data scraping via CSV exports and page interaction, and robust error handling with retry logic. The main entry point is the `main()` function in `IMDBTraktSyncer/IMDBTraktSyncer.py`, which orchestrates the entire sync flow: version check, credential prompt, browser setup, data retrieval from both services, conflict resolution, and bidirectional sync execution. External dependencies include the `requests` library for Trakt API calls and `selenium` for browser automation; Chrome and Chromedriver binaries are automatically downloaded and cached. The tool supports optional features like removing watched items from watchlists, marking rated items as watched, and removing watchlist items older than a configurable number of days.
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.