The basics
Add-ons are the heart of EMET Surf. They provide all the content you see - movies, TV shows, and other media. Think of them as content providers that tell the app what's available and where to find it.
Unlike some other apps, EMET Surf add-ons don't run on your computer. Instead, they're hosted on the internet like websites. This makes them safer and easier to use - you don't need to install anything locally.
Important: If your add-on is served via HTTP, you must include CORS headers so the app can access it.
The add-on philosophy
- Add-ons are designed to integrate existing content sources into EMET Surf, not compete with them
- You don't upload content to an add-on like YouTube - instead, you point to content that already exists
- Add-ons make it easy for users to discover and access content from various sources in one place
Manifest
Every add-on must follow the add-on API, and the most important part is the manifest.
The manifest is a JSON file that describes what your add-on can do - what types of content it provides, what features it supports, and how to use it.
Signing Manifest
To ensure the authenticity of an add-on, the manifest can be signed by its creator. Signing the manifest allows EMET Surf and other clients to verify that the manifest has not been tampered with and was indeed created by the add-on developer.
To sign a manifest:
- Create a private key using the provided tools.
- Use the signing functions from the toolset to sign the JSON manifest.
- The resulting signed manifest can then be distributed alongside the add-on.
Important: The private key must be kept secret. Anyone with access to the private key can impersonate the add-on creator. The signature should be generated only in a secure environment, and only the signed manifest is shared publicly.
Media structure
Add-ons organize content in a tree-like structure that's easy to understand:
Catalog
+-- Type (movie, series, etc.)
+-- Meta Item (specific movie/show)
+-- Videos (episodes for series)
+---+-- Streams (where to play the content)
Here's how it works:
- Catalogs are collections of content (like "Action Movies" or "Popular TV Shows")
- Types define the kind of content (movies, TV series, channels, live TV)
- Meta items are the actual movies, shows, or videos
- Videos are episodes (for series) or individual videos
- Streams tell the app where to find the actual media files
Resources
For EMET Surf to display your content, it needs to know where to find it. You declare this in your manifest by specifying which resources your add-on provides.
Each resource is accessed at a specific URL endpoint where your add-on responds with the right data.
| Resource | Endpoint | Description |
|---|---|---|
| manifest | /manifest.json | The add-on description and capabilities. |
| catalogs | /catalog/ | Lists of content organized by type. These appear in the main interface for users to browse. |
| metadata | /meta/ | Detailed information about a specific item (movie, show, etc.). Shows when users click on something. |
| streams | /stream/ | Tells the app where to find the actual media files (URLs, torrent hashes, etc.). |
| subtitles | /subtitles/ | Subtitles for the chosen media (optional). |
You can create these resources in any way that works for you:
- Static JSON files on your server
- Dynamic scripts that generate the data
- Database queries
- API calls to other services
The approach we'll use in this guide is static JSON files because it's simple and works well for learning. You can adapt this to any technology you prefer.
Summary
Now you understand:
- How add-ons work and why they're hosted online
- The tree-like structure of content organization
- The different resources and what they do
- Key features that make EMET Surf add-ons powerful
You're ready to start building! The next step is creating your first manifest.