Skip to content

Commit 25cc596

Browse files
author
Inside4ndroid
committed
docs: update README (unified stream schema, MoviesClub, registry mapping, docker run)\nchore(release): 1.0.4 tag prep\nchore: ignore restart.trigger and .vscode
1 parent ab18e06 commit 25cc596

19 files changed

+1697
-932
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
/node_modules
1+
/node_modules
2+
restart.trigger
3+
.vscode/

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.0.4] - 2025-09-18
6+
7+
### Added
8+
- New provider: `moviesclub` with registry mapping (`moviesclub.js``getMoviesClubStreams`).
9+
10+
### Changed
11+
- Unified provider stream schema across all providers:
12+
```json
13+
{ "title": "", "url": "", "quality": "", "provider": "", "headers": { } }
14+
```
15+
- Provider integration docs: When adding a provider, also add its exported function to `providerFunctionMap` in `providers/registry.js`.
16+
- README Docker quick run snippet updated to: `docker run -it -p 8787:8787 inside4ndroid/tmdb-embed-api:latest`.
17+
18+
### Documentation
19+
- README: Updated Providers section, unified schema example, MoviesClub listed, registry mapping instructions, and badge version.
20+
521
## [1.0.3] - 2025-09-17
622

723
### Fixed
@@ -46,6 +62,7 @@ All notable changes to this project will be documented in this file.
4662
- Initial stable release.
4763

4864
[1.0.3]: https://github.com/Inside4ndroid/TMDB-Embed-API/compare/v1.0.2...v1.0.3
65+
[1.0.4]: https://github.com/Inside4ndroid/TMDB-Embed-API/compare/v1.0.3...v1.0.4
4966
[1.0.2]: https://github.com/Inside4ndroid/TMDB-Embed-API/compare/v1.0.1...v1.0.2
5067
[1.0.1]: https://github.com/Inside4ndroid/TMDB-Embed-API/compare/v1.0.0...v1.0.1
5168

README.md

Lines changed: 72 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<img src="https://img.shields.io/badge/Node.js-18%2B-brightgreen?style=flat" />
77
<img src="https://img.shields.io/badge/Status-Active-success?style=flat" />
88
<img src="https://img.shields.io/badge/License-MIT-blue?style=flat" />
9-
<img src="https://img.shields.io/badge/Version-1.0.3-informational?style=flat" />
9+
<img src="https://img.shields.io/badge/Version-1.0.4-informational?style=flat" />
1010
<img src="https://img.shields.io/docker/pulls/inside4ndroid/tmdb-embed-api?label=Docker%20Pulls&style=flat" />
1111
</p>
1212

@@ -34,14 +34,15 @@
3434

3535
## ✨ Features
3636
- **Multi‑TMDB Key Rotation** – Supply multiple API keys; one is chosen randomly per request.
37-
- **Provider Aggregation** – Pluggable providers (Showbox, 4khdhub, MoviesMod, MP4Hydra, VidZee, Vixsrc, Xprime) with per‑provider enable toggles + default selection.
37+
- **Provider Aggregation** – Pluggable providers (Showbox, 4khdhub, MoviesMod, MP4Hydra, VidZee, Vixsrc, Xprime, MoviesClub) with per‑provider enable toggles + default selection.
38+
- **🔥 Plugin System** – Drop new provider files in `providers/` and add its exported function to the registry map (`providers/registry.js``providerFunctionMap`).
3839
- **Dynamic Filtering** – Minimum quality presets, custom JSON quality map, codec exclusion rules (presets + JSON).
3940
- **Runtime Overrides UI** – Fully interactive web admin at `/` (login protected) writing to `utils/user-config.json`.
4041
- **Session Auth + Rate Limiting** – Login system with brute‑force lockouts, logout, password change.
4142
- **Status & Health Panel** – Live metrics, provider status, endpoint list, functional provider checks.
4243
- **Config Propagation** – Overrides mirrored to `process.env` for legacy compatibility (no `.env` required after first save).
4344
- **Back‑Navigation Safe** – Cache-control + visibility/session revalidation.
44-
- **Extensible** – Simple provider registry pattern.
45+
- **Extensible** – Simple drop-in provider plugin system.
4546

4647
---
4748

@@ -79,6 +80,11 @@ docker run --name tmdb-embed-api -p 8787:8787 \
7980
inside4ndroid/tmdb-embed-api:latest
8081
```
8182

83+
Or the minimal quick-test run:
84+
```bash
85+
docker run -it -p 8787:8787 inside4ndroid/tmdb-embed-api:latest
86+
```
87+
8288
Persist overrides (Windows PowerShell example) by mounting a local file:
8389
```powershell
8490
New-Item -ItemType File -Path .\utils\user-config.json -Force | Out-Null
@@ -202,22 +208,64 @@ Session is revalidated on visibility and back/forward navigation to prevent stal
202208
---
203209

204210
## 🔌 Providers
205-
Current built‑in providers:
206-
- `showbox`
207-
- `4khdhub`
208-
- `moviesmod`
209-
- `mp4hydra`
210-
- `vidzee`
211-
- `vixsrc`
212-
- `xprime`
213-
214-
You can enable/disable and mark defaults via the Provider Matrix in the UI. If **no defaults** are selected, all enabled providers participate in aggregation.
215-
216-
### Adding a New Provider (Outline)
217-
1. Create `providers/myprovider.js` exporting an async fetch function (see existing files for patterns).
218-
2. Lazy‑load it in `providers/registry.js` similar to others.
219-
3. Add a config flag (`enableMyproviderProvider`) if you want toggle support.
220-
4. Update the provider matrix arrays in `public/index.js`.
211+
The API supports a plugin system. Drop a new provider file in the `providers/` folder and register its exported function in `providers/registry.js` under `providerFunctionMap`.
212+
213+
### Current Built-in Providers
214+
- `showbox` - Showbox/PStream integration
215+
- `4khdhub` - 4KHDHub streams
216+
- `moviesmod` - MoviesMod streams
217+
- `mp4hydra` - MP4Hydra streams
218+
- `vidzee` - VidZee streams
219+
- `vixsrc` - Vixsrc streams
220+
- `xprime` - Xprime streams
221+
- `uhdmovies` - UHD Movies streams
222+
- `moviesclub` - MoviesClub streams
223+
224+
### Adding a New Provider
225+
1. **Create** `providers/yourprovider.js` with your stream fetching logic
226+
2. **Export** a function like `getYourproviderStreams(tmdbId, mediaType, season, episode)`
227+
3. **Register** it in `providers/registry.js``providerFunctionMap`:
228+
```js
229+
// providers/registry.js
230+
const providerFunctionMap = {
231+
'Showbox.js': 'getStreamsFromTmdbId',
232+
'4khdhub.js': 'get4KHDHubStreams',
233+
'moviesmod.js': 'getMoviesModStreams',
234+
'MP4Hydra.js': 'getMP4HydraStreams',
235+
'VidZee.js': 'getVidZeeStreams',
236+
'vixsrc.js': 'getVixsrcStreams',
237+
'xprime.js': 'getXprimeStreams',
238+
'uhdmovies.js': 'getUHDMoviesStreams',
239+
'moviesclub.js': 'getMoviesClubStreams',
240+
'yourprovider.js': 'getYourproviderStreams'
241+
};
242+
```
243+
4. The provider will appear in the admin UI with an enable/disable toggle.
244+
245+
**Example Provider (Unified Output):**
246+
```javascript
247+
async function getYourproviderStreams(tmdbId, mediaType, season, episode) {
248+
// Your scraping/API logic here
249+
return [{
250+
title: "Fight Club - 1080p [YourProvider #1]",
251+
url: "https://stream.url/video.mp4",
252+
quality: "1080p",
253+
provider: "yourprovider",
254+
headers: { "User-Agent": "Mozilla/5.0" }
255+
}];
256+
}
257+
258+
module.exports = { getYourproviderStreams };
259+
```
260+
261+
> **⚠️ Important**: All providers must return streams in the unified JSON format to ensure compatibility with filtering and aggregation.
262+
263+
The system automatically:
264+
- ✅ Detects new provider files
265+
- ✅ Adds enable/disable toggles in the admin UI
266+
- ✅ Includes them in stream aggregation
267+
- ✅ Applies filtering and quality controls
268+
- ✅ No core file edits required!
221269

222270
---
223271

@@ -238,18 +286,14 @@ Aggregate endpoint auto-resolves IMDb when needed and merges provider output bef
238286

239287
---
240288

241-
## 🧪 Stream Object Shape (Typical)
289+
## 🧪 Stream Object Schema (Unified)
242290
```json
243291
{
244-
"title": "Example Title",
245-
"url": "https://...",
292+
"title": "Fight Club - 1080p [MP4Hydra #2]",
293+
"url": "https://stream.url/video.mp4",
246294
"quality": "1080p",
247-
"provider": "showbox",
248-
"size": null,
249-
"languages": ["en"],
250-
"subtitles": [],
251-
"codecs": ["H264"],
252-
"headers": { "Referer": "..." }
295+
"provider": "mp4hydra",
296+
"headers": { "User-Agent": "Mozilla/5.0" }
253297
}
254298
```
255299

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tmdb-embed-api",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Standalone streaming embed source aggregation API (TMDB ID in, streams out)",
55
"main": "apiServer.js",
66
"scripts": {

0 commit comments

Comments
 (0)