04
An addon with files only.
No program: a few JSON files on any hosting with https. The app requests …/manifest.json, …/catalog/movie/open-movies.json and …/stream/movie/tt1727587.json, which are exactly these files:
the files
mi-addon/
├── manifest.json
├── catalog/
│ └── movie/
│ └── open-movies.json
└── stream/
└── movie/
├── tt1727587.json
├── tt1254207.json
└── tt2285752.json
manifest.json
{
"id": "org.example.open-movies-static",
"version": "1.0.0",
"name": "Open Movies (static example)",
"resources": ["catalog", "stream"],
"types": ["movie"],
"idPrefixes": ["tt"],
"catalogs": [{ "type": "movie", "id": "open-movies", "name": "Open movies" }]
}
stream/movie/tt1727587.json
{
"streams": [
{
"name": "Open Movies",
"title": "Sintel (2010) · Blender Foundation · CC BY 3.0",
"url": "https://download.blender.org/durian/movies/Sintel.2010.1080p.mkv"
}
]
}
- With
"idPrefixes": ["tt"], the app requests links with the IMDb id: file names that work on any system.
- The catalog is the one from the catalog guide. When the app requests the next page (
…/open-movies/skip=3.json), the host will reply 404: for the app, that's the end.
- A title without a link file returns 404: the app takes it that there are none.
05
Checking it.
From a terminal (on Windows, curl.exe works too):
terminal
curl -i https://tu-sitio.example/manifest.json
curl -i https://tu-sitio.example/stream/movie/tt1727587.json
curl -I -H "Range: bytes=0-0" https://download.blender.org/durian/movies/Sintel.2010.1080p.mkv
- The JSON files:
200, Content-Type: application/json and Access-Control-Allow-Origin: *.
- The video:
206 Partial Content (or 200), and not text/html.
- Make sure they reply quickly: the app waits 8 seconds to connect and 20 for the response (30 for the manifest).