π Platform-Agnostic Download Solution - Native download support across Desktop, Mobile, Web, and Android TV platforms with seamless Stremio integration.
A legally compliant, privacy-first offline media solution that integrates seamlessly with Stremio across ALL your devices.
Imagine watching your favorite shows anywhere, anytime - even without internet. Offlinio transforms Stremio into a powerful offline media center while maintaining strict legal compliance and user privacy.
Modern streaming relies on constant internet connectivity. What happens when you're traveling, have limited bandwidth, or simply want to guarantee access to content you have rights to view? Traditional solutions either violate terms of service, compromise privacy, or require complex setup procedures.
Offlinio bridges this gap by creating a legal, automated, and seamless offline experience that works within existing legal frameworks while leveraging services you already use. Now with universal platform support - the same addon works identically across Desktop, Mobile, Web, and Android TV platforms.
"I have Stremio with Comet and Torrentio working perfectly. I have a Real-Debrid subscription. I want to click one button in Stremio and have content download for offline viewing - legally and automatically."
This simple request led to a complex technical challenge: How do you add download functionality to Stremio without modifying the application itself?
Our research revealed that Stremio's addon system provides everything needed for seamless integration:
- Stream Endpoints - Where users select video quality
- Catalog System - For organizing downloaded content
- Meta Endpoints - For series and episode management
- Addon Protocol - For legitimate third-party extensions
The breakthrough: Download options appear as stream choices, making the experience feel native to Stremio.
We performed comprehensive analysis of the Stremio Addon SDK to understand:
- Protocol Requirements - HTTP endpoints, response formats, CORS policies
- UI Integration Points - How addons appear in Stremio's interface
- Behavioral Hints - How to control stream presentation and functionality
- Cross-Platform Compatibility - Desktop, web, and mobile considerations
Key Insight: Stremio treats all content sources identically - whether they're streaming URLs or download triggers. This universal approach works seamlessly across ALL platforms where Stremio runs.
Based on SDK analysis, we chose a universal single addon architecture that:
- Appears as legitimate streams in Stremio's interface across ALL platforms
- Integrates with existing workflows users already understand on every device
- Requires zero UI development by leveraging Stremio's native interface
- Works identically on Desktop, Mobile, Web, and Android TV platforms
- Platform-agnostic operation - same functionality regardless of device type
Evaluated Approaches:
- β Browser Extension - Platform-specific, requires separate installation
- β Desktop Application - Breaks Stremio workflow, requires window switching
- β Stremio Modification - Violates terms of service, breaks updates
- β Addon Integration - Native experience, cross-platform, legitimate
Stream Presentation Strategy:
// Instead of external buttons, we provide stream options:
{
"streams": [
{
"name": "Download for Offline", // Appears as stream choice
"title": "Download this content to your device",
"url": "http://127.0.0.1:11471/download/tt1234567"
},
{
"name": "Downloading... (45%)", // Live progress updates
"title": "Download in progress - click to manage"
},
{
"name": "Play Offline (1080p)", // Local playback option
"title": "Play from your device (downloaded)"
}
]
}Auto-Detection Philosophy:
- Zero Configuration - Automatically detects available debrid services
- Privacy First - No external data transmission or account management
- Service Agnostic - Works with Real-Debrid, AllDebrid, Premiumize, etc.
- Fallback Support - Handles public domain content without debrid services
Data Minimization:
- No user tracking or analytics
- Local storage only - no cloud synchronization
- Encrypted sensitive data (API tokens, preferences)
- Sanitized logging - no personal information exposed
Security Measures:
- Input validation on all endpoints
- CORS policy enforcement for Stremio compatibility
- Path traversal protection for file serving
- Token encryption using system keychain
- Legal compliance middleware with mandatory acceptance
Built-in Safeguards:
- Mandatory Legal Notice - Cannot be bypassed, blocks all functionality until accepted
- DRM Detection - Automatically refuses encrypted content
- User Responsibility Model - Clear legal boundaries and user obligations
- No Content Indexing - Never catalogs, promotes, or suggests content
- Source Agnostic - Only processes user-supplied content identifiers
Acceptable Use Policy:
- β Personal backups of content you own
- β Public domain and Creative Commons materials
- β Content from authorized debrid services
- β Enterprise internal media
- β No DRM circumvention or unauthorized content
- Stremio SDK Analysis - Understanding addon capabilities and limitations
- Legal Framework Research - Establishing compliance boundaries
- Service Integration Study - Real-Debrid API capabilities and limitations
- Cross-Platform Testing - Ensuring universal compatibility
- Express Server Setup - Single-process addon server
- Database Design - Content tracking and download management
- Addon Protocol Implementation - Manifest, catalog, meta, and stream endpoints
- Auto-Detection Service - Multi-platform debrid service discovery
- Legal Notice System - Mandatory first-run compliance acceptance
- Privacy Controls - Data minimization and local-only processing
- Security Middleware - Input validation and path protection
- Error Handling - Graceful failure modes with user guidance
- Progress Tracking - Real-time download status in Stremio interface
- File Organization - Automatic Movies/Series folder structure
- Quality Selection - Intelligent best-quality automatic selection
- Recovery Systems - Robust error handling and retry mechanisms
// COMPONENT ARCHITECTURE
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USER'S SINGLE DEVICE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββββββ βββββββββββββββββββ β
β β Stremio App βββββΊβ Offlinio Server β β
β β (Frontend) β β (Backend) β β
β βββββββββββββββββββ βββββββββββββββββββ β
β β β β
β β HTTP Requests β File System Access β
β β (127.0.0.1:11471) β β
β βΌ βΌ β
β βββββββββββββββββββ βββββββββββββββββββ β
β β Stream Player β β Downloaded Filesβ β
β β (Video UI) β β (Movies/TV) β β
β βββββββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββStremio Desktop ββHTTPβββΊ localhost:11471 ββFileSystemβββΊ /Movies/
β² β β
β β Real-Debrid API β
β βΌ β
βββHTTP Streamββββββ Downloaded File βββββββββββββββββββ
Phone: Stremio Mobile ββWiFiβββΊ 192.168.1.100:11471
β
Computer: Offlinio Server ββFileSystemβββΊ /Movies/
β
βββReal-Debrid APIβββΊ HTTPS Download
Our addon acts as a protocol bridge between Stremio's limited capabilities and advanced download protocols:
// PROTOCOL FLOW DIAGRAM
User Clicks "Download for Offline"
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 1: Content ID Resolution β
β tt1234567:1:2 β IMDB ID + Season + Episode β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 2: Source Discovery (Comet Integration) β
β IMDB ID β Best Magnet Link (same as Stremio sees) β
β Result: magnet:?xt=urn:btih:abc123... β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 3: Protocol Translation (Real-Debrid) β
β magnet:?xt=... β https://download.real-debrid.com/file.mp4 β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 4: Local Download & Storage β
β HTTPS Download β /Movies/Title (Year).mp4 β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 5: Local HTTP Serving β
β /Movies/file.mp4 β http://localhost:11471/files/file.mp4 β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 6: Stremio Stream Integration β
β Appears as "Play Offline (1080p)" in stream selection β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ-- CONTENT TRACKING SYSTEM
Content Table:
βββ id (contentId from Stremio) β "tt1234567" or "tt1234567:1:2"
βββ type (movie/series) β Content classification
βββ title, year, season, episode β Metadata
βββ filePath β "/Movies/Title (Year).mp4"
βββ status β downloading/completed/failed
βββ progress β 0-100%
βββ seriesId β Groups episodes together
Download Table:
βββ id (downloadId) β Unique download job
βββ contentId β Foreign key to Content
βββ sourceUrl β Real-Debrid HTTPS URL
βββ downloadType β "http" or "magnet"
βββ progress, speedBps, etaSeconds β Real-time metrics
βββ status β queued/downloading/completed/failed
βββ timestamps β startedAt, completedAt
-- RELATIONSHIP EXAMPLES
Movie Content:
{
id: "tt0133093",
type: "movie",
title: "The Matrix",
year: 1999,
filePath: "Movies/The Matrix (1999).mp4",
status: "completed"
}
Series Episodes:
{
id: "tt0903747:1:1",
type: "series",
title: "Breaking Bad",
seriesId: "tt0903747",
season: 1,
episode: 1,
filePath: "Series/Breaking Bad/Season 1/Breaking Bad S01E01 - Pilot.mp4"
}STORAGE_ROOT/
βββ Movies/
β βββ The Matrix (1999).mp4
β βββ Inception (2010).mkv
β βββ Interstellar (2014).mp4
βββ Series/
β βββ Breaking Bad/
β β βββ Season 1/
β β β βββ Breaking Bad S01E01 - Pilot.mp4
β β β βββ Breaking Bad S01E02 - Cat's in the Bag.mp4
β β βββ Season 2/...
β βββ Game of Thrones/...
βββ .offlinio/
βββ offlinio.db β SQLite metadata
βββ logs/ β Application logs
βββ cache/ β Temporary files
-
One-Time Setup (< 2 minutes)
- Accept legal notice
- Choose storage location
- Optionally configure debrid service
- Install addon to Stremio
-
Daily Usage (Zero friction)
- Browse content normally in Stremio
- Click "Download for Offline" in stream selection
- Automatic detection and download begins
- Content appears in "Downloaded Movies/Series" catalogs
-
Offline Viewing
- Access downloaded content from Stremio catalogs
- Full seeking, pause, resume functionality
- Same interface as online streaming
Download Workflow:
User clicks "Download for Offline"
β
Auto-detect available debrid services
β
Get magnet links from same source as Stremio streams
β
Process through available debrid service
β
Download directly to local storage
β
Update Stremio catalogs with new content
Progressive Enhancement:
- Not Downloaded β Shows "Download for Offline" option
- Downloading β Shows "Downloading... (45%)" with live progress
- Downloaded β Shows "Play Offline" for local playback
- Multiple States β Can show several options simultaneously
Offlinio/ (Universal Platform Support)
βββ src/ # Universal source code
β βββ addon.ts # Stremio addon endpoints (ALL platforms)
β βββ server.ts # Express server with mobile API routing
β βββ routes/ # Platform-specific API routes
β β βββ mobile-api.ts # Mobile-optimized endpoints
β β βββ setup.ts # Universal setup endpoints
β βββ services/ # Cross-platform business logic
β β βββ catalog.ts # Content catalog management
β β βββ real-debrid-client.ts # Debrid service integration
β β βββ auto-debrid.ts # Service auto-detection
β β βββ legal-notice.ts # Legal compliance system
β β βββ comet-integration.ts # Universal content discovery
β β βββ notification-service.ts # Cross-platform notifications
β βββ ui/ # Multi-platform interfaces
β βββ index.html # Desktop web interface
β βββ mobile-index.html # Mobile-optimized interface
β βββ mobile.css # Touch-friendly styling
β βββ mobile.js # PWA functionality
β βββ sw.js # Service worker for offline support
βββ docs/ # Universal documentation
β βββ mobile-companion-app-integration.md # Mobile development guide
β βββ 01-concept/ # User stories and project vision
β βββ 02-discovery/ # SDK analysis and research
β βββ 03-implementation/ # Technical implementation guides
β βββ 04-security/ # Security and privacy documentation
β βββ 05-legal/ # Legal compliance framework
β βββ 06-deployment/ # Cross-platform deployment guides
βββ README-mobile.md # Mobile-specific documentation
βββ pwa-manifest.json # Progressive Web App configuration
βββ project-management/ # Planning and task tracking
βββ tests/ # Comprehensive testing suite
βββ prisma/ # Universal database schema
- Node.js 18+ and npm 9+
- Stremio (Desktop or Web)
- Optional: Debrid service account (Real-Debrid, AllDebrid, etc.)
# Clone and install
git clone https://github.com/your-username/offlinio.git
cd offlinio
npm install
# Set up environment
cp env.example .env
# Edit .env with your preferences (optional)
# Initialize database
npm run db:generate
npm run db:migrate
# Start the application
npm run devπ― Same addon URL works everywhere:
http://127.0.0.1:11471/manifest.json
Installation by Platform:
| Platform | Installation Method |
|---|---|
| π» Desktop Stremio | Add-ons β Add Addon β Enter URL above |
| π± Stremio Mobile | Use phone browser to visit URL, then add to Stremio |
| π Stremio Web | Visit: https://app.strem.io/shell-v4.4/?addon=http%3A%2F%2F127.0.0.1%3A11471%2Fmanifest.json |
| πΊ Android TV | Use TV browser or Stremio Android TV app |
π One-Click Installation:
# Quick install to Stremio Web (works from any device)
npm run start:launch- Legal Notice Acceptance - Required on first access (any platform)
- Storage Location Setup - Choose where to store downloads
- Debrid Service Configuration - Optional auto-detection of Real-Debrid, AllDebrid, etc.
- Platform Access Setup:
- π± Mobile: Install PWA from
http://127.0.0.1:11471/ui/mobile-index.html - π Web: Bookmark the interface for quick access
- πΊ TV: Bookmark or add to TV home screen
- π± Mobile: Install PWA from
- Start downloading content - Same "Download for Offline" experience everywhere!
π― BREAKTHROUGH: True Platform-Agnostic Solution!
| Platform | Status | Download Method | Interface |
|---|---|---|---|
| π» Desktop | β Native Support | Direct local downloads | Full-featured web UI |
| π± Mobile (Android) | β Native Support | PWA + Companion apps + Intent integration | Touch-optimized mobile UI |
| π± Mobile (iOS) | β PWA Support | Progressive Web App with offline capabilities | Mobile-optimized interface |
| π Web Browsers | β PWA Support | Service worker + background sync | Universal web interface |
| πΊ Android TV | β Native Support | TV-optimized interface | Remote-friendly navigation |
Single Server, Multiple Access Points:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OFFLINIO SERVER (One Instance) β
β http://127.0.0.1:11471 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β π‘ MULTIPLE ACCESS METHODS - SAME FUNCTIONALITY: β
β β
β π» Desktop Stremio βββ β
β π± Mobile Stremio βββΌβββΊ /manifest.json (Same addon!) β
β π Stremio Web βββΌβββΊ /stream/movie/tt123 (Same API!) β
β πΊ Android TV βββ β
β β
β π± PWA βββ β
β π± Companion Apps βββΌβββΊ /mobile/* (Mobile-optimized APIs) β
β π Web Browser βββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π» Desktop Platforms:
Windows/macOS/Linux:
βββ Stremio Desktop App β Native addon integration
βββ Offlinio Server (localhost) β Full download management
βββ Downloaded Files (local) β Organized Movies/Series folders
βββ Web UI (optional) β http://127.0.0.1:11471/ui/
βββ No internet required for playback
π± Mobile Platforms (Revolutionary!):
Android/iOS:
βββ Stremio Mobile App β Same addon experience as desktop!
βββ Progressive Web App β Install as native app
βββ Companion App Integration β offlinio:// URL schemes
βββ Real-time Progress β Push notifications & background sync
βββ Touch-optimized UI β Pull-to-refresh, mobile gestures
π Web Platform:
Any Modern Browser:
βββ Stremio Web β Full addon integration
βββ Progressive Web App β Offline capabilities
βββ Service Worker β Background download monitoring
βββ Cross-platform Sync β Same downloads across all devices
πΊ Android TV Platform:
Android TV:
βββ Stremio Android TV App β Native addon support
βββ TV-optimized Interface β Large text, remote navigation
βββ Download Management β Same functionality as desktop
βββ Local Playback β Direct file streaming
β
NO SERVER REQUIRED - Everything runs on your computer!
Your Computer:
βββ Download & run Offlinio
βββ Files stored locally
βββ Works offline
βββ Zero monthly costs
Perfect for: Personal use, privacy, offline viewing
β οΈ Your computer becomes the "server" for your devices
Your Computer (acts as server):
βββ Runs Offlinio 24/7
βββ Downloads & stores files
βββ Serves to other devices
Your Phone/Tablet:
βββ Connects via Wi-Fi
βββ Streams from your computer
Perfect for: Household sharing, multiple devices
π§ Optional for power users only
Your Home Server/NAS:
βββ Run Offlinio on server
βββ Central storage
βββ Always available
All Devices:
βββ Connect to home server
Perfect for: Tech enthusiasts, always-on setup
β What Users Need:
- Desktop: Just their computer (Windows/Mac/Linux)
- Mobile: Their computer + phone on same Wi-Fi
- No cloud hosting required
- No VPS or external servers needed
- No monthly hosting costs
- No technical server management
β What Users DON'T Need:
- External cloud hosting
- AWS/Google Cloud/Azure
- Monthly hosting fees
- Public IP addresses
- Domain names
- SSL certificates
- Multi-Service Support - Real-Debrid, AllDebrid, Premiumize, DebridLink
- Zero Configuration - Automatically finds and uses available services
- Graceful Fallback - Handles public domain content without debrid services
- Service Health Monitoring - Automatic failover between services
- Intelligent Organization - Movies and Series automatically categorized
- Quality Optimization - Automatic best-quality selection
- Metadata Integration - Rich content information and posters
- Search and Filtering - Find downloaded content quickly
- Local Processing Only - No data leaves your device
- Encrypted Storage - Sensitive information protected
- Minimal Logging - Only essential information recorded
- No Telemetry - Complete privacy by design
Technical Safeguards:
- Mandatory legal notice acceptance before any functionality
- Automatic DRM detection and blocking
- No content indexing, cataloging, or promotion
- User-supplied content identifiers only
- No circumvention tools or techniques
User Responsibilities:
- Must have legal rights to all downloaded content
- Compliance with local laws and regulations
- Respect for content creators and copyright holders
- No distribution or sharing of downloaded content
Supported Use Cases:
- Personal backups of owned physical media
- Public domain and Creative Commons content
- Content from authorized subscription services
- Educational and fair use scenarios
- Encryption at Rest - API tokens and sensitive data encrypted
- Secure Communication - HTTPS for all external API calls
- Input Validation - All user inputs sanitized and validated
- Path Protection - No directory traversal vulnerabilities
- CORS Configuration - Proper cross-origin policies for Stremio
- Rate Limiting - Protection against abuse and overload
- Error Handling - No sensitive information leaked in error messages
- Secure Defaults - Conservative security settings throughout
We welcome contributions that maintain our high standards for legal compliance, security, and user privacy. Please read our Contributing Guidelines before submitting any changes.
- Legal Compliance First - All contributions must respect legal boundaries
- Privacy by Design - No features that compromise user privacy
- Security Minded - Security considerations for all changes
- Quality Standards - Comprehensive testing and documentation required
MIT License - see LICENSE file for details.
This software is provided for personal, lawful use only. Users are responsible for:
- Having legal rights to all downloaded content
- Complying with applicable laws in their jurisdiction
- Respecting content creators and copyright holders
- Not using this tool for piracy or unauthorized distribution
The developers do not promote, encourage, or facilitate copyright infringement or any other illegal activity.
- Documentation: Comprehensive guides in the
/docsdirectory - Issues: Report bugs and request features via GitHub Issues
- Discussions: Ask questions and share experiences via GitHub Discussions
- Security: Report security vulnerabilities privately to the maintainers
Built with respect for:
- Stremio - For creating an extensible platform that enables legitimate addons
- Real-Debrid & Other Services - For providing legal content acceleration services
- Open Source Community - For the tools and libraries that make this possible
- Legal Content Creators - Whose work we aim to support through legitimate access
Offlinio - Making offline media accessible while respecting creators' rights.