{"id":50351060,"url":"https://github.com/sonvice/stremio4kodi","last_synced_at":"2026-05-29T21:01:17.804Z","repository":{"id":360294545,"uuid":"1248576409","full_name":"sonvice/stremio4kodi","owner":"sonvice","description":"Stream movies and TV shows using Stremio community addons with full torrent support via Elementum.","archived":false,"fork":false,"pushed_at":"2026-05-25T19:37:10.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T21:27:12.062Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonvice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-24T20:27:47.000Z","updated_at":"2026-05-25T19:37:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sonvice/stremio4kodi","commit_stats":null,"previous_names":["sonvice/stremio4kodi"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sonvice/stremio4kodi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonvice%2Fstremio4kodi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonvice%2Fstremio4kodi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonvice%2Fstremio4kodi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonvice%2Fstremio4kodi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonvice","download_url":"https://codeload.github.com/sonvice/stremio4kodi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonvice%2Fstremio4kodi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33670211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-29T21:01:16.425Z","updated_at":"2026-05-29T21:01:17.783Z","avatar_url":"https://github.com/sonvice.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stremio for Kodi (plugin.video.stremio4kodi)\n\nStream movies and TV shows using Stremio community addons with full torrent support via Elementum.\n\n## Features\n\n- Browse movie and series catalogs from Stremio addons (Cinemeta, Torrentio, etc.)\n- Global search across all configured addons\n- Full series navigation: seasons → episodes → streams\n- Torrent resolution via Elementum or Quasar\n- Quality filtering and seed-based sorting\n- Local favorites and watch history\n- SQLite catalog caching with configurable TTL\n- Parallel addon querying for speed\n- Auto-play mode for the best available stream\n- Background service for cache cleanup\n\n---\n\n## Installation Guide\n\n### Prerequisites\n\n1. **Kodi 20 (Nexus)** or **Kodi 21 (Omega)** — tested on both\n2. **Elementum addon** installed and configured (for torrent playback)\n   - Install from: `https://github.com/elgatito/plugin.video.elementum`\n3. **CoreELEC / LibreELEC** recommended but works on any Kodi platform\n\n### Step-by-step Installation\n\n```bash\n# 1. Download or clone the addon\ngit clone https://github.com/stremio4kodi/plugin.video.stremio4kodi.git\n\n# 2. Zip the addon folder\ncd plugin.video.stremio4kodi/..\nzip -r plugin.video.stremio4kodi.zip plugin.video.stremio4kodi/\n\n# 3. Copy the zip to your Kodi device\nscp plugin.video.stremio4kodi.zip root@\u003ccoreelec-ip\u003e:/storage/\n\n# 4. In Kodi: Settings → Addons → Install from ZIP file\n#    Navigate to the zip and install\n\n# 5. Configure the addon: Addons → Video Addons → Stremio for Kodi → Settings\n```\n\n### Manual Installation (no zip)\n\n```bash\n# Copy directly to the Kodi addons directory\ncp -r plugin.video.stremio4kodi ~/.kodi/addons/\n\n# On CoreELEC:\ncp -r plugin.video.stremio4kodi /storage/.kodi/addons/\n\n# Restart Kodi\n```\n\n### First Configuration\n\n1. Open **Settings** in the addon\n2. Set your **Stremio addon URLs** (pipe-separated):\n   ```\n   https://v3-cinemeta.strem.io|https://torrentio.strem.fun\n   ```\n3. Select your **torrent engine** (Elementum recommended)\n4. Set **preferred quality** and **sort method**\n5. Done! Browse Movies or Series from the main menu.\n\n### Finding Stremio Addon URLs\n\nVisit [stremio-addons.net](https://stremio-addons.net/) or the Stremio addon catalog to find community addon URLs. Copy the base URL (before `/manifest.json`).\n\nPopular addons:\n| Addon | URL | Purpose |\n|-------|-----|---------|\n| Cinemeta | `https://v3-cinemeta.strem.io` | Metadata \u0026 catalogs |\n| Torrentio | `https://torrentio.strem.fun` | Torrent streams |\n| The Movie Database | `https://94c8cb9f702d-tmdb-addon.baby-beamup.club` | TMDB catalogs |\n\n---\n\n## Architecture \u0026 Module Reference\n\n```\nplugin.video.stremio4kodi/\n├── addon.xml                  # Kodi addon descriptor\n├── default.py                 # Entry point (3 lines)\n├── service.py                 # Background cache cleanup service\n├── resources/\n│   ├── settings.xml           # User-configurable settings\n│   ├── media/\n│   │   └── icon.png           # Addon icon\n│   ├── language/\n│   │   ├── resource.language.en_gb/strings.po\n│   │   └── resource.language.es_es/strings.po\n│   └── lib/\n│       ├── __init__.py\n│       ├── config.py          # Typed settings access\n│       ├── logger.py          # Centralized logging\n│       ├── cache.py           # SQLite DB (cache + favorites + history)\n│       ├── stremio.py         # Stremio HTTP API client\n│       ├── torrent.py         # Stream → playable URL resolver\n│       ├── ui.py              # ListItem/dialog builders\n│       └── router.py          # URL dispatcher (all navigation logic)\n```\n\n### Module Details\n\n#### `config.py` — Settings Access\nTyped static methods that read `settings.xml` values. Every other module imports `Config` instead of touching `xbmcaddon.Addon()` directly. This provides a single source of truth and makes testing easier.\n\n#### `logger.py` — Logging\nWraps `xbmc.log()` with the addon prefix and respects the user's log level setting. All modules call `log()` instead of using `print()` or `xbmc.log()` directly.\n\n#### `cache.py` — SQLite Database\nThree tables:\n- **cache**: Generic key/value store with TTL expiration. Used for catalogs, metadata, stream lists, and manifests.\n- **favorites**: User-saved movies and series with poster art.\n- **history**: Recently watched items with timestamps.\n\nUses WAL journal mode for concurrent read/write safety and thread-local connections.\n\n#### `stremio.py` — Stremio Client\nImplements the [Stremio Addon Protocol v3](https://github.com/Stremio/stremio-addon-sdk/blob/master/docs/protocol.md):\n- `get_manifest()` — Fetch addon capabilities\n- `get_catalog()` — List items from a catalog with pagination\n- `get_catalogs_for_type()` — Discover all catalogs across addons\n- `search()` — Global search with deduplication by IMDb ID\n- `get_meta()` — Detailed metadata (videos/episodes for series)\n- `get_streams()` — Aggregated, sorted stream list from all addons\n\nSupports parallel querying via `ThreadPoolExecutor` when enabled.\n\n#### `torrent.py` — Stream Resolver\nConverts Stremio stream objects into Kodi-playable URLs:\n- `magnet:` URIs → `plugin://plugin.video.elementum/play?uri=...`\n- HTTP `.torrent` files → same pattern\n- Direct HTTP streams → pass through\n- `infoHash` fields → constructs magnet with trackers\n\nAlso handles quality filtering, seed count extraction, and display label formatting.\n\n#### `ui.py` — UI Builders\nPure helper functions—no state:\n- `add_directory_item()` — Build a folder or playable ListItem with art, info tags, context menu\n- `end_directory()` — Finalize a directory listing\n- `show_notification()`, `show_input()`, `show_select()`, `show_progress()` — Dialog wrappers\n\n#### `router.py` — URL Dispatcher\nThe brain of the addon. Parses `sys.argv`, extracts the `action` parameter, and dispatches to the right handler. Contains all 16 action handlers:\n\n| Action | Screen |\n|--------|--------|\n| *(empty)* | Main menu |\n| `movies` | Movie catalog list |\n| `series` | Series catalog list |\n| `catalog` | Items in a catalog |\n| `seasons` | Season list |\n| `episodes` | Episode list |\n| `streams` | Stream selection |\n| `play` | Resolve \u0026 play |\n| `search` | Search dialog |\n| `search_results` | Search results |\n| `favorites` | Favorites list |\n| `toggle_favorite` | Add/remove favorite |\n| `history` | Watch history |\n| `clear_cache` | Wipe cache |\n| `clear_history` | Wipe history |\n| `settings` | Open settings |\n\n---\n\n## Navigation Flow\n\n```\nMain Menu\n├── Movies → Catalog list → Items → [Stream selection] → Play\n├── Series → Catalog list → Items → Seasons → Episodes → [Stream selection] → Play\n├── Search → [Type selector] → Results → ...\n├── Favorites → Items → ...\n├── History → Items → ...\n└── Settings\n```\n\n---\n\n## Torrent Engine Setup\n\n### Elementum (recommended)\n\n1. Install from the Elementum repository\n2. Configure: set download path, connection limits\n3. The addon will automatically route `magnet:` and `.torrent` links to Elementum\n\n### Quasar (alternative)\n\n1. Install Quasar\n2. Change **Torrent engine** to \"Quasar\" in addon settings\n\n---\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| No catalogs found | Check addon URLs in Settings. Ensure they end without `/` |\n| Streams don't play | Verify Elementum is installed and working independently |\n| AceStream doesn't play (Mobile/Android) | Change **AceStream Engine** from `Plexus` to `AceStream` or `AceWeb` in the addon settings. |\n| \"Stream not found\" / \"No streams found\" (CoreELEC / Kodi 19) | 1. Go to settings and select **Clear cache** to wipe corrupt data.\u003cbr\u003e2. Older Pythons on Kodi 19 might have SSL issues; make sure your Stremio URLs are correct and accessible.\u003cbr\u003e3. Verify Elementum is active. |\n| Slow loading | Enable \"Parallel addon queries\" in settings |\n| Stale data | Clear cache from Settings or reduce Cache TTL |\n| Debug logging | Set Log Level to \"Debug\" in settings, check `kodi.log` |\n\n---\n\n## Contributing\n\nContributions are welcome! Anyone is free to download, modify, and contribute to this project. If you make improvements or distribute this project, please ensure the original author is credited.\n\n---\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. \nYou are completely free to use, modify, and distribute this software, provided that you include the original copyright notice and credit the author.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonvice%2Fstremio4kodi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonvice%2Fstremio4kodi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonvice%2Fstremio4kodi/lists"}