@stremio-addon/compat
This package is part of Stremio-Community/stremio-addon-sdk.
Drop-in compatibility layer for migrating from the official Stremio Addon SDK to the community Stremio Addon SDK.
Features
- 🔄 Easy migration - Drop-in replacement for the official SDK
- ✅ Compatible API - Same interface as
stremio-addon-sdk
- 🚀 Modern foundation - Powered by the new community SDK packages
Installation
pnpm add @stremio-addon/compat
Usage
Replace your import from stremio-addon-sdk with @stremio-addon/compat:
import { addonBuilder, serveHTTP, getRouter } from "stremio-addon-sdk";
import { addonBuilder, serveHTTP, getRouter } from "@stremio-addon/compat";
const builder = new addonBuilder(manifest);
builder.defineStreamHandler(async ({ type, id }) => {
return { streams: [...] };
});
serveHTTP(builder.getInterface(), { port: 3000 });
What's Included
This package provides:
addonBuilder - Compatible with the official SDK's addonBuilder
serveHTTP - Function to serve your addon over HTTP
getRouter - Express router factory
publishToCentral - Function to publish to the Stremio addon catalog
Migration Path
This compatibility package makes it easy to migrate gradually:
- Phase 1: Replace
stremio-addon-sdk with @stremio-addon/compat
- Phase 2: Gradually adopt new features from the community SDK
- Phase 3: Eventually migrate to direct usage of
@stremio-addon/sdk
For a detailed migration guide, see MIGRATION.md.
Architecture
Under the hood, this package uses:
Related Packages
License
MIT