@media-engine/providers 1.8.1 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +172 -164
- package/README.ru.md +178 -170
- package/dist/aderom-streaming/index.d.ts +8 -0
- package/dist/aderom-streaming/index.js +168 -0
- package/dist/aderom-streaming/index.js.map +1 -0
- package/dist/cinemeta/index.js +15 -6
- package/dist/cinemeta/index.js.map +1 -1
- package/dist/identity/aderom.d.ts +7 -0
- package/dist/identity/aderom.js +49 -0
- package/dist/identity/aderom.js.map +1 -0
- package/dist/identity/anime.d.ts +9 -0
- package/dist/identity/anime.js +155 -0
- package/dist/identity/anime.js.map +1 -0
- package/dist/identity/kinobd.d.ts +7 -0
- package/dist/identity/kinobd.js +54 -0
- package/dist/identity/kinobd.js.map +1 -0
- package/dist/identity/wikidata.d.ts +7 -0
- package/dist/identity/wikidata.js +117 -0
- package/dist/identity/wikidata.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/initem-streaming/index.d.ts +7 -0
- package/dist/initem-streaming/index.js +93 -0
- package/dist/initem-streaming/index.js.map +1 -0
- package/dist/package-version.d.ts +2 -2
- package/dist/package-version.js +1 -1
- package/dist/package-version.js.map +1 -1
- package/dist/shikimori/index.js +52 -10
- package/dist/shikimori/index.js.map +1 -1
- package/dist/tmdb/index.d.ts +7 -0
- package/dist/tmdb/index.js +206 -0
- package/dist/tmdb/index.js.map +1 -0
- package/dist/veoveo-streaming/client.js +2 -1
- package/dist/veoveo-streaming/client.js.map +1 -1
- package/dist/veoveo-streaming/config.js +2 -1
- package/dist/veoveo-streaming/config.js.map +1 -1
- package/dist/veoveo-streaming/index.js +3 -2
- package/dist/veoveo-streaming/index.js.map +1 -1
- package/dist/veoveo-streaming/mapping.js +1 -1
- package/dist/veoveo-streaming/mapping.js.map +1 -1
- package/dist/videohub-streaming/client.js +4 -29
- package/dist/videohub-streaming/client.js.map +1 -1
- package/dist/videohub-streaming/config.js +2 -1
- package/dist/videohub-streaming/config.js.map +1 -1
- package/dist/videohub-streaming/index.js +6 -20
- package/dist/videohub-streaming/index.js.map +1 -1
- package/dist/videohub-streaming/mapping.d.ts +1 -2
- package/dist/videohub-streaming/mapping.js +0 -49
- package/dist/videohub-streaming/mapping.js.map +1 -1
- package/package.json +5 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Media Engine contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,164 +1,172 @@
|
|
|
1
|
-
# @media-engine/providers
|
|
2
|
-
|
|
3
|
-
**English** | [Русский](https://github.com/Yaneart/media-engine/blob/main/packages/providers/README.ru.md)
|
|
4
|
-
|
|
5
|
-
Ready-to-use data sources for Media Engine. Install this package when you want to search real public
|
|
6
|
-
catalogs without writing provider adapters yourself.
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npm install @media-engine/core @media-engine/providers
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
The built-in providers do not need your API keys.
|
|
15
|
-
|
|
16
|
-
## Search metadata
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
import { MediaEngine } from "@media-engine/core";
|
|
20
|
-
import {
|
|
21
|
-
aniListProvider,
|
|
22
|
-
cinemetaProvider,
|
|
23
|
-
kinobdProvider,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
Shikimori
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- `
|
|
64
|
-
- `
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
1
|
+
# @media-engine/providers
|
|
2
|
+
|
|
3
|
+
**English** | [Русский](https://github.com/Yaneart/media-engine/blob/main/packages/providers/README.ru.md)
|
|
4
|
+
|
|
5
|
+
Ready-to-use data sources for Media Engine. Install this package when you want to search real public
|
|
6
|
+
catalogs without writing provider adapters yourself.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @media-engine/core @media-engine/providers
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The built-in providers do not need your API keys.
|
|
15
|
+
|
|
16
|
+
## Search metadata
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { MediaEngine } from "@media-engine/core";
|
|
20
|
+
import {
|
|
21
|
+
aniListProvider,
|
|
22
|
+
cinemetaProvider,
|
|
23
|
+
kinobdProvider,
|
|
24
|
+
tmdbProvider,
|
|
25
|
+
shikimoriProvider,
|
|
26
|
+
} from "@media-engine/providers";
|
|
27
|
+
|
|
28
|
+
const media = new MediaEngine({
|
|
29
|
+
providers: [
|
|
30
|
+
kinobdProvider(),
|
|
31
|
+
tmdbProvider(),
|
|
32
|
+
cinemetaProvider(),
|
|
33
|
+
shikimoriProvider(),
|
|
34
|
+
aniListProvider(),
|
|
35
|
+
],
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const result = await media.search({ title: "One Piece" });
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Connect only the sources your application needs. The engine calls suitable providers and merges
|
|
42
|
+
matching results for you.
|
|
43
|
+
|
|
44
|
+
Shikimori and AniList also support explicit anime relationships:
|
|
45
|
+
|
|
46
|
+
Shikimori details normalize the first usable full-size screenshot as a landscape `backdrop` and
|
|
47
|
+
preserve the remaining screenshots as `still` images. AniList's wider banner remains a fallback.
|
|
48
|
+
For merged anime posters, Core prefers AniList's higher-resolution `coverImage.extraLarge` when
|
|
49
|
+
providers do not expose dimensions.
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
const relations = await media.getRelatedMedia({
|
|
53
|
+
shikimori: "52991",
|
|
54
|
+
type: "anime",
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The response preserves prequel, sequel, side-story, and other official relation kinds without
|
|
59
|
+
grouping titles by franchise-name heuristics.
|
|
60
|
+
|
|
61
|
+
Available metadata providers:
|
|
62
|
+
|
|
63
|
+
- `tmdbProvider()` for localized movie and series metadata through a public Stremio addon;
|
|
64
|
+
- `kinobdProvider()` and `cinemetaProvider()` as independent movie and series sources;
|
|
65
|
+
- `shikimoriProvider()` and `aniListProvider()` for anime;
|
|
66
|
+
- `tvMazeProvider()` and `wikidataProvider()` as additional identity sources;
|
|
67
|
+
- `imdbDatasetProvider()` for an IMDb dataset managed by your application.
|
|
68
|
+
|
|
69
|
+
TVmaze data requires attribution. Keep and display the TVmaze source link included in a result. See
|
|
70
|
+
the [TVmaze API license](https://www.tvmaze.com/api#licensing).
|
|
71
|
+
|
|
72
|
+
`tmdbProvider()` uses the public [TMDB Stremio addon](https://github.com/mrcanelas/tmdb-addon)
|
|
73
|
+
and needs no user token. Its host can be changed with `baseUrl`; Cinemeta continues to work if
|
|
74
|
+
the addon is unavailable. Applications displaying TMDB data should follow
|
|
75
|
+
[TMDB's attribution requirements](https://developer.themoviedb.org/docs/faq).
|
|
76
|
+
|
|
77
|
+
The optional SQLite-backed IMDb dataset tools need Node.js 22.13 or newer. Everything else in the
|
|
78
|
+
package keeps the normal Node.js 20 baseline.
|
|
79
|
+
|
|
80
|
+
## Find player options
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
import {
|
|
84
|
+
flixHqStreamingProvider,
|
|
85
|
+
kinobdStreamingProvider,
|
|
86
|
+
} from "@media-engine/providers";
|
|
87
|
+
|
|
88
|
+
const media = new MediaEngine({
|
|
89
|
+
streamingProviders: [kinobdStreamingProvider(), flixHqStreamingProvider()],
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const result = await media.getAvailability({
|
|
93
|
+
type: "series",
|
|
94
|
+
title: "Game of Thrones",
|
|
95
|
+
seasonNumber: 1,
|
|
96
|
+
episodeNumber: 1,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
for await (const snapshot of media.getAvailabilityProgressively({
|
|
100
|
+
type: "series",
|
|
101
|
+
ids: { kinopoisk: "435" },
|
|
102
|
+
seasonNumber: 1,
|
|
103
|
+
episodeNumber: 1,
|
|
104
|
+
})) {
|
|
105
|
+
updatePlayerSources(snapshot.availability?.options ?? []);
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The package also exports `ddbbStreamingProvider()`, `aniLibertyStreamingProvider()`,
|
|
110
|
+
`filmixStreamingProvider()`, `veoVeoStreamingProvider()`, `videoHubStreamingProvider()`,
|
|
111
|
+
`rutubeStreamingProvider()`, and
|
|
112
|
+
`experimentalStreamingProvider()`.
|
|
113
|
+
Add them explicitly when they fit your application. Filmix guest mode is capped at 480p and filters
|
|
114
|
+
known copyright/service placeholder videos. A user-owned device token raises the cap to 720p.
|
|
115
|
+
Authenticated mode requires an HTTPS `baseUrl` unless the application explicitly enables
|
|
116
|
+
`allowInsecureHttpToken` for a local compatibility test. That override sends the token without TLS
|
|
117
|
+
and must not be used in a public deployment. Returned CDN video URLs use HTTPS. VeoVeo uses DDBB only to resolve its
|
|
118
|
+
public content ID, discards the iframe token, and returns direct signed HTTPS HLS. VideoHUB uses a Kinopoisk ID and returns
|
|
119
|
+
short-lived direct MP4 qualities for movies or one exact series episode. VeoVeo and VideoHUB accept
|
|
120
|
+
anime only when the query carries the confirmed `animeKind: "movie"`; episodic anime is left to
|
|
121
|
+
anime-compatible providers. Their anime-film responses preserve `type: "anime"`. VideoHUB links are bound to the
|
|
122
|
+
playback User-Agent and may also be bound to the requesting public IP. Pass the playback client's
|
|
123
|
+
exact User-Agent as `MediaEngineOperationOptions.playbackUserAgent`; the required value is retained
|
|
124
|
+
in each option's `access.headers` for non-browser clients.
|
|
125
|
+
VideoHUB implements progressive availability, so every resolved translation can be displayed before
|
|
126
|
+
slower lookups finish. Its bounded warm cache keeps playlists and signed video resolutions separate,
|
|
127
|
+
never serves signed links stale, and preserves their original expiry.
|
|
128
|
+
Rutube performs a bounded exact title/year movie search and returns only Rutube's documented public
|
|
129
|
+
embed player. It does not expose or proxy Rutube media URLs and intentionally skips series.
|
|
130
|
+
|
|
131
|
+
These providers return third-party links or streams. Media Engine does not host the video, and an
|
|
132
|
+
external player may be unavailable in some countries, networks, or browsers.
|
|
133
|
+
|
|
134
|
+
## Discover torrent releases
|
|
135
|
+
|
|
136
|
+
Torrent providers are always opt-in:
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
import {
|
|
140
|
+
bitsearchTorrentProvider,
|
|
141
|
+
jacRedTorrentProvider,
|
|
142
|
+
magnetzTorrentProvider,
|
|
143
|
+
ytsTorrentProvider,
|
|
144
|
+
} from "@media-engine/providers";
|
|
145
|
+
|
|
146
|
+
const media = new MediaEngine({
|
|
147
|
+
torrentProviders: [
|
|
148
|
+
ytsTorrentProvider(),
|
|
149
|
+
jacRedTorrentProvider(),
|
|
150
|
+
bitsearchTorrentProvider(),
|
|
151
|
+
magnetzTorrentProvider(),
|
|
152
|
+
],
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
const result = await media.discoverTorrents({
|
|
156
|
+
type: "movie",
|
|
157
|
+
title: "Inception",
|
|
158
|
+
year: 2010,
|
|
159
|
+
ids: { imdb: "tt1375666" },
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Discovery only returns normalized candidates and their handoff data. It does not download torrent
|
|
164
|
+
metadata, contact trackers, join a swarm, or play a file.
|
|
165
|
+
|
|
166
|
+
Public sources can change, rate-limit requests, or go offline. Keep engine caching enabled and
|
|
167
|
+
expect occasional partial results. Provider-specific settings and safety boundaries are described in
|
|
168
|
+
the [provider guide](https://github.com/Yaneart/media-engine/blob/main/docs/providers.md).
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
MIT
|