react-native-consumet 1.0.0-rc.0 → 1.0.0-rc.2
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/android/generated/java/com/consumet/NativeConsumetSpec.java +4 -0
- package/android/generated/jni/RNConsumetSpec-generated.cpp +6 -0
- package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI-generated.cpp +8 -0
- package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI.h +9 -0
- package/android/src/main/java/com/consumet/ConsumetModule.kt +7 -0
- package/android/src/main/java/com/consumet/DdosGuardModule.kt +248 -189
- package/ios/generated/RNConsumetSpec/RNConsumetSpec-generated.mm +7 -0
- package/ios/generated/RNConsumetSpec/RNConsumetSpec.h +2 -0
- package/ios/generated/RNConsumetSpecJSI-generated.cpp +8 -0
- package/ios/generated/RNConsumetSpecJSI.h +9 -0
- package/lib/commonjs/NativeConsumet.ts +28 -26
- package/lib/commonjs/extension-registry.json +13 -13
- package/lib/commonjs/extractors/filemoon.js +2 -2
- package/lib/commonjs/extractors/kwik.js +60 -15
- package/lib/commonjs/extractors/kwik.js.map +1 -1
- package/lib/commonjs/extractors/megacloud.js +6 -6
- package/lib/commonjs/index.js +2 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/types.js +4 -4
- package/lib/commonjs/models/video-extractor.js +4 -4
- package/lib/commonjs/providers/anime/animedrive.js +12 -12
- package/lib/commonjs/providers/anime/animekai.js +41 -41
- package/lib/commonjs/providers/anime/animepahe/animepahe.js +16 -15
- package/lib/commonjs/providers/anime/animepahe/animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +12 -9
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/animesuge/animesuge.js +78 -0
- package/lib/commonjs/providers/anime/animesuge/animesuge.js.map +1 -0
- package/lib/commonjs/providers/anime/animesuge/create-animesuge.js +312 -0
- package/lib/commonjs/providers/anime/animesuge/create-animesuge.js.map +1 -0
- package/lib/commonjs/providers/anime/animeunity.js +13 -13
- package/lib/commonjs/providers/anime/index.js +4 -4
- package/lib/commonjs/providers/anime/index.js.map +1 -1
- package/lib/commonjs/providers/anime/marin.js +12 -12
- package/lib/commonjs/providers/anime/zoro/create-zoro.js +2 -2
- package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +1 -1
- package/lib/commonjs/providers/anime/zoro/zoro.js +76 -74
- package/lib/commonjs/providers/anime/zoro/zoro.js.map +1 -1
- package/lib/commonjs/providers/manga/brmangas.js +3 -3
- package/lib/commonjs/providers/meta/anilist.js +91 -91
- package/lib/commonjs/providers/meta/mal.js +12 -12
- package/lib/commonjs/providers/meta/tmdb.js +21 -21
- package/lib/commonjs/providers/movies/himovies/create-himovies.js +16 -16
- package/lib/commonjs/providers/movies/himovies/himovies.js +16 -16
- package/lib/commonjs/providers/movies/multimovies.js +15 -15
- package/lib/commonjs/providers/movies/multistream/index.js +21 -20
- package/lib/commonjs/providers/movies/multistream/index.js.map +1 -1
- package/lib/commonjs/providers/movies/multistream/utils.js +142 -130
- package/lib/commonjs/providers/movies/multistream/utils.js.map +1 -1
- package/lib/commonjs/utils/ExtractorManager.js +15 -15
- package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
- package/lib/commonjs/utils/ProviderManager.js +2 -1
- package/lib/commonjs/utils/ProviderManager.js.map +1 -1
- package/lib/commonjs/utils/create-extractor-context.js +9 -1
- package/lib/commonjs/utils/create-extractor-context.js.map +1 -1
- package/lib/commonjs/utils/create-provider-context.js +6 -2
- package/lib/commonjs/utils/create-provider-context.js.map +1 -1
- package/lib/commonjs/utils/extension-utils.js +44 -54
- package/lib/commonjs/utils/extension-utils.js.map +1 -1
- package/lib/commonjs/utils/index.js +2 -2
- package/lib/commonjs/utils/provider-maps.js +31 -0
- package/lib/commonjs/utils/provider-maps.js.map +1 -0
- package/lib/commonjs/utils/providers-list.js +4 -4
- package/lib/commonjs/utils/url-polyfill.js +4 -4
- package/lib/module/NativeConsumet.ts +28 -26
- package/lib/module/extension-registry.json +13 -13
- package/lib/module/extractors/filemoon.js +2 -2
- package/lib/module/extractors/kwik.js +60 -15
- package/lib/module/extractors/kwik.js.map +1 -1
- package/lib/module/extractors/megacloud.js +6 -6
- package/lib/module/index.js +3 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/types.js +4 -4
- package/lib/module/models/video-extractor.js +4 -4
- package/lib/module/providers/anime/animedrive.js +12 -12
- package/lib/module/providers/anime/animekai.js +41 -41
- package/lib/module/providers/anime/animepahe/animepahe.js +14 -14
- package/lib/module/providers/anime/animepahe/animepahe.js.map +1 -1
- package/lib/module/providers/anime/animepahe/create-animepahe.js +13 -9
- package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/module/providers/anime/animesuge/animesuge.js +73 -0
- package/lib/module/providers/anime/animesuge/animesuge.js.map +1 -0
- package/lib/module/providers/anime/animesuge/create-animesuge.js +309 -0
- package/lib/module/providers/anime/animesuge/create-animesuge.js.map +1 -0
- package/lib/module/providers/anime/animeunity.js +13 -13
- package/lib/module/providers/anime/index.js +2 -2
- package/lib/module/providers/anime/index.js.map +1 -1
- package/lib/module/providers/anime/marin.js +12 -12
- package/lib/module/providers/anime/zoro/create-zoro.js +3 -2
- package/lib/module/providers/anime/zoro/create-zoro.js.map +1 -1
- package/lib/module/providers/anime/zoro/zoro.js +74 -73
- package/lib/module/providers/anime/zoro/zoro.js.map +1 -1
- package/lib/module/providers/manga/brmangas.js +3 -3
- package/lib/module/providers/meta/anilist.js +91 -91
- package/lib/module/providers/meta/mal.js +12 -12
- package/lib/module/providers/meta/tmdb.js +21 -21
- package/lib/module/providers/movies/himovies/create-himovies.js +16 -16
- package/lib/module/providers/movies/himovies/himovies.js +16 -16
- package/lib/module/providers/movies/multimovies.js +15 -15
- package/lib/module/providers/movies/multistream/index.js +21 -20
- package/lib/module/providers/movies/multistream/index.js.map +1 -1
- package/lib/module/providers/movies/multistream/utils.js +141 -129
- package/lib/module/providers/movies/multistream/utils.js.map +1 -1
- package/lib/module/utils/ExtractorManager.js +16 -16
- package/lib/module/utils/ExtractorManager.js.map +1 -1
- package/lib/module/utils/ProviderManager.js +2 -1
- package/lib/module/utils/ProviderManager.js.map +1 -1
- package/lib/module/utils/create-extractor-context.js +10 -1
- package/lib/module/utils/create-extractor-context.js.map +1 -1
- package/lib/module/utils/create-provider-context.js +8 -4
- package/lib/module/utils/create-provider-context.js.map +1 -1
- package/lib/module/utils/extension-utils.js +23 -33
- package/lib/module/utils/extension-utils.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/provider-maps.js +27 -0
- package/lib/module/utils/provider-maps.js.map +1 -0
- package/lib/module/utils/providers-list.js +4 -4
- package/lib/module/utils/url-polyfill.js +4 -4
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts +2 -0
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/kwik.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +6 -6
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/extractor-context.d.ts +8 -0
- package/lib/typescript/commonjs/src/models/extractor-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/models/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/provider-context.d.ts +6 -2
- package/lib/typescript/commonjs/src/models/provider-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animepahe/animepahe.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animesuge/animesuge.d.ts +34 -0
- package/lib/typescript/commonjs/src/providers/anime/animesuge/animesuge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/animesuge/create-animesuge.d.ts +14 -0
- package/lib/typescript/commonjs/src/providers/anime/animesuge/create-animesuge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts +1 -1
- package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts +2 -2
- package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/create-extractor-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/create-provider-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/extension-utils.d.ts +1 -20
- package/lib/typescript/commonjs/src/utils/extension-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +27 -0
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeConsumet.d.ts +2 -0
- package/lib/typescript/module/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/kwik.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +6 -6
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/extractor-context.d.ts +8 -0
- package/lib/typescript/module/src/models/extractor-context.d.ts.map +1 -1
- package/lib/typescript/module/src/models/index.d.ts +2 -2
- package/lib/typescript/module/src/models/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/provider-context.d.ts +6 -2
- package/lib/typescript/module/src/models/provider-context.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/animepahe/animepahe.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts +1 -1
- package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/animesuge/animesuge.d.ts +34 -0
- package/lib/typescript/module/src/providers/anime/animesuge/animesuge.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/animesuge/create-animesuge.d.ts +14 -0
- package/lib/typescript/module/src/providers/anime/animesuge/create-animesuge.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/index.d.ts +2 -2
- package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts +1 -1
- package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/multistream/index.d.ts +1 -1
- package/lib/typescript/module/src/providers/movies/multistream/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts +2 -2
- package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/ProviderManager.d.ts +1 -1
- package/lib/typescript/module/src/utils/ProviderManager.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/create-extractor-context.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/create-provider-context.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/extension-utils.d.ts +1 -20
- package/lib/typescript/module/src/utils/extension-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/index.d.ts +2 -1
- package/lib/typescript/module/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/provider-maps.d.ts +27 -0
- package/lib/typescript/module/src/utils/provider-maps.d.ts.map +1 -0
- package/package.json +6 -2
- package/src/NativeConsumet.ts +2 -0
- package/src/extension-registry.json +81 -81
- package/src/extractors/StreamP2P.ts +60 -60
- package/src/extractors/filemoon.ts +58 -58
- package/src/extractors/index.ts +41 -41
- package/src/extractors/kwik.ts +113 -50
- package/src/extractors/megacloud.ts +163 -163
- package/src/extractors/mixdrop.ts +31 -31
- package/src/extractors/mp4upload.ts +31 -31
- package/src/extractors/streamhub.ts +58 -58
- package/src/extractors/streamwish.ts +120 -120
- package/src/extractors/vidhide.ts +59 -59
- package/src/index.tsx +176 -175
- package/src/models/extension-manifest.ts +77 -77
- package/src/models/extractor-context.ts +55 -41
- package/src/models/index.ts +107 -106
- package/src/models/provider-context.ts +192 -182
- package/src/models/types.ts +531 -531
- package/src/models/video-extractor.ts +48 -48
- package/src/providers/anime/animedrive.ts +245 -245
- package/src/providers/anime/animekai.ts +627 -627
- package/src/providers/anime/animepahe/animepahe.ts +76 -76
- package/src/providers/anime/animepahe/create-animepahe.ts +350 -348
- package/src/providers/anime/animesuge/animesuge.ts +77 -0
- package/src/providers/anime/animesuge/create-animesuge.ts +327 -0
- package/src/providers/anime/animeunity.ts +216 -216
- package/src/providers/anime/index.ts +21 -21
- package/src/providers/anime/marin.ts +319 -319
- package/src/providers/anime/zoro/create-zoro.ts +656 -655
- package/src/providers/anime/zoro/zoro.ts +198 -197
- package/src/providers/index.ts +7 -7
- package/src/providers/manga/brmangas.ts +144 -144
- package/src/providers/meta/anilist.ts +2108 -2108
- package/src/providers/meta/mal.ts +635 -635
- package/src/providers/meta/tmdb.ts +470 -470
- package/src/providers/movies/himovies/create-himovies.ts +529 -529
- package/src/providers/movies/himovies/himovies.ts +90 -90
- package/src/providers/movies/index.ts +15 -15
- package/src/providers/movies/multimovies.ts +495 -495
- package/src/providers/movies/multistream/index.ts +232 -231
- package/src/providers/movies/multistream/utils.ts +147 -270
- package/src/utils/ExtractorManager.ts +311 -311
- package/src/utils/ProviderManager.ts +423 -424
- package/src/utils/create-extractor-context.ts +36 -22
- package/src/utils/create-provider-context.ts +117 -107
- package/src/utils/extension-utils.ts +105 -114
- package/src/utils/index.ts +96 -95
- package/src/utils/provider-maps.ts +31 -0
- package/src/utils/providers-list.ts +27 -27
- package/src/utils/url-polyfill.ts +642 -642
- package/src/utils/utils.ts +374 -374
|
@@ -1,197 +1,198 @@
|
|
|
1
|
-
import { AnimeParser } from '../../../models';
|
|
2
|
-
import { createProviderContext } from '../../../utils/create-provider-context';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
// Backward compatibility wrapper class
|
|
6
|
-
export class Zoro extends AnimeParser {
|
|
7
|
-
private instance: ZoroProviderInstance;
|
|
8
|
-
public logo: string;
|
|
9
|
-
|
|
10
|
-
constructor(customBaseURL?: string) {
|
|
11
|
-
super();
|
|
12
|
-
|
|
13
|
-
// Use the context factory to create a complete context with all defaults
|
|
14
|
-
const defaultContext = createProviderContext();
|
|
15
|
-
|
|
16
|
-
this.instance = createZoro(defaultContext, customBaseURL);
|
|
17
|
-
this.logo = this.instance.logo;
|
|
18
|
-
|
|
19
|
-
// Bind all methods to preserve proper typing
|
|
20
|
-
this.search = this.instance.search;
|
|
21
|
-
this.fetchAdvancedSearch = this.instance.fetchAdvancedSearch;
|
|
22
|
-
this.fetchTopAiring = this.instance.fetchTopAiring;
|
|
23
|
-
this.fetchMostPopular = this.instance.fetchMostPopular;
|
|
24
|
-
this.fetchMostFavorite = this.instance.fetchMostFavorite;
|
|
25
|
-
this.fetchLatestCompleted = this.instance.fetchLatestCompleted;
|
|
26
|
-
this.fetchRecentlyUpdated = this.instance.fetchRecentlyUpdated;
|
|
27
|
-
this.fetchRecentlyAdded = this.instance.fetchRecentlyAdded;
|
|
28
|
-
this.fetchTopUpcoming = this.instance.fetchTopUpcoming;
|
|
29
|
-
this.fetchStudio = this.instance.fetchStudio;
|
|
30
|
-
this.fetchSubbedAnime = this.instance.fetchSubbedAnime;
|
|
31
|
-
this.fetchDubbedAnime = this.instance.fetchDubbedAnime;
|
|
32
|
-
this.fetchMovie = this.instance.fetchMovie;
|
|
33
|
-
this.fetchTV = this.instance.fetchTV;
|
|
34
|
-
this.fetchOVA = this.instance.fetchOVA;
|
|
35
|
-
this.fetchONA = this.instance.fetchONA;
|
|
36
|
-
this.fetchSpecial = this.instance.fetchSpecial;
|
|
37
|
-
this.fetchGenres = this.instance.fetchGenres;
|
|
38
|
-
this.genreSearch = this.instance.genreSearch;
|
|
39
|
-
this.fetchSchedule = this.instance.fetchSchedule;
|
|
40
|
-
this.fetchSpotlight = this.instance.fetchSpotlight;
|
|
41
|
-
this.fetchSearchSuggestions = this.instance.fetchSearchSuggestions;
|
|
42
|
-
this.fetchContinueWatching = this.instance.fetchContinueWatching;
|
|
43
|
-
this.fetchWatchList = this.instance.fetchWatchList;
|
|
44
|
-
this.fetchAnimeInfo = this.instance.fetchAnimeInfo;
|
|
45
|
-
this.fetchEpisodeSources = this.instance.fetchEpisodeSources;
|
|
46
|
-
this.fetchEpisodeServers = this.instance.fetchEpisodeServers;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Getters for required AnimeParser properties
|
|
50
|
-
get name() {
|
|
51
|
-
return this.instance.name;
|
|
52
|
-
}
|
|
53
|
-
get baseUrl() {
|
|
54
|
-
return this.instance.baseUrl;
|
|
55
|
-
}
|
|
56
|
-
set baseUrl(value: string) {
|
|
57
|
-
this.instance.baseUrl = value;
|
|
58
|
-
}
|
|
59
|
-
get classPath() {
|
|
60
|
-
return this.instance.classPath;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* @param query Search query
|
|
64
|
-
* @param page Page number (optional)
|
|
65
|
-
*/
|
|
66
|
-
search!: ZoroProviderInstance['search'];
|
|
67
|
-
/**
|
|
68
|
-
* Fetch advanced anime search results with various filters.
|
|
69
|
-
*
|
|
70
|
-
* @param page Page number (default: 1)
|
|
71
|
-
* @param type One of (Optional): movie, tv, ova, ona, special, music
|
|
72
|
-
* @param status One of (Optional): finished_airing, currently_airing, not_yet_aired
|
|
73
|
-
* @param rated One of (Optional): g, pg, pg_13, r, r_plus, rx
|
|
74
|
-
* @param score Number from 1 to 10 (Optional)
|
|
75
|
-
* @param season One of (Optional): spring, summer, fall, winter
|
|
76
|
-
* @param language One of (Optional): sub, dub, sub_dub
|
|
77
|
-
* @param startDate Start date object { year, month, day } (Optional)
|
|
78
|
-
* @param endDate End date object { year, month, day } (Optional)
|
|
79
|
-
* @param sort One of (Optional): recently_added, recently_updated, score, name_az, released_date, most_watched
|
|
80
|
-
* @param genres Array of genres (Optional): action, adventure, cars, comedy, dementia, demons, mystery, drama, ecchi, fantasy, game, historical, horror, kids, magic, martial_arts, mecha, music, parody, samurai, romance, school, sci_fi, shoujo, shoujo_ai, shounen, shounen_ai, space, sports, super_power, vampire, harem, military, slice_of_life, supernatural, police, psychological, thriller, seinen, isekai, josei
|
|
81
|
-
* @returns A Promise resolving to the search results.
|
|
82
|
-
*/
|
|
83
|
-
fetchAdvancedSearch!: ZoroProviderInstance['fetchAdvancedSearch'];
|
|
84
|
-
/**
|
|
85
|
-
* @param page number
|
|
86
|
-
*/
|
|
87
|
-
fetchTopAiring!: ZoroProviderInstance['fetchTopAiring'];
|
|
88
|
-
/**
|
|
89
|
-
* @param page number
|
|
90
|
-
*/
|
|
91
|
-
fetchMostPopular!: ZoroProviderInstance['fetchMostPopular'];
|
|
92
|
-
/**
|
|
93
|
-
* @param page number
|
|
94
|
-
*/
|
|
95
|
-
fetchMostFavorite!: ZoroProviderInstance['fetchMostFavorite'];
|
|
96
|
-
/**
|
|
97
|
-
* @param page number
|
|
98
|
-
*/
|
|
99
|
-
fetchLatestCompleted!: ZoroProviderInstance['fetchLatestCompleted'];
|
|
100
|
-
/**
|
|
101
|
-
* @param page number
|
|
102
|
-
*/
|
|
103
|
-
fetchRecentlyUpdated!: ZoroProviderInstance['fetchRecentlyUpdated'];
|
|
104
|
-
/**
|
|
105
|
-
* @param page number
|
|
106
|
-
*/
|
|
107
|
-
fetchRecentlyAdded!: ZoroProviderInstance['fetchRecentlyAdded'];
|
|
108
|
-
/**
|
|
109
|
-
* @param page number
|
|
110
|
-
*/
|
|
111
|
-
fetchTopUpcoming!: ZoroProviderInstance['fetchTopUpcoming'];
|
|
112
|
-
/**
|
|
113
|
-
* @param studio Studio id, e.g. "toei-animation"
|
|
114
|
-
* @param page page number (optional) `default 1`
|
|
115
|
-
*/
|
|
116
|
-
fetchStudio!: ZoroProviderInstance['fetchStudio'];
|
|
117
|
-
/**
|
|
118
|
-
* @param page number
|
|
119
|
-
*/
|
|
120
|
-
fetchSubbedAnime!: ZoroProviderInstance['fetchSubbedAnime'];
|
|
121
|
-
/**
|
|
122
|
-
* @param page number
|
|
123
|
-
*/
|
|
124
|
-
fetchDubbedAnime!: ZoroProviderInstance['fetchDubbedAnime'];
|
|
125
|
-
/**
|
|
126
|
-
* @param page number
|
|
127
|
-
*/
|
|
128
|
-
fetchMovie!: ZoroProviderInstance['fetchMovie'];
|
|
129
|
-
/**
|
|
130
|
-
* @param page number
|
|
131
|
-
*/
|
|
132
|
-
fetchTV!: ZoroProviderInstance['fetchTV'];
|
|
133
|
-
/**
|
|
134
|
-
* @param page number
|
|
135
|
-
*/
|
|
136
|
-
fetchOVA!: ZoroProviderInstance['fetchOVA'];
|
|
137
|
-
/**
|
|
138
|
-
* @param page number
|
|
139
|
-
*/
|
|
140
|
-
fetchONA!: ZoroProviderInstance['fetchONA'];
|
|
141
|
-
/**
|
|
142
|
-
* @param page number
|
|
143
|
-
*/
|
|
144
|
-
fetchSpecial!: ZoroProviderInstance['fetchSpecial'];
|
|
145
|
-
fetchGenres!: ZoroProviderInstance['fetchGenres'];
|
|
146
|
-
/**
|
|
147
|
-
* @param page number
|
|
148
|
-
*/
|
|
149
|
-
genreSearch!: ZoroProviderInstance['genreSearch'];
|
|
150
|
-
/**
|
|
151
|
-
* Fetches the schedule for a given date.
|
|
152
|
-
* @param date The date in format 'YYYY-MM-DD'. Defaults to the current date.
|
|
153
|
-
* @returns A promise that resolves to an object containing the search results.
|
|
154
|
-
*/
|
|
155
|
-
fetchSchedule!: ZoroProviderInstance['fetchSchedule'];
|
|
156
|
-
fetchSpotlight!: ZoroProviderInstance['fetchSpotlight'];
|
|
157
|
-
fetchSearchSuggestions!: ZoroProviderInstance['fetchSearchSuggestions'];
|
|
158
|
-
/**
|
|
159
|
-
* Fetches the list of episodes that the user is currently watching.
|
|
160
|
-
* @param connectSid The session ID of the user. Note: This can be obtained from the browser cookies (needs to be signed in)
|
|
161
|
-
* @returns A promise that resolves to an array of anime episodes.
|
|
162
|
-
*/
|
|
163
|
-
fetchContinueWatching!: ZoroProviderInstance['fetchContinueWatching'];
|
|
164
|
-
fetchWatchList!: ZoroProviderInstance['fetchWatchList'];
|
|
165
|
-
/**
|
|
166
|
-
* @param id Anime id
|
|
167
|
-
*/
|
|
168
|
-
fetchAnimeInfo!: ZoroProviderInstance['fetchAnimeInfo'];
|
|
169
|
-
/**
|
|
170
|
-
*
|
|
171
|
-
* @param episodeId Episode id
|
|
172
|
-
* @param server server type (default `VidCloud`) (optional)
|
|
173
|
-
* @param subOrDub sub or dub (default `SubOrDub.SUB`) (optional)
|
|
174
|
-
*/
|
|
175
|
-
fetchEpisodeSources!: ZoroProviderInstance['fetchEpisodeSources'];
|
|
176
|
-
/**
|
|
177
|
-
* Method not implemented in Zoro provider.
|
|
178
|
-
* @param episodeId Episode id
|
|
179
|
-
*/
|
|
180
|
-
fetchEpisodeServers!: ZoroProviderInstance['fetchEpisodeServers'];
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export default Zoro;
|
|
184
|
-
|
|
185
|
-
// (async () => {
|
|
186
|
-
//
|
|
187
|
-
// const
|
|
188
|
-
// const
|
|
189
|
-
//
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
//
|
|
194
|
-
//
|
|
195
|
-
//
|
|
196
|
-
//
|
|
197
|
-
//
|
|
1
|
+
import { AnimeParser } from '../../../models';
|
|
2
|
+
import { createProviderContext } from '../../../utils/create-provider-context';
|
|
3
|
+
import createZoro, { type ZoroProviderInstance } from './create-zoro';
|
|
4
|
+
|
|
5
|
+
// Backward compatibility wrapper class
|
|
6
|
+
export class Zoro extends AnimeParser {
|
|
7
|
+
private instance: ZoroProviderInstance;
|
|
8
|
+
public logo: string;
|
|
9
|
+
|
|
10
|
+
constructor(customBaseURL?: string) {
|
|
11
|
+
super();
|
|
12
|
+
|
|
13
|
+
// Use the context factory to create a complete context with all defaults
|
|
14
|
+
const defaultContext = createProviderContext();
|
|
15
|
+
|
|
16
|
+
this.instance = createZoro(defaultContext, customBaseURL);
|
|
17
|
+
this.logo = this.instance.logo;
|
|
18
|
+
|
|
19
|
+
// Bind all methods to preserve proper typing
|
|
20
|
+
this.search = this.instance.search;
|
|
21
|
+
this.fetchAdvancedSearch = this.instance.fetchAdvancedSearch;
|
|
22
|
+
this.fetchTopAiring = this.instance.fetchTopAiring;
|
|
23
|
+
this.fetchMostPopular = this.instance.fetchMostPopular;
|
|
24
|
+
this.fetchMostFavorite = this.instance.fetchMostFavorite;
|
|
25
|
+
this.fetchLatestCompleted = this.instance.fetchLatestCompleted;
|
|
26
|
+
this.fetchRecentlyUpdated = this.instance.fetchRecentlyUpdated;
|
|
27
|
+
this.fetchRecentlyAdded = this.instance.fetchRecentlyAdded;
|
|
28
|
+
this.fetchTopUpcoming = this.instance.fetchTopUpcoming;
|
|
29
|
+
this.fetchStudio = this.instance.fetchStudio;
|
|
30
|
+
this.fetchSubbedAnime = this.instance.fetchSubbedAnime;
|
|
31
|
+
this.fetchDubbedAnime = this.instance.fetchDubbedAnime;
|
|
32
|
+
this.fetchMovie = this.instance.fetchMovie;
|
|
33
|
+
this.fetchTV = this.instance.fetchTV;
|
|
34
|
+
this.fetchOVA = this.instance.fetchOVA;
|
|
35
|
+
this.fetchONA = this.instance.fetchONA;
|
|
36
|
+
this.fetchSpecial = this.instance.fetchSpecial;
|
|
37
|
+
this.fetchGenres = this.instance.fetchGenres;
|
|
38
|
+
this.genreSearch = this.instance.genreSearch;
|
|
39
|
+
this.fetchSchedule = this.instance.fetchSchedule;
|
|
40
|
+
this.fetchSpotlight = this.instance.fetchSpotlight;
|
|
41
|
+
this.fetchSearchSuggestions = this.instance.fetchSearchSuggestions;
|
|
42
|
+
this.fetchContinueWatching = this.instance.fetchContinueWatching;
|
|
43
|
+
this.fetchWatchList = this.instance.fetchWatchList;
|
|
44
|
+
this.fetchAnimeInfo = this.instance.fetchAnimeInfo;
|
|
45
|
+
this.fetchEpisodeSources = this.instance.fetchEpisodeSources;
|
|
46
|
+
this.fetchEpisodeServers = this.instance.fetchEpisodeServers;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Getters for required AnimeParser properties
|
|
50
|
+
get name() {
|
|
51
|
+
return this.instance.name;
|
|
52
|
+
}
|
|
53
|
+
get baseUrl() {
|
|
54
|
+
return this.instance.baseUrl;
|
|
55
|
+
}
|
|
56
|
+
set baseUrl(value: string) {
|
|
57
|
+
this.instance.baseUrl = value;
|
|
58
|
+
}
|
|
59
|
+
get classPath() {
|
|
60
|
+
return this.instance.classPath;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @param query Search query
|
|
64
|
+
* @param page Page number (optional)
|
|
65
|
+
*/
|
|
66
|
+
search!: ZoroProviderInstance['search'];
|
|
67
|
+
/**
|
|
68
|
+
* Fetch advanced anime search results with various filters.
|
|
69
|
+
*
|
|
70
|
+
* @param page Page number (default: 1)
|
|
71
|
+
* @param type One of (Optional): movie, tv, ova, ona, special, music
|
|
72
|
+
* @param status One of (Optional): finished_airing, currently_airing, not_yet_aired
|
|
73
|
+
* @param rated One of (Optional): g, pg, pg_13, r, r_plus, rx
|
|
74
|
+
* @param score Number from 1 to 10 (Optional)
|
|
75
|
+
* @param season One of (Optional): spring, summer, fall, winter
|
|
76
|
+
* @param language One of (Optional): sub, dub, sub_dub
|
|
77
|
+
* @param startDate Start date object { year, month, day } (Optional)
|
|
78
|
+
* @param endDate End date object { year, month, day } (Optional)
|
|
79
|
+
* @param sort One of (Optional): recently_added, recently_updated, score, name_az, released_date, most_watched
|
|
80
|
+
* @param genres Array of genres (Optional): action, adventure, cars, comedy, dementia, demons, mystery, drama, ecchi, fantasy, game, historical, horror, kids, magic, martial_arts, mecha, music, parody, samurai, romance, school, sci_fi, shoujo, shoujo_ai, shounen, shounen_ai, space, sports, super_power, vampire, harem, military, slice_of_life, supernatural, police, psychological, thriller, seinen, isekai, josei
|
|
81
|
+
* @returns A Promise resolving to the search results.
|
|
82
|
+
*/
|
|
83
|
+
fetchAdvancedSearch!: ZoroProviderInstance['fetchAdvancedSearch'];
|
|
84
|
+
/**
|
|
85
|
+
* @param page number
|
|
86
|
+
*/
|
|
87
|
+
fetchTopAiring!: ZoroProviderInstance['fetchTopAiring'];
|
|
88
|
+
/**
|
|
89
|
+
* @param page number
|
|
90
|
+
*/
|
|
91
|
+
fetchMostPopular!: ZoroProviderInstance['fetchMostPopular'];
|
|
92
|
+
/**
|
|
93
|
+
* @param page number
|
|
94
|
+
*/
|
|
95
|
+
fetchMostFavorite!: ZoroProviderInstance['fetchMostFavorite'];
|
|
96
|
+
/**
|
|
97
|
+
* @param page number
|
|
98
|
+
*/
|
|
99
|
+
fetchLatestCompleted!: ZoroProviderInstance['fetchLatestCompleted'];
|
|
100
|
+
/**
|
|
101
|
+
* @param page number
|
|
102
|
+
*/
|
|
103
|
+
fetchRecentlyUpdated!: ZoroProviderInstance['fetchRecentlyUpdated'];
|
|
104
|
+
/**
|
|
105
|
+
* @param page number
|
|
106
|
+
*/
|
|
107
|
+
fetchRecentlyAdded!: ZoroProviderInstance['fetchRecentlyAdded'];
|
|
108
|
+
/**
|
|
109
|
+
* @param page number
|
|
110
|
+
*/
|
|
111
|
+
fetchTopUpcoming!: ZoroProviderInstance['fetchTopUpcoming'];
|
|
112
|
+
/**
|
|
113
|
+
* @param studio Studio id, e.g. "toei-animation"
|
|
114
|
+
* @param page page number (optional) `default 1`
|
|
115
|
+
*/
|
|
116
|
+
fetchStudio!: ZoroProviderInstance['fetchStudio'];
|
|
117
|
+
/**
|
|
118
|
+
* @param page number
|
|
119
|
+
*/
|
|
120
|
+
fetchSubbedAnime!: ZoroProviderInstance['fetchSubbedAnime'];
|
|
121
|
+
/**
|
|
122
|
+
* @param page number
|
|
123
|
+
*/
|
|
124
|
+
fetchDubbedAnime!: ZoroProviderInstance['fetchDubbedAnime'];
|
|
125
|
+
/**
|
|
126
|
+
* @param page number
|
|
127
|
+
*/
|
|
128
|
+
fetchMovie!: ZoroProviderInstance['fetchMovie'];
|
|
129
|
+
/**
|
|
130
|
+
* @param page number
|
|
131
|
+
*/
|
|
132
|
+
fetchTV!: ZoroProviderInstance['fetchTV'];
|
|
133
|
+
/**
|
|
134
|
+
* @param page number
|
|
135
|
+
*/
|
|
136
|
+
fetchOVA!: ZoroProviderInstance['fetchOVA'];
|
|
137
|
+
/**
|
|
138
|
+
* @param page number
|
|
139
|
+
*/
|
|
140
|
+
fetchONA!: ZoroProviderInstance['fetchONA'];
|
|
141
|
+
/**
|
|
142
|
+
* @param page number
|
|
143
|
+
*/
|
|
144
|
+
fetchSpecial!: ZoroProviderInstance['fetchSpecial'];
|
|
145
|
+
fetchGenres!: ZoroProviderInstance['fetchGenres'];
|
|
146
|
+
/**
|
|
147
|
+
* @param page number
|
|
148
|
+
*/
|
|
149
|
+
genreSearch!: ZoroProviderInstance['genreSearch'];
|
|
150
|
+
/**
|
|
151
|
+
* Fetches the schedule for a given date.
|
|
152
|
+
* @param date The date in format 'YYYY-MM-DD'. Defaults to the current date.
|
|
153
|
+
* @returns A promise that resolves to an object containing the search results.
|
|
154
|
+
*/
|
|
155
|
+
fetchSchedule!: ZoroProviderInstance['fetchSchedule'];
|
|
156
|
+
fetchSpotlight!: ZoroProviderInstance['fetchSpotlight'];
|
|
157
|
+
fetchSearchSuggestions!: ZoroProviderInstance['fetchSearchSuggestions'];
|
|
158
|
+
/**
|
|
159
|
+
* Fetches the list of episodes that the user is currently watching.
|
|
160
|
+
* @param connectSid The session ID of the user. Note: This can be obtained from the browser cookies (needs to be signed in)
|
|
161
|
+
* @returns A promise that resolves to an array of anime episodes.
|
|
162
|
+
*/
|
|
163
|
+
fetchContinueWatching!: ZoroProviderInstance['fetchContinueWatching'];
|
|
164
|
+
fetchWatchList!: ZoroProviderInstance['fetchWatchList'];
|
|
165
|
+
/**
|
|
166
|
+
* @param id Anime id
|
|
167
|
+
*/
|
|
168
|
+
fetchAnimeInfo!: ZoroProviderInstance['fetchAnimeInfo'];
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @param episodeId Episode id
|
|
172
|
+
* @param server server type (default `VidCloud`) (optional)
|
|
173
|
+
* @param subOrDub sub or dub (default `SubOrDub.SUB`) (optional)
|
|
174
|
+
*/
|
|
175
|
+
fetchEpisodeSources!: ZoroProviderInstance['fetchEpisodeSources'];
|
|
176
|
+
/**
|
|
177
|
+
* Method not implemented in Zoro provider.
|
|
178
|
+
* @param episodeId Episode id
|
|
179
|
+
*/
|
|
180
|
+
fetchEpisodeServers!: ZoroProviderInstance['fetchEpisodeServers'];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export default Zoro;
|
|
184
|
+
|
|
185
|
+
// (async () => {
|
|
186
|
+
// // tsx ./src/providers/anime/zoro/zoro.ts
|
|
187
|
+
// const zoro = new Zoro();
|
|
188
|
+
// const anime = await zoro.search('Dandadan');
|
|
189
|
+
// const info = await zoro.fetchAnimeInfo('solo-leveling-season-2-arise-from-the-shadow-19413');
|
|
190
|
+
// // console.log(info.episodes);
|
|
191
|
+
// const sources = await zoro.fetchEpisodeServers(
|
|
192
|
+
// 'solo-leveling-season-2-arise-from-the-shadow-19413$episode$131394',
|
|
193
|
+
// // 'megacloud-hd-2',
|
|
194
|
+
// // undefined,
|
|
195
|
+
// SubOrDub.DUB
|
|
196
|
+
// );
|
|
197
|
+
// // console.log(sources);
|
|
198
|
+
// })();
|
package/src/providers/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ANIME from './anime';
|
|
2
|
-
import MANGA from './manga';
|
|
3
|
-
import LIGHT_NOVELS from './light-novels';
|
|
4
|
-
import MOVIES from './movies';
|
|
5
|
-
import META from './meta';
|
|
6
|
-
|
|
7
|
-
export { ANIME, MANGA, LIGHT_NOVELS, MOVIES, META };
|
|
1
|
+
import ANIME from './anime';
|
|
2
|
+
import MANGA from './manga';
|
|
3
|
+
import LIGHT_NOVELS from './light-novels';
|
|
4
|
+
import MOVIES from './movies';
|
|
5
|
+
import META from './meta';
|
|
6
|
+
|
|
7
|
+
export { ANIME, MANGA, LIGHT_NOVELS, MOVIES, META };
|