react-native-consumet 3.0.1 → 5.0.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/README.md +1 -1
- package/android/build.gradle +1 -18
- package/android/generated/java/com/consumet/NativeConsumetSpec.java +0 -8
- package/android/generated/jni/RNConsumetSpec-generated.cpp +0 -12
- package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI.h +0 -18
- package/android/src/androidTest/java/com/consumet/TestSupport.kt +12 -6
- package/android/src/androidTest/java/com/consumet/WebViewContractTest.kt +70 -22
- package/android/src/main/AndroidManifest.xml +2 -3
- package/android/src/main/java/com/consumet/ConsumetModule.kt +0 -11
- package/android/src/main/java/com/consumet/DeobfuscatorModule.kt +6 -11
- package/android/src/main/java/com/consumet/HttpClients.kt +26 -0
- package/android/src/main/java/com/consumet/HttpRequestModule.kt +134 -198
- package/android/src/main/java/com/consumet/RequestHeaders.kt +39 -0
- package/android/src/main/java/com/consumet/WebViewTask.kt +33 -23
- package/ios/Consumet.mm +340 -432
- package/ios/RCConsumetSynchronyCache.m +3 -1
- package/ios/generated/ReactCodegen/RNConsumetSpec/RNConsumetSpec-generated.mm +0 -14
- package/ios/generated/ReactCodegen/RNConsumetSpec/RNConsumetSpec.h +0 -6
- package/ios/generated/ReactCodegen/RNConsumetSpecJSI.h +0 -18
- package/lib/commonjs/NativeConsumet.ts +50 -52
- package/lib/commonjs/extension-registry.json +48 -188
- package/lib/commonjs/extension-registry.json.sig +1 -1
- package/lib/commonjs/extractors/file-hosts.js +42 -0
- package/lib/commonjs/extractors/file-hosts.js.map +1 -0
- package/lib/commonjs/extractors/flixcloud.js +25 -60
- package/lib/commonjs/extractors/flixcloud.js.map +1 -1
- package/lib/commonjs/extractors/gofile.js +123 -97
- package/lib/commonjs/extractors/gofile.js.map +1 -1
- package/lib/commonjs/extractors/hls.js +46 -0
- package/lib/commonjs/extractors/hls.js.map +1 -0
- package/lib/commonjs/extractors/hubcloud.js +131 -288
- package/lib/commonjs/extractors/hubcloud.js.map +1 -1
- package/lib/commonjs/extractors/index.js +4 -116
- package/lib/commonjs/extractors/index.js.map +1 -1
- package/lib/commonjs/extractors/kwik.js +15 -49
- package/lib/commonjs/extractors/kwik.js.map +1 -1
- package/lib/commonjs/extractors/megacloud.js +67 -140
- package/lib/commonjs/extractors/megacloud.js.map +1 -1
- package/lib/commonjs/extractors/megaplay.js +78 -128
- package/lib/commonjs/extractors/megaplay.js.map +1 -1
- package/lib/commonjs/extractors/packer.js +40 -0
- package/lib/commonjs/extractors/packer.js.map +1 -0
- package/lib/commonjs/extractors/streamwish.js +47 -103
- package/lib/commonjs/extractors/streamwish.js.map +1 -1
- package/lib/commonjs/extractors/url.js +11 -0
- package/lib/commonjs/extractors/url.js.map +1 -0
- package/lib/commonjs/extractors/vidhide.js +32 -59
- package/lib/commonjs/extractors/vidhide.js.map +1 -1
- package/lib/commonjs/index.js +123 -217
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/anime-parser.js +4 -17
- package/lib/commonjs/models/anime-parser.js.map +1 -1
- package/lib/commonjs/models/base-parser.js.map +1 -1
- package/lib/commonjs/models/base-provider.js +6 -33
- package/lib/commonjs/models/base-provider.js.map +1 -1
- package/lib/commonjs/models/index.js +25 -52
- package/lib/commonjs/models/index.js.map +1 -1
- package/lib/commonjs/models/lightnovel-parser.js.map +1 -1
- package/lib/commonjs/models/manga-parser.js.map +1 -1
- package/lib/commonjs/models/meta-error.js +10 -4
- package/lib/commonjs/models/meta-error.js.map +1 -1
- package/lib/commonjs/models/movie-parser.js.map +1 -1
- package/lib/commonjs/models/provider-error.js +54 -0
- package/lib/commonjs/models/provider-error.js.map +1 -0
- package/lib/commonjs/models/types.js +13 -22
- package/lib/commonjs/models/types.js.map +1 -1
- package/lib/commonjs/models/video-extractor.js +0 -10
- package/lib/commonjs/models/video-extractor.js.map +1 -1
- package/lib/commonjs/providers/anime/anikoto/anikoto.js +3 -182
- package/lib/commonjs/providers/anime/anikoto/anikoto.js.map +1 -1
- package/lib/commonjs/providers/anime/anikoto/create-anikoto.js +319 -436
- package/lib/commonjs/providers/anime/anikoto/create-anikoto.js.map +1 -1
- package/lib/commonjs/providers/anime/anikoto/hianime.js +77 -0
- package/lib/commonjs/providers/anime/anikoto/hianime.js.map +1 -0
- package/lib/commonjs/providers/anime/animepahe/animepahe.js +2 -66
- package/lib/commonjs/providers/anime/animepahe/animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +259 -190
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/helpers.js +16 -0
- package/lib/commonjs/providers/anime/helpers.js.map +1 -0
- package/lib/commonjs/providers/anime/index.js +1 -13
- package/lib/commonjs/providers/anime/index.js.map +1 -1
- package/lib/commonjs/providers/anime/reanime/create-reanime.js +42 -62
- package/lib/commonjs/providers/anime/reanime/create-reanime.js.map +1 -1
- package/lib/commonjs/providers/anime/reanime/reanime.js +2 -27
- package/lib/commonjs/providers/anime/reanime/reanime.js.map +1 -1
- package/lib/commonjs/providers/common/concurrency.js +38 -0
- package/lib/commonjs/providers/common/concurrency.js.map +1 -0
- package/lib/commonjs/providers/common/enc-dec.js +9 -0
- package/lib/commonjs/providers/common/enc-dec.js.map +1 -0
- package/lib/commonjs/providers/common/errors.js +77 -0
- package/lib/commonjs/providers/common/errors.js.map +1 -0
- package/lib/commonjs/providers/common/media-status.js +20 -0
- package/lib/commonjs/providers/common/media-status.js.map +1 -0
- package/lib/commonjs/providers/common/search.js +15 -0
- package/lib/commonjs/providers/common/search.js.map +1 -0
- package/lib/commonjs/providers/common/servers.js +45 -0
- package/lib/commonjs/providers/common/servers.js.map +1 -0
- package/lib/commonjs/providers/common/ttl-cache.js +59 -0
- package/lib/commonjs/providers/common/ttl-cache.js.map +1 -0
- package/lib/commonjs/providers/index.js +2 -3
- package/lib/commonjs/providers/index.js.map +1 -1
- package/lib/commonjs/providers/light-novels/novelupdates.js +49 -98
- package/lib/commonjs/providers/light-novels/novelupdates.js.map +1 -1
- package/lib/commonjs/providers/light-novels/readlightnovels.js +51 -93
- package/lib/commonjs/providers/light-novels/readlightnovels.js.map +1 -1
- package/lib/commonjs/providers/manga/asurascans.js +43 -56
- package/lib/commonjs/providers/manga/asurascans.js.map +1 -1
- package/lib/commonjs/providers/manga/flamescans.js +11 -33
- package/lib/commonjs/providers/manga/flamescans.js.map +1 -1
- package/lib/commonjs/providers/manga/mangadex.js +18 -17
- package/lib/commonjs/providers/manga/mangadex.js.map +1 -1
- package/lib/commonjs/providers/manga/mangahere.js +107 -169
- package/lib/commonjs/providers/manga/mangahere.js.map +1 -1
- package/lib/commonjs/providers/manga/mangakakalot.js +26 -56
- package/lib/commonjs/providers/manga/mangakakalot.js.map +1 -1
- package/lib/commonjs/providers/manga/mangapill.js +82 -120
- package/lib/commonjs/providers/manga/mangapill.js.map +1 -1
- package/lib/commonjs/providers/manga/shared.js +72 -0
- package/lib/commonjs/providers/manga/shared.js.map +1 -0
- package/lib/commonjs/providers/meta/anilist-media.js +252 -0
- package/lib/commonjs/providers/meta/anilist-media.js.map +1 -0
- package/lib/commonjs/providers/meta/anilist.js +435 -842
- package/lib/commonjs/providers/meta/anilist.js.map +1 -1
- package/lib/commonjs/providers/meta/index.js +2 -2
- package/lib/commonjs/providers/meta/index.js.map +1 -1
- package/lib/commonjs/providers/meta/mal.js +139 -323
- package/lib/commonjs/providers/meta/mal.js.map +1 -1
- package/lib/commonjs/providers/meta/shared.js +132 -0
- package/lib/commonjs/providers/meta/shared.js.map +1 -0
- package/lib/commonjs/providers/meta/tmdb.js +251 -298
- package/lib/commonjs/providers/meta/tmdb.js.map +1 -1
- package/lib/commonjs/providers/movies/index.js +7 -15
- package/lib/commonjs/providers/movies/index.js.map +1 -1
- package/lib/commonjs/providers/movies/multimovies/create-multimovies.js +217 -409
- package/lib/commonjs/providers/movies/multimovies/create-multimovies.js.map +1 -1
- package/lib/commonjs/providers/movies/multimovies/multimovies.js +2 -42
- package/lib/commonjs/providers/movies/multimovies/multimovies.js.map +1 -1
- package/lib/commonjs/providers/movies/multistream/create-multistream.js +130 -0
- package/lib/commonjs/providers/movies/multistream/create-multistream.js.map +1 -0
- package/lib/commonjs/providers/movies/multistream/multistream.js +12 -0
- package/lib/commonjs/providers/movies/multistream/multistream.js.map +1 -0
- package/lib/commonjs/providers/movies/multistream/utils.js +330 -406
- package/lib/commonjs/providers/movies/multistream/utils.js.map +1 -1
- package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js +69 -15
- package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
- package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js +6 -15
- package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
- package/lib/commonjs/providers/movies/site-paths.js +34 -0
- package/lib/commonjs/providers/movies/site-paths.js.map +1 -0
- package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js +474 -654
- package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
- package/lib/commonjs/providers/movies/vegamovies/vegamovies.js +2 -44
- package/lib/commonjs/providers/movies/vegamovies/vegamovies.js.map +1 -1
- package/lib/commonjs/providers/provider-class.js +28 -0
- package/lib/commonjs/providers/provider-class.js.map +1 -0
- package/lib/commonjs/registry-signing-keys.json +6 -0
- package/lib/commonjs/utils/ExtractorManager.js +156 -215
- package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
- package/lib/commonjs/utils/ProviderManager.js +127 -241
- package/lib/commonjs/utils/ProviderManager.js.map +1 -1
- package/lib/commonjs/utils/constants.js +3 -9
- package/lib/commonjs/utils/constants.js.map +1 -1
- package/lib/commonjs/utils/create-extractor-context.js +29 -17
- package/lib/commonjs/utils/create-extractor-context.js.map +1 -1
- package/lib/commonjs/utils/create-provider-context.js +32 -98
- package/lib/commonjs/utils/create-provider-context.js.map +1 -1
- package/lib/commonjs/utils/extension-integrity.js +2 -2
- package/lib/commonjs/utils/extension-integrity.js.map +1 -1
- package/lib/commonjs/utils/extension-modules.js +274 -44
- package/lib/commonjs/utils/extension-modules.js.map +1 -1
- package/lib/commonjs/utils/fetch-with-timeout.js +3 -2
- package/lib/commonjs/utils/fetch-with-timeout.js.map +1 -1
- package/lib/commonjs/utils/meta-http.js +18 -28
- package/lib/commonjs/utils/meta-http.js.map +1 -1
- package/lib/commonjs/utils/registry-schema.js +50 -16
- package/lib/commonjs/utils/registry-schema.js.map +1 -1
- package/lib/commonjs/utils/registry-signature-format.js +43 -0
- package/lib/commonjs/utils/registry-signature-format.js.map +1 -0
- package/lib/commonjs/utils/registry-signature.js +27 -62
- package/lib/commonjs/utils/registry-signature.js.map +1 -1
- package/lib/commonjs/utils/runtime-modules.js +14 -0
- package/lib/commonjs/utils/runtime-modules.js.map +1 -0
- package/lib/commonjs/utils/tmdb.js +185 -0
- package/lib/commonjs/utils/tmdb.js.map +1 -0
- package/lib/commonjs/utils/url-polyfill.js +13 -59
- package/lib/commonjs/utils/url-polyfill.js.map +1 -1
- package/lib/commonjs/utils/utf8.js +52 -0
- package/lib/commonjs/utils/utf8.js.map +1 -0
- package/lib/commonjs/utils/utils.js +23 -326
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/NativeConsumet.ts +50 -52
- package/lib/module/extension-registry.json +48 -188
- package/lib/module/extension-registry.json.sig +1 -1
- package/lib/module/extractors/file-hosts.js +32 -0
- package/lib/module/extractors/file-hosts.js.map +1 -0
- package/lib/module/extractors/flixcloud.js +23 -57
- package/lib/module/extractors/flixcloud.js.map +1 -1
- package/lib/module/extractors/gofile.js +123 -97
- package/lib/module/extractors/gofile.js.map +1 -1
- package/lib/module/extractors/hls.js +41 -0
- package/lib/module/extractors/hls.js.map +1 -0
- package/lib/module/extractors/hubcloud.js +132 -288
- package/lib/module/extractors/hubcloud.js.map +1 -1
- package/lib/module/extractors/index.js +4 -20
- package/lib/module/extractors/index.js.map +1 -1
- package/lib/module/extractors/kwik.js +16 -49
- package/lib/module/extractors/kwik.js.map +1 -1
- package/lib/module/extractors/megacloud.js +68 -140
- package/lib/module/extractors/megacloud.js.map +1 -1
- package/lib/module/extractors/megaplay.js +78 -128
- package/lib/module/extractors/megaplay.js.map +1 -1
- package/lib/module/extractors/packer.js +36 -0
- package/lib/module/extractors/packer.js.map +1 -0
- package/lib/module/extractors/streamwish.js +47 -103
- package/lib/module/extractors/streamwish.js.map +1 -1
- package/lib/module/extractors/url.js +7 -0
- package/lib/module/extractors/url.js.map +1 -0
- package/lib/module/extractors/vidhide.js +32 -59
- package/lib/module/extractors/vidhide.js.map +1 -1
- package/lib/module/index.js +20 -49
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/anime-parser.js +4 -17
- package/lib/module/models/anime-parser.js.map +1 -1
- package/lib/module/models/base-parser.js.map +1 -1
- package/lib/module/models/base-provider.js +6 -33
- package/lib/module/models/base-provider.js.map +1 -1
- package/lib/module/models/index.js +9 -10
- package/lib/module/models/index.js.map +1 -1
- package/lib/module/models/lightnovel-parser.js.map +1 -1
- package/lib/module/models/manga-parser.js.map +1 -1
- package/lib/module/models/meta-error.js +11 -4
- package/lib/module/models/meta-error.js.map +1 -1
- package/lib/module/models/movie-parser.js.map +1 -1
- package/lib/module/models/provider-error.js +49 -0
- package/lib/module/models/provider-error.js.map +1 -0
- package/lib/module/models/types.js +12 -21
- package/lib/module/models/types.js.map +1 -1
- package/lib/module/models/video-extractor.js +1 -9
- package/lib/module/models/video-extractor.js.map +1 -1
- package/lib/module/providers/anime/anikoto/anikoto.js +2 -181
- package/lib/module/providers/anime/anikoto/anikoto.js.map +1 -1
- package/lib/module/providers/anime/anikoto/create-anikoto.js +320 -436
- package/lib/module/providers/anime/anikoto/create-anikoto.js.map +1 -1
- package/lib/module/providers/anime/anikoto/hianime.js +69 -0
- package/lib/module/providers/anime/anikoto/hianime.js.map +1 -0
- package/lib/module/providers/anime/animepahe/animepahe.js +2 -66
- package/lib/module/providers/anime/animepahe/animepahe.js.map +1 -1
- package/lib/module/providers/anime/animepahe/create-animepahe.js +260 -190
- package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/module/providers/anime/helpers.js +12 -0
- package/lib/module/providers/anime/helpers.js.map +1 -0
- package/lib/module/providers/anime/index.js +1 -13
- package/lib/module/providers/anime/index.js.map +1 -1
- package/lib/module/providers/anime/reanime/create-reanime.js +40 -60
- package/lib/module/providers/anime/reanime/create-reanime.js.map +1 -1
- package/lib/module/providers/anime/reanime/reanime.js +2 -26
- package/lib/module/providers/anime/reanime/reanime.js.map +1 -1
- package/lib/module/providers/common/concurrency.js +34 -0
- package/lib/module/providers/common/concurrency.js.map +1 -0
- package/lib/module/providers/common/enc-dec.js +5 -0
- package/lib/module/providers/common/enc-dec.js.map +1 -0
- package/lib/module/providers/common/errors.js +70 -0
- package/lib/module/providers/common/errors.js.map +1 -0
- package/lib/module/providers/common/media-status.js +17 -0
- package/lib/module/providers/common/media-status.js.map +1 -0
- package/lib/module/providers/common/search.js +11 -0
- package/lib/module/providers/common/search.js.map +1 -0
- package/lib/module/providers/common/servers.js +40 -0
- package/lib/module/providers/common/servers.js.map +1 -0
- package/lib/module/providers/common/ttl-cache.js +54 -0
- package/lib/module/providers/common/ttl-cache.js.map +1 -0
- package/lib/module/providers/index.js +5 -6
- package/lib/module/providers/index.js.map +1 -1
- package/lib/module/providers/light-novels/novelupdates.js +51 -99
- package/lib/module/providers/light-novels/novelupdates.js.map +1 -1
- package/lib/module/providers/light-novels/readlightnovels.js +52 -93
- package/lib/module/providers/light-novels/readlightnovels.js.map +1 -1
- package/lib/module/providers/manga/asurascans.js +43 -56
- package/lib/module/providers/manga/asurascans.js.map +1 -1
- package/lib/module/providers/manga/flamescans.js +12 -34
- package/lib/module/providers/manga/flamescans.js.map +1 -1
- package/lib/module/providers/manga/mangadex.js +19 -18
- package/lib/module/providers/manga/mangadex.js.map +1 -1
- package/lib/module/providers/manga/mangahere.js +108 -170
- package/lib/module/providers/manga/mangahere.js.map +1 -1
- package/lib/module/providers/manga/mangakakalot.js +27 -57
- package/lib/module/providers/manga/mangakakalot.js.map +1 -1
- package/lib/module/providers/manga/mangapill.js +83 -122
- package/lib/module/providers/manga/mangapill.js.map +1 -1
- package/lib/module/providers/manga/shared.js +63 -0
- package/lib/module/providers/manga/shared.js.map +1 -0
- package/lib/module/providers/meta/anilist-media.js +239 -0
- package/lib/module/providers/meta/anilist-media.js.map +1 -0
- package/lib/module/providers/meta/anilist.js +429 -837
- package/lib/module/providers/meta/anilist.js.map +1 -1
- package/lib/module/providers/meta/index.js +1 -1
- package/lib/module/providers/meta/index.js.map +1 -1
- package/lib/module/providers/meta/mal.js +136 -322
- package/lib/module/providers/meta/mal.js.map +1 -1
- package/lib/module/providers/meta/shared.js +124 -0
- package/lib/module/providers/meta/shared.js.map +1 -0
- package/lib/module/providers/meta/tmdb.js +251 -299
- package/lib/module/providers/meta/tmdb.js.map +1 -1
- package/lib/module/providers/movies/index.js +5 -13
- package/lib/module/providers/movies/index.js.map +1 -1
- package/lib/module/providers/movies/multimovies/create-multimovies.js +218 -409
- package/lib/module/providers/movies/multimovies/create-multimovies.js.map +1 -1
- package/lib/module/providers/movies/multimovies/multimovies.js +2 -42
- package/lib/module/providers/movies/multimovies/multimovies.js.map +1 -1
- package/lib/module/providers/movies/multistream/create-multistream.js +127 -0
- package/lib/module/providers/movies/multistream/create-multistream.js.map +1 -0
- package/lib/module/providers/movies/multistream/multistream.js +9 -0
- package/lib/module/providers/movies/multistream/multistream.js.map +1 -0
- package/lib/module/providers/movies/multistream/utils.js +325 -397
- package/lib/module/providers/movies/multistream/utils.js.map +1 -1
- package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js +69 -15
- package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
- package/lib/module/providers/movies/netflixmirror/netflixmirror.js +6 -14
- package/lib/module/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
- package/lib/module/providers/movies/site-paths.js +28 -0
- package/lib/module/providers/movies/site-paths.js.map +1 -0
- package/lib/module/providers/movies/vegamovies/create-vegamovies.js +474 -654
- package/lib/module/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
- package/lib/module/providers/movies/vegamovies/vegamovies.js +2 -44
- package/lib/module/providers/movies/vegamovies/vegamovies.js.map +1 -1
- package/lib/module/providers/provider-class.js +25 -0
- package/lib/module/providers/provider-class.js.map +1 -0
- package/lib/module/registry-signing-keys.json +6 -0
- package/lib/module/utils/ExtractorManager.js +155 -215
- package/lib/module/utils/ExtractorManager.js.map +1 -1
- package/lib/module/utils/ProviderManager.js +128 -241
- package/lib/module/utils/ProviderManager.js.map +1 -1
- package/lib/module/utils/constants.js +2 -8
- package/lib/module/utils/constants.js.map +1 -1
- package/lib/module/utils/create-extractor-context.js +28 -18
- package/lib/module/utils/create-extractor-context.js.map +1 -1
- package/lib/module/utils/create-provider-context.js +33 -98
- package/lib/module/utils/create-provider-context.js.map +1 -1
- package/lib/module/utils/extension-integrity.js +1 -1
- package/lib/module/utils/extension-integrity.js.map +1 -1
- package/lib/module/utils/extension-modules.js +270 -44
- package/lib/module/utils/extension-modules.js.map +1 -1
- package/lib/module/utils/fetch-with-timeout.js +3 -2
- package/lib/module/utils/fetch-with-timeout.js.map +1 -1
- package/lib/module/utils/meta-http.js +17 -26
- package/lib/module/utils/meta-http.js.map +1 -1
- package/lib/module/utils/registry-schema.js +48 -15
- package/lib/module/utils/registry-schema.js.map +1 -1
- package/lib/module/utils/registry-signature-format.js +37 -0
- package/lib/module/utils/registry-signature-format.js.map +1 -0
- package/lib/module/utils/registry-signature.js +23 -58
- package/lib/module/utils/registry-signature.js.map +1 -1
- package/lib/module/utils/runtime-modules.js +10 -0
- package/lib/module/utils/runtime-modules.js.map +1 -0
- package/lib/module/utils/tmdb.js +172 -0
- package/lib/module/utils/tmdb.js.map +1 -0
- package/lib/module/utils/url-polyfill.js +1 -47
- package/lib/module/utils/url-polyfill.js.map +1 -1
- package/lib/module/utils/utf8.js +45 -0
- package/lib/module/utils/utf8.js.map +1 -0
- package/lib/module/utils/utils.js +16 -281
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts +44 -79
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/file-hosts.d.ts +18 -0
- package/lib/typescript/commonjs/src/extractors/file-hosts.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/extractors/flixcloud.d.ts +9 -9
- package/lib/typescript/commonjs/src/extractors/flixcloud.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/gofile.d.ts +5 -6
- package/lib/typescript/commonjs/src/extractors/gofile.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/hls.d.ts +14 -0
- package/lib/typescript/commonjs/src/extractors/hls.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts +8 -4
- package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/index.d.ts +4 -20
- package/lib/typescript/commonjs/src/extractors/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/kwik.d.ts +6 -7
- package/lib/typescript/commonjs/src/extractors/kwik.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/megacloud.d.ts +7 -5
- package/lib/typescript/commonjs/src/extractors/megacloud.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/megaplay.d.ts +6 -7
- package/lib/typescript/commonjs/src/extractors/megaplay.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/packer.d.ts +3 -0
- package/lib/typescript/commonjs/src/extractors/packer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/extractors/streamwish.d.ts +5 -7
- package/lib/typescript/commonjs/src/extractors/streamwish.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/url.d.ts +4 -0
- package/lib/typescript/commonjs/src/extractors/url.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/extractors/vidhide.d.ts +5 -7
- package/lib/typescript/commonjs/src/extractors/vidhide.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +17 -20
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/anime-parser.d.ts +10 -21
- package/lib/typescript/commonjs/src/models/anime-parser.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/base-parser.d.ts +0 -5
- package/lib/typescript/commonjs/src/models/base-parser.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/base-provider.d.ts +7 -31
- package/lib/typescript/commonjs/src/models/base-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/extension-manifest.d.ts +5 -1
- package/lib/typescript/commonjs/src/models/extension-manifest.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/extractor-context.d.ts +5 -34
- package/lib/typescript/commonjs/src/models/extractor-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/index.d.ts +13 -15
- package/lib/typescript/commonjs/src/models/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/lightnovel-parser.d.ts +5 -12
- package/lib/typescript/commonjs/src/models/lightnovel-parser.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/manga-parser.d.ts +2 -10
- package/lib/typescript/commonjs/src/models/manga-parser.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/meta-error.d.ts +9 -3
- package/lib/typescript/commonjs/src/models/meta-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/movie-parser.d.ts +8 -24
- package/lib/typescript/commonjs/src/models/movie-parser.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/provider-context.d.ts +11 -138
- package/lib/typescript/commonjs/src/models/provider-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/provider-error.d.ts +32 -0
- package/lib/typescript/commonjs/src/models/provider-error.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/types.d.ts +43 -39
- package/lib/typescript/commonjs/src/models/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/video-extractor.d.ts +7 -38
- package/lib/typescript/commonjs/src/models/video-extractor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts +4 -148
- package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts +2 -2
- package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/anikoto/hianime.d.ts +24 -0
- package/lib/typescript/commonjs/src/providers/anime/anikoto/hianime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/animepahe/animepahe.d.ts +4 -40
- 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 +4 -4
- package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/helpers.d.ts +6 -0
- package/lib/typescript/commonjs/src/providers/anime/helpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts +3 -18
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/reanime/create-reanime.d.ts +2 -2
- package/lib/typescript/commonjs/src/providers/anime/reanime/create-reanime.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/reanime/reanime.d.ts +4 -23
- package/lib/typescript/commonjs/src/providers/anime/reanime/reanime.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/common/concurrency.d.ts +8 -0
- package/lib/typescript/commonjs/src/providers/common/concurrency.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/common/enc-dec.d.ts +3 -0
- package/lib/typescript/commonjs/src/providers/common/enc-dec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/common/errors.d.ts +36 -0
- package/lib/typescript/commonjs/src/providers/common/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/common/media-status.d.ts +7 -0
- package/lib/typescript/commonjs/src/providers/common/media-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/common/search.d.ts +4 -0
- package/lib/typescript/commonjs/src/providers/common/search.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/common/servers.d.ts +17 -0
- package/lib/typescript/commonjs/src/providers/common/servers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/common/ttl-cache.d.ts +21 -0
- package/lib/typescript/commonjs/src/providers/common/ttl-cache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/index.d.ts +5 -6
- package/lib/typescript/commonjs/src/providers/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/light-novels/novelupdates.d.ts +11 -12
- package/lib/typescript/commonjs/src/providers/light-novels/novelupdates.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/light-novels/readlightnovels.d.ts +3 -11
- package/lib/typescript/commonjs/src/providers/light-novels/readlightnovels.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/manga/asurascans.d.ts +1 -5
- package/lib/typescript/commonjs/src/providers/manga/asurascans.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/manga/flamescans.d.ts +2 -4
- package/lib/typescript/commonjs/src/providers/manga/flamescans.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/manga/mangadex.d.ts +6 -4
- package/lib/typescript/commonjs/src/providers/manga/mangadex.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/manga/mangahere.d.ts +4 -4
- package/lib/typescript/commonjs/src/providers/manga/mangahere.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/manga/mangakakalot.d.ts +4 -13
- package/lib/typescript/commonjs/src/providers/manga/mangakakalot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/manga/mangapill.d.ts +1 -8
- package/lib/typescript/commonjs/src/providers/manga/mangapill.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/manga/shared.d.ts +28 -0
- package/lib/typescript/commonjs/src/providers/manga/shared.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/meta/anilist-media.d.ts +188 -0
- package/lib/typescript/commonjs/src/providers/meta/anilist-media.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts +90 -131
- package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/index.d.ts +1 -2
- package/lib/typescript/commonjs/src/providers/meta/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/mal.d.ts +12 -18
- package/lib/typescript/commonjs/src/providers/meta/mal.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/shared.d.ts +48 -0
- package/lib/typescript/commonjs/src/providers/meta/shared.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts +77 -26
- package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/index.d.ts +8 -20
- package/lib/typescript/commonjs/src/providers/movies/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts +8 -3
- package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multimovies/multimovies.d.ts +4 -25
- package/lib/typescript/commonjs/src/providers/movies/multimovies/multimovies.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multistream/create-multistream.d.ts +26 -0
- package/lib/typescript/commonjs/src/providers/movies/multistream/create-multistream.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/movies/multistream/multistream.d.ts +6 -0
- package/lib/typescript/commonjs/src/providers/movies/multistream/multistream.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts +21 -19
- package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts +40 -8
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netflixmirror.d.ts +8 -11
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netflixmirror.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/site-paths.d.ts +12 -0
- package/lib/typescript/commonjs/src/providers/movies/site-paths.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts +9 -3
- package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts +4 -27
- package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/provider-class.d.ts +23 -0
- package/lib/typescript/commonjs/src/providers/provider-class.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts +57 -49
- package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts +50 -69
- package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/constants.d.ts +2 -7
- package/lib/typescript/commonjs/src/utils/constants.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/create-extractor-context.d.ts +17 -5
- 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 +12 -8
- package/lib/typescript/commonjs/src/utils/create-provider-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/extension-integrity.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/extension-modules.d.ts +74 -24
- package/lib/typescript/commonjs/src/utils/extension-modules.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/fetch-with-timeout.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/fetch-with-timeout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/meta-http.d.ts +2 -13
- package/lib/typescript/commonjs/src/utils/meta-http.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/registry-schema.d.ts +27 -1
- package/lib/typescript/commonjs/src/utils/registry-schema.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/registry-signature-format.d.ts +15 -0
- package/lib/typescript/commonjs/src/utils/registry-signature-format.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/registry-signature.d.ts +10 -4
- package/lib/typescript/commonjs/src/utils/registry-signature.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/runtime-modules.d.ts +8 -0
- package/lib/typescript/commonjs/src/utils/runtime-modules.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/tmdb.d.ts +86 -0
- package/lib/typescript/commonjs/src/utils/tmdb.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/url-polyfill.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/utf8.d.ts +7 -0
- package/lib/typescript/commonjs/src/utils/utf8.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/utils.d.ts +12 -36
- package/lib/typescript/commonjs/src/utils/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeConsumet.d.ts +44 -79
- package/lib/typescript/module/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/file-hosts.d.ts +18 -0
- package/lib/typescript/module/src/extractors/file-hosts.d.ts.map +1 -0
- package/lib/typescript/module/src/extractors/flixcloud.d.ts +9 -9
- package/lib/typescript/module/src/extractors/flixcloud.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/gofile.d.ts +5 -6
- package/lib/typescript/module/src/extractors/gofile.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/hls.d.ts +14 -0
- package/lib/typescript/module/src/extractors/hls.d.ts.map +1 -0
- package/lib/typescript/module/src/extractors/hubcloud.d.ts +8 -4
- package/lib/typescript/module/src/extractors/hubcloud.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/index.d.ts +4 -20
- package/lib/typescript/module/src/extractors/index.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/kwik.d.ts +6 -7
- package/lib/typescript/module/src/extractors/kwik.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/megacloud.d.ts +7 -5
- package/lib/typescript/module/src/extractors/megacloud.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/megaplay.d.ts +6 -7
- package/lib/typescript/module/src/extractors/megaplay.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/packer.d.ts +3 -0
- package/lib/typescript/module/src/extractors/packer.d.ts.map +1 -0
- package/lib/typescript/module/src/extractors/streamwish.d.ts +5 -7
- package/lib/typescript/module/src/extractors/streamwish.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/url.d.ts +4 -0
- package/lib/typescript/module/src/extractors/url.d.ts.map +1 -0
- package/lib/typescript/module/src/extractors/vidhide.d.ts +5 -7
- package/lib/typescript/module/src/extractors/vidhide.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +17 -20
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/anime-parser.d.ts +10 -21
- package/lib/typescript/module/src/models/anime-parser.d.ts.map +1 -1
- package/lib/typescript/module/src/models/base-parser.d.ts +0 -5
- package/lib/typescript/module/src/models/base-parser.d.ts.map +1 -1
- package/lib/typescript/module/src/models/base-provider.d.ts +7 -31
- package/lib/typescript/module/src/models/base-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/models/extension-manifest.d.ts +5 -1
- package/lib/typescript/module/src/models/extension-manifest.d.ts.map +1 -1
- package/lib/typescript/module/src/models/extractor-context.d.ts +5 -34
- package/lib/typescript/module/src/models/extractor-context.d.ts.map +1 -1
- package/lib/typescript/module/src/models/index.d.ts +13 -15
- package/lib/typescript/module/src/models/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/lightnovel-parser.d.ts +5 -12
- package/lib/typescript/module/src/models/lightnovel-parser.d.ts.map +1 -1
- package/lib/typescript/module/src/models/manga-parser.d.ts +2 -10
- package/lib/typescript/module/src/models/manga-parser.d.ts.map +1 -1
- package/lib/typescript/module/src/models/meta-error.d.ts +9 -3
- package/lib/typescript/module/src/models/meta-error.d.ts.map +1 -1
- package/lib/typescript/module/src/models/movie-parser.d.ts +8 -24
- package/lib/typescript/module/src/models/movie-parser.d.ts.map +1 -1
- package/lib/typescript/module/src/models/provider-context.d.ts +11 -138
- package/lib/typescript/module/src/models/provider-context.d.ts.map +1 -1
- package/lib/typescript/module/src/models/provider-error.d.ts +32 -0
- package/lib/typescript/module/src/models/provider-error.d.ts.map +1 -0
- package/lib/typescript/module/src/models/types.d.ts +43 -39
- package/lib/typescript/module/src/models/types.d.ts.map +1 -1
- package/lib/typescript/module/src/models/video-extractor.d.ts +7 -38
- package/lib/typescript/module/src/models/video-extractor.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts +4 -148
- package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts +2 -2
- package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/anikoto/hianime.d.ts +24 -0
- package/lib/typescript/module/src/providers/anime/anikoto/hianime.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/animepahe/animepahe.d.ts +4 -40
- 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 +4 -4
- package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/helpers.d.ts +6 -0
- package/lib/typescript/module/src/providers/anime/helpers.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/index.d.ts +3 -18
- package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/reanime/create-reanime.d.ts +2 -2
- package/lib/typescript/module/src/providers/anime/reanime/create-reanime.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/reanime/reanime.d.ts +4 -23
- package/lib/typescript/module/src/providers/anime/reanime/reanime.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/common/concurrency.d.ts +8 -0
- package/lib/typescript/module/src/providers/common/concurrency.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/common/enc-dec.d.ts +3 -0
- package/lib/typescript/module/src/providers/common/enc-dec.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/common/errors.d.ts +36 -0
- package/lib/typescript/module/src/providers/common/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/common/media-status.d.ts +7 -0
- package/lib/typescript/module/src/providers/common/media-status.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/common/search.d.ts +4 -0
- package/lib/typescript/module/src/providers/common/search.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/common/servers.d.ts +17 -0
- package/lib/typescript/module/src/providers/common/servers.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/common/ttl-cache.d.ts +21 -0
- package/lib/typescript/module/src/providers/common/ttl-cache.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/index.d.ts +5 -6
- package/lib/typescript/module/src/providers/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/light-novels/novelupdates.d.ts +11 -12
- package/lib/typescript/module/src/providers/light-novels/novelupdates.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/light-novels/readlightnovels.d.ts +3 -11
- package/lib/typescript/module/src/providers/light-novels/readlightnovels.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/manga/asurascans.d.ts +1 -5
- package/lib/typescript/module/src/providers/manga/asurascans.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/manga/flamescans.d.ts +2 -4
- package/lib/typescript/module/src/providers/manga/flamescans.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/manga/mangadex.d.ts +6 -4
- package/lib/typescript/module/src/providers/manga/mangadex.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/manga/mangahere.d.ts +4 -4
- package/lib/typescript/module/src/providers/manga/mangahere.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/manga/mangakakalot.d.ts +4 -13
- package/lib/typescript/module/src/providers/manga/mangakakalot.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/manga/mangapill.d.ts +1 -8
- package/lib/typescript/module/src/providers/manga/mangapill.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/manga/shared.d.ts +28 -0
- package/lib/typescript/module/src/providers/manga/shared.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/meta/anilist-media.d.ts +188 -0
- package/lib/typescript/module/src/providers/meta/anilist-media.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/meta/anilist.d.ts +90 -131
- package/lib/typescript/module/src/providers/meta/anilist.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/index.d.ts +1 -2
- package/lib/typescript/module/src/providers/meta/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/mal.d.ts +12 -18
- package/lib/typescript/module/src/providers/meta/mal.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/shared.d.ts +48 -0
- package/lib/typescript/module/src/providers/meta/shared.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/meta/tmdb.d.ts +77 -26
- package/lib/typescript/module/src/providers/meta/tmdb.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/index.d.ts +8 -20
- package/lib/typescript/module/src/providers/movies/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts +8 -3
- package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/multimovies/multimovies.d.ts +4 -25
- package/lib/typescript/module/src/providers/movies/multimovies/multimovies.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/multistream/create-multistream.d.ts +26 -0
- package/lib/typescript/module/src/providers/movies/multistream/create-multistream.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/movies/multistream/multistream.d.ts +6 -0
- package/lib/typescript/module/src/providers/movies/multistream/multistream.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts +21 -19
- package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts +40 -8
- package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/netflixmirror/netflixmirror.d.ts +8 -11
- package/lib/typescript/module/src/providers/movies/netflixmirror/netflixmirror.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/site-paths.d.ts +12 -0
- package/lib/typescript/module/src/providers/movies/site-paths.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts +9 -3
- package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts +4 -27
- package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/provider-class.d.ts +23 -0
- package/lib/typescript/module/src/providers/provider-class.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/ExtractorManager.d.ts +57 -49
- package/lib/typescript/module/src/utils/ExtractorManager.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/ProviderManager.d.ts +50 -69
- package/lib/typescript/module/src/utils/ProviderManager.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/constants.d.ts +2 -7
- package/lib/typescript/module/src/utils/constants.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/create-extractor-context.d.ts +17 -5
- 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 +12 -8
- package/lib/typescript/module/src/utils/create-provider-context.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/extension-integrity.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/extension-modules.d.ts +74 -24
- package/lib/typescript/module/src/utils/extension-modules.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/fetch-with-timeout.d.ts +1 -1
- package/lib/typescript/module/src/utils/fetch-with-timeout.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/meta-http.d.ts +2 -13
- package/lib/typescript/module/src/utils/meta-http.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/registry-schema.d.ts +27 -1
- package/lib/typescript/module/src/utils/registry-schema.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/registry-signature-format.d.ts +15 -0
- package/lib/typescript/module/src/utils/registry-signature-format.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/registry-signature.d.ts +10 -4
- package/lib/typescript/module/src/utils/registry-signature.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/runtime-modules.d.ts +8 -0
- package/lib/typescript/module/src/utils/runtime-modules.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/tmdb.d.ts +86 -0
- package/lib/typescript/module/src/utils/tmdb.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/url-polyfill.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/utf8.d.ts +7 -0
- package/lib/typescript/module/src/utils/utf8.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/utils.d.ts +12 -36
- package/lib/typescript/module/src/utils/utils.d.ts.map +1 -1
- package/package.json +8 -10
- package/src/NativeConsumet.ts +50 -52
- package/src/extension-registry.json +48 -188
- package/src/extension-registry.json.sig +1 -1
- package/src/extractors/file-hosts.ts +29 -0
- package/src/extractors/flixcloud.ts +23 -53
- package/src/extractors/gofile.ts +140 -128
- package/src/extractors/hls.ts +43 -0
- package/src/extractors/hubcloud.ts +147 -331
- package/src/extractors/index.ts +4 -20
- package/src/extractors/kwik.ts +17 -56
- package/src/extractors/megacloud.ts +50 -153
- package/src/extractors/megaplay.ts +77 -147
- package/src/extractors/packer.ts +40 -0
- package/src/extractors/streamwish.ts +50 -122
- package/src/extractors/url.ts +6 -0
- package/src/extractors/vidhide.ts +29 -81
- package/src/index.tsx +51 -228
- package/src/models/anime-parser.ts +12 -21
- package/src/models/base-parser.ts +0 -5
- package/src/models/base-provider.ts +7 -31
- package/src/models/extension-manifest.ts +7 -1
- package/src/models/extractor-context.ts +5 -46
- package/src/models/index.ts +13 -119
- package/src/models/lightnovel-parser.ts +5 -12
- package/src/models/manga-parser.ts +2 -10
- package/src/models/meta-error.ts +12 -5
- package/src/models/movie-parser.ts +9 -24
- package/src/models/provider-context.ts +11 -149
- package/src/models/provider-error.ts +57 -0
- package/src/models/types.ts +40 -41
- package/src/models/video-extractor.ts +7 -43
- package/src/providers/anime/anikoto/anikoto.ts +5 -218
- package/src/providers/anime/anikoto/create-anikoto.ts +321 -510
- package/src/providers/anime/anikoto/hianime.ts +67 -0
- package/src/providers/anime/animepahe/animepahe.ts +5 -78
- package/src/providers/anime/animepahe/create-animepahe.ts +253 -212
- package/src/providers/anime/helpers.ts +9 -0
- package/src/providers/anime/index.ts +0 -12
- package/src/providers/anime/reanime/create-reanime.ts +37 -62
- package/src/providers/anime/reanime/reanime.ts +5 -44
- package/src/providers/common/concurrency.ts +32 -0
- package/src/providers/common/enc-dec.ts +2 -0
- package/src/providers/common/errors.ts +84 -0
- package/src/providers/common/media-status.ts +20 -0
- package/src/providers/common/search.ts +6 -0
- package/src/providers/common/servers.ts +40 -0
- package/src/providers/common/ttl-cache.ts +65 -0
- package/src/providers/index.ts +5 -7
- package/src/providers/light-novels/novelupdates.ts +55 -125
- package/src/providers/light-novels/readlightnovels.ts +81 -117
- package/src/providers/manga/asurascans.ts +46 -64
- package/src/providers/manga/flamescans.ts +11 -44
- package/src/providers/manga/mangadex.ts +15 -23
- package/src/providers/manga/mangahere.ts +112 -188
- package/src/providers/manga/mangakakalot.ts +25 -66
- package/src/providers/manga/mangapill.ts +105 -149
- package/src/providers/manga/shared.ts +71 -0
- package/src/providers/meta/anilist-media.ts +235 -0
- package/src/providers/meta/anilist.ts +460 -892
- package/src/providers/meta/index.ts +1 -1
- package/src/providers/meta/mal.ts +156 -416
- package/src/providers/meta/shared.ts +136 -0
- package/src/providers/meta/tmdb.ts +334 -358
- package/src/providers/movies/index.ts +4 -12
- package/src/providers/movies/multimovies/create-multimovies.ts +215 -452
- package/src/providers/movies/multimovies/multimovies.ts +5 -58
- package/src/providers/movies/multistream/create-multistream.ts +141 -0
- package/src/providers/movies/multistream/multistream.ts +7 -0
- package/src/providers/movies/multistream/utils.ts +234 -410
- package/src/providers/movies/netflixmirror/create-netflixmirror.ts +72 -34
- package/src/providers/movies/netflixmirror/netflixmirror.ts +9 -15
- package/src/providers/movies/site-paths.ts +25 -0
- package/src/providers/movies/vegamovies/create-vegamovies.ts +450 -725
- package/src/providers/movies/vegamovies/vegamovies.ts +5 -62
- package/src/providers/provider-class.ts +39 -0
- package/src/registry-signing-keys.json +6 -0
- package/src/utils/ExtractorManager.ts +177 -237
- package/src/utils/ProviderManager.ts +170 -278
- package/src/utils/constants.ts +2 -10
- package/src/utils/create-extractor-context.ts +36 -28
- package/src/utils/create-provider-context.ts +51 -121
- package/src/utils/extension-integrity.ts +1 -2
- package/src/utils/extension-modules.ts +281 -61
- package/src/utils/fetch-with-timeout.ts +4 -2
- package/src/utils/meta-http.ts +20 -27
- package/src/utils/registry-schema.ts +48 -15
- package/src/utils/registry-signature-format.ts +37 -0
- package/src/utils/registry-signature.ts +26 -67
- package/src/utils/runtime-modules.ts +7 -0
- package/src/utils/tmdb.ts +186 -0
- package/src/utils/url-polyfill.ts +2 -46
- package/src/utils/utf8.ts +44 -0
- package/src/utils/utils.ts +16 -362
- package/android/src/main/AndroidManifestNew.xml +0 -3
- package/android/src/main/java/com/consumet/DdosGuardModule.kt +0 -179
- package/lib/commonjs/extractors/asianload.js +0 -75
- package/lib/commonjs/extractors/asianload.js.map +0 -1
- package/lib/commonjs/extractors/filemoon.js +0 -66
- package/lib/commonjs/extractors/filemoon.js.map +0 -1
- package/lib/commonjs/extractors/gdflix.js +0 -165
- package/lib/commonjs/extractors/gdflix.js.map +0 -1
- package/lib/commonjs/extractors/gogocdn.js +0 -128
- package/lib/commonjs/extractors/gogocdn.js.map +0 -1
- package/lib/commonjs/extractors/megaup.js +0 -113
- package/lib/commonjs/extractors/megaup.js.map +0 -1
- package/lib/commonjs/extractors/mixdrop.js +0 -37
- package/lib/commonjs/extractors/mixdrop.js.map +0 -1
- package/lib/commonjs/extractors/mp4player.js +0 -57
- package/lib/commonjs/extractors/mp4player.js.map +0 -1
- package/lib/commonjs/extractors/mp4upload.js +0 -38
- package/lib/commonjs/extractors/mp4upload.js.map +0 -1
- package/lib/commonjs/extractors/rapidcloud.js +0 -180
- package/lib/commonjs/extractors/rapidcloud.js.map +0 -1
- package/lib/commonjs/extractors/streamhub.js +0 -61
- package/lib/commonjs/extractors/streamhub.js.map +0 -1
- package/lib/commonjs/extractors/streamlare.js +0 -55
- package/lib/commonjs/extractors/streamlare.js.map +0 -1
- package/lib/commonjs/extractors/streamsb.js +0 -69
- package/lib/commonjs/extractors/streamsb.js.map +0 -1
- package/lib/commonjs/extractors/streamtape.js +0 -42
- package/lib/commonjs/extractors/streamtape.js.map +0 -1
- package/lib/commonjs/extractors/vidmoly.js +0 -54
- package/lib/commonjs/extractors/vidmoly.js.map +0 -1
- package/lib/commonjs/extractors/vizcloud.js +0 -67
- package/lib/commonjs/extractors/vizcloud.js.map +0 -1
- package/lib/commonjs/extractors/voe.js +0 -100
- package/lib/commonjs/extractors/voe.js.map +0 -1
- package/lib/commonjs/models/base-types.js +0 -2
- package/lib/commonjs/models/base-types.js.map +0 -1
- package/lib/commonjs/providers/anime/animekai/animekai.js +0 -118
- package/lib/commonjs/providers/anime/animekai/animekai.js.map +0 -1
- package/lib/commonjs/providers/anime/animekai/create-animekai.js +0 -518
- package/lib/commonjs/providers/anime/animekai/create-animekai.js.map +0 -1
- package/lib/commonjs/providers/anime/animeunity.js +0 -187
- package/lib/commonjs/providers/anime/animeunity.js.map +0 -1
- package/lib/commonjs/providers/anime/anineko/anineko.js +0 -41
- package/lib/commonjs/providers/anime/anineko/anineko.js.map +0 -1
- package/lib/commonjs/providers/anime/anineko/create-anineko.js +0 -449
- package/lib/commonjs/providers/anime/anineko/create-anineko.js.map +0 -1
- package/lib/commonjs/providers/anime/zoro/create-zoro.js +0 -586
- package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +0 -1
- package/lib/commonjs/providers/anime/zoro/zoro.js +0 -193
- package/lib/commonjs/providers/anime/zoro/zoro.js.map +0 -1
- package/lib/commonjs/providers/meta/tmdb-api-key.js +0 -29
- package/lib/commonjs/providers/meta/tmdb-api-key.js.map +0 -1
- package/lib/commonjs/providers/movies/himovies/create-himovies.js +0 -436
- package/lib/commonjs/providers/movies/himovies/create-himovies.js.map +0 -1
- package/lib/commonjs/providers/movies/himovies/himovies.js +0 -79
- package/lib/commonjs/providers/movies/himovies/himovies.js.map +0 -1
- package/lib/commonjs/providers/movies/multistream/index.js +0 -222
- package/lib/commonjs/providers/movies/multistream/index.js.map +0 -1
- package/lib/commonjs/providers/movies/netflixmirror/disneymirror.js +0 -22
- package/lib/commonjs/providers/movies/netflixmirror/disneymirror.js.map +0 -1
- package/lib/commonjs/providers/movies/netflixmirror/netmirror-parser.js +0 -30
- package/lib/commonjs/providers/movies/netflixmirror/netmirror-parser.js.map +0 -1
- package/lib/commonjs/providers/movies/netflixmirror/primemirror.js +0 -22
- package/lib/commonjs/providers/movies/netflixmirror/primemirror.js.map +0 -1
- package/lib/commonjs/providers/movies/yflix/create-yflix.js +0 -418
- package/lib/commonjs/providers/movies/yflix/create-yflix.js.map +0 -1
- package/lib/commonjs/providers/movies/yflix/yflix.js +0 -66
- package/lib/commonjs/providers/movies/yflix/yflix.js.map +0 -1
- package/lib/commonjs/providers/provider-args.js +0 -17
- package/lib/commonjs/providers/provider-args.js.map +0 -1
- package/lib/commonjs/registry-signing-keys.js +0 -26
- package/lib/commonjs/registry-signing-keys.js.map +0 -1
- package/lib/commonjs/utils/extension-utils.js +0 -105
- package/lib/commonjs/utils/extension-utils.js.map +0 -1
- package/lib/commonjs/utils/index.js +0 -312
- package/lib/commonjs/utils/index.js.map +0 -1
- package/lib/commonjs/utils/provider-maps.js +0 -69
- package/lib/commonjs/utils/provider-maps.js.map +0 -1
- package/lib/commonjs/utils/queries.js +0 -45
- package/lib/commonjs/utils/queries.js.map +0 -1
- package/lib/module/extractors/asianload.js +0 -69
- package/lib/module/extractors/asianload.js.map +0 -1
- package/lib/module/extractors/filemoon.js +0 -62
- package/lib/module/extractors/filemoon.js.map +0 -1
- package/lib/module/extractors/gdflix.js +0 -161
- package/lib/module/extractors/gdflix.js.map +0 -1
- package/lib/module/extractors/gogocdn.js +0 -122
- package/lib/module/extractors/gogocdn.js.map +0 -1
- package/lib/module/extractors/megaup.js +0 -109
- package/lib/module/extractors/megaup.js.map +0 -1
- package/lib/module/extractors/mixdrop.js +0 -32
- package/lib/module/extractors/mixdrop.js.map +0 -1
- package/lib/module/extractors/mp4player.js +0 -52
- package/lib/module/extractors/mp4player.js.map +0 -1
- package/lib/module/extractors/mp4upload.js +0 -33
- package/lib/module/extractors/mp4upload.js.map +0 -1
- package/lib/module/extractors/rapidcloud.js +0 -174
- package/lib/module/extractors/rapidcloud.js.map +0 -1
- package/lib/module/extractors/streamhub.js +0 -56
- package/lib/module/extractors/streamhub.js.map +0 -1
- package/lib/module/extractors/streamlare.js +0 -50
- package/lib/module/extractors/streamlare.js.map +0 -1
- package/lib/module/extractors/streamsb.js +0 -64
- package/lib/module/extractors/streamsb.js.map +0 -1
- package/lib/module/extractors/streamtape.js +0 -37
- package/lib/module/extractors/streamtape.js.map +0 -1
- package/lib/module/extractors/vidmoly.js +0 -49
- package/lib/module/extractors/vidmoly.js.map +0 -1
- package/lib/module/extractors/vizcloud.js +0 -62
- package/lib/module/extractors/vizcloud.js.map +0 -1
- package/lib/module/extractors/voe.js +0 -95
- package/lib/module/extractors/voe.js.map +0 -1
- package/lib/module/models/base-types.js +0 -2
- package/lib/module/models/base-types.js.map +0 -1
- package/lib/module/providers/anime/animekai/animekai.js +0 -113
- package/lib/module/providers/anime/animekai/animekai.js.map +0 -1
- package/lib/module/providers/anime/animekai/create-animekai.js +0 -514
- package/lib/module/providers/anime/animekai/create-animekai.js.map +0 -1
- package/lib/module/providers/anime/animeunity.js +0 -183
- package/lib/module/providers/anime/animeunity.js.map +0 -1
- package/lib/module/providers/anime/anineko/anineko.js +0 -36
- package/lib/module/providers/anime/anineko/anineko.js.map +0 -1
- package/lib/module/providers/anime/anineko/create-anineko.js +0 -445
- package/lib/module/providers/anime/anineko/create-anineko.js.map +0 -1
- package/lib/module/providers/anime/zoro/create-zoro.js +0 -582
- package/lib/module/providers/anime/zoro/create-zoro.js.map +0 -1
- package/lib/module/providers/anime/zoro/zoro.js +0 -189
- package/lib/module/providers/anime/zoro/zoro.js.map +0 -1
- package/lib/module/providers/meta/tmdb-api-key.js +0 -24
- package/lib/module/providers/meta/tmdb-api-key.js.map +0 -1
- package/lib/module/providers/movies/himovies/create-himovies.js +0 -432
- package/lib/module/providers/movies/himovies/create-himovies.js.map +0 -1
- package/lib/module/providers/movies/himovies/himovies.js +0 -75
- package/lib/module/providers/movies/himovies/himovies.js.map +0 -1
- package/lib/module/providers/movies/multistream/index.js +0 -217
- package/lib/module/providers/movies/multistream/index.js.map +0 -1
- package/lib/module/providers/movies/netflixmirror/disneymirror.js +0 -17
- package/lib/module/providers/movies/netflixmirror/disneymirror.js.map +0 -1
- package/lib/module/providers/movies/netflixmirror/netmirror-parser.js +0 -25
- package/lib/module/providers/movies/netflixmirror/netmirror-parser.js.map +0 -1
- package/lib/module/providers/movies/netflixmirror/primemirror.js +0 -17
- package/lib/module/providers/movies/netflixmirror/primemirror.js.map +0 -1
- package/lib/module/providers/movies/yflix/create-yflix.js +0 -414
- package/lib/module/providers/movies/yflix/create-yflix.js.map +0 -1
- package/lib/module/providers/movies/yflix/yflix.js +0 -61
- package/lib/module/providers/movies/yflix/yflix.js.map +0 -1
- package/lib/module/providers/provider-args.js +0 -14
- package/lib/module/providers/provider-args.js.map +0 -1
- package/lib/module/registry-signing-keys.js +0 -22
- package/lib/module/registry-signing-keys.js.map +0 -1
- package/lib/module/utils/extension-utils.js +0 -100
- package/lib/module/utils/extension-utils.js.map +0 -1
- package/lib/module/utils/index.js +0 -21
- package/lib/module/utils/index.js.map +0 -1
- package/lib/module/utils/provider-maps.js +0 -65
- package/lib/module/utils/provider-maps.js.map +0 -1
- package/lib/module/utils/queries.js +0 -29
- package/lib/module/utils/queries.js.map +0 -1
- package/lib/typescript/commonjs/src/extractors/asianload.d.ts +0 -17
- package/lib/typescript/commonjs/src/extractors/asianload.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/filemoon.d.ts +0 -14
- package/lib/typescript/commonjs/src/extractors/filemoon.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/gdflix.d.ts +0 -7
- package/lib/typescript/commonjs/src/extractors/gdflix.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/gogocdn.d.ts +0 -19
- package/lib/typescript/commonjs/src/extractors/gogocdn.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/megaup.d.ts +0 -6
- package/lib/typescript/commonjs/src/extractors/megaup.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/mixdrop.d.ts +0 -10
- package/lib/typescript/commonjs/src/extractors/mixdrop.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/mp4player.d.ts +0 -15
- package/lib/typescript/commonjs/src/extractors/mp4player.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/mp4upload.d.ts +0 -10
- package/lib/typescript/commonjs/src/extractors/mp4upload.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/rapidcloud.d.ts +0 -17
- package/lib/typescript/commonjs/src/extractors/rapidcloud.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/streamhub.d.ts +0 -14
- package/lib/typescript/commonjs/src/extractors/streamhub.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/streamlare.d.ts +0 -13
- package/lib/typescript/commonjs/src/extractors/streamlare.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/streamsb.d.ts +0 -14
- package/lib/typescript/commonjs/src/extractors/streamsb.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/streamtape.d.ts +0 -10
- package/lib/typescript/commonjs/src/extractors/streamtape.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/vidmoly.d.ts +0 -10
- package/lib/typescript/commonjs/src/extractors/vidmoly.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/vizcloud.d.ts +0 -12
- package/lib/typescript/commonjs/src/extractors/vizcloud.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/extractors/voe.d.ts +0 -15
- package/lib/typescript/commonjs/src/extractors/voe.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/models/base-types.d.ts +0 -23
- package/lib/typescript/commonjs/src/models/base-types.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/animekai/animekai.d.ts +0 -90
- package/lib/typescript/commonjs/src/providers/anime/animekai/animekai.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts +0 -32
- package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/animeunity.d.ts +0 -39
- package/lib/typescript/commonjs/src/providers/anime/animeunity.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/anineko/anineko.d.ts +0 -28
- package/lib/typescript/commonjs/src/providers/anime/anineko/anineko.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/anineko/create-anineko.d.ts +0 -52
- package/lib/typescript/commonjs/src/providers/anime/anineko/create-anineko.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts +0 -49
- package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts +0 -139
- package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/meta/tmdb-api-key.d.ts +0 -7
- package/lib/typescript/commonjs/src/providers/meta/tmdb-api-key.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts +0 -24
- package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts +0 -50
- package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts +0 -44
- package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/disneymirror.d.ts +0 -12
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/disneymirror.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netmirror-parser.d.ts +0 -21
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netmirror-parser.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/primemirror.d.ts +0 -12
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/primemirror.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/yflix/create-yflix.d.ts +0 -25
- package/lib/typescript/commonjs/src/providers/movies/yflix/create-yflix.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/yflix/yflix.d.ts +0 -49
- package/lib/typescript/commonjs/src/providers/movies/yflix/yflix.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/provider-args.d.ts +0 -8
- package/lib/typescript/commonjs/src/providers/provider-args.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/registry-signing-keys.d.ts +0 -18
- package/lib/typescript/commonjs/src/registry-signing-keys.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/extension-utils.d.ts +0 -31
- package/lib/typescript/commonjs/src/utils/extension-utils.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/index.d.ts +0 -19
- package/lib/typescript/commonjs/src/utils/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +0 -39
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/queries.d.ts +0 -22
- package/lib/typescript/commonjs/src/utils/queries.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/asianload.d.ts +0 -17
- package/lib/typescript/module/src/extractors/asianload.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/filemoon.d.ts +0 -14
- package/lib/typescript/module/src/extractors/filemoon.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/gdflix.d.ts +0 -7
- package/lib/typescript/module/src/extractors/gdflix.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/gogocdn.d.ts +0 -19
- package/lib/typescript/module/src/extractors/gogocdn.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/megaup.d.ts +0 -6
- package/lib/typescript/module/src/extractors/megaup.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/mixdrop.d.ts +0 -10
- package/lib/typescript/module/src/extractors/mixdrop.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/mp4player.d.ts +0 -15
- package/lib/typescript/module/src/extractors/mp4player.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/mp4upload.d.ts +0 -10
- package/lib/typescript/module/src/extractors/mp4upload.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/rapidcloud.d.ts +0 -17
- package/lib/typescript/module/src/extractors/rapidcloud.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/streamhub.d.ts +0 -14
- package/lib/typescript/module/src/extractors/streamhub.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/streamlare.d.ts +0 -13
- package/lib/typescript/module/src/extractors/streamlare.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/streamsb.d.ts +0 -14
- package/lib/typescript/module/src/extractors/streamsb.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/streamtape.d.ts +0 -10
- package/lib/typescript/module/src/extractors/streamtape.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/vidmoly.d.ts +0 -10
- package/lib/typescript/module/src/extractors/vidmoly.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/vizcloud.d.ts +0 -12
- package/lib/typescript/module/src/extractors/vizcloud.d.ts.map +0 -1
- package/lib/typescript/module/src/extractors/voe.d.ts +0 -15
- package/lib/typescript/module/src/extractors/voe.d.ts.map +0 -1
- package/lib/typescript/module/src/models/base-types.d.ts +0 -23
- package/lib/typescript/module/src/models/base-types.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/animekai/animekai.d.ts +0 -90
- package/lib/typescript/module/src/providers/anime/animekai/animekai.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts +0 -32
- package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/animeunity.d.ts +0 -39
- package/lib/typescript/module/src/providers/anime/animeunity.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/anineko/anineko.d.ts +0 -28
- package/lib/typescript/module/src/providers/anime/anineko/anineko.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/anineko/create-anineko.d.ts +0 -52
- package/lib/typescript/module/src/providers/anime/anineko/create-anineko.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts +0 -49
- package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts +0 -139
- package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/meta/tmdb-api-key.d.ts +0 -7
- package/lib/typescript/module/src/providers/meta/tmdb-api-key.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts +0 -24
- package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts +0 -50
- package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/multistream/index.d.ts +0 -44
- package/lib/typescript/module/src/providers/movies/multistream/index.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/netflixmirror/disneymirror.d.ts +0 -12
- package/lib/typescript/module/src/providers/movies/netflixmirror/disneymirror.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/netflixmirror/netmirror-parser.d.ts +0 -21
- package/lib/typescript/module/src/providers/movies/netflixmirror/netmirror-parser.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/netflixmirror/primemirror.d.ts +0 -12
- package/lib/typescript/module/src/providers/movies/netflixmirror/primemirror.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/yflix/create-yflix.d.ts +0 -25
- package/lib/typescript/module/src/providers/movies/yflix/create-yflix.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/yflix/yflix.d.ts +0 -49
- package/lib/typescript/module/src/providers/movies/yflix/yflix.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/provider-args.d.ts +0 -8
- package/lib/typescript/module/src/providers/provider-args.d.ts.map +0 -1
- package/lib/typescript/module/src/registry-signing-keys.d.ts +0 -18
- package/lib/typescript/module/src/registry-signing-keys.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/extension-utils.d.ts +0 -31
- package/lib/typescript/module/src/utils/extension-utils.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/index.d.ts +0 -19
- package/lib/typescript/module/src/utils/index.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/provider-maps.d.ts +0 -39
- package/lib/typescript/module/src/utils/provider-maps.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/queries.d.ts +0 -22
- package/lib/typescript/module/src/utils/queries.d.ts.map +0 -1
- package/src/extractors/asianload.ts +0 -89
- package/src/extractors/filemoon.ts +0 -60
- package/src/extractors/gdflix.ts +0 -165
- package/src/extractors/gogocdn.ts +0 -155
- package/src/extractors/megaup.ts +0 -125
- package/src/extractors/mixdrop.ts +0 -35
- package/src/extractors/mp4player.ts +0 -57
- package/src/extractors/mp4upload.ts +0 -35
- package/src/extractors/rapidcloud.ts +0 -200
- package/src/extractors/streamhub.ts +0 -62
- package/src/extractors/streamlare.ts +0 -65
- package/src/extractors/streamsb.ts +0 -77
- package/src/extractors/streamtape.ts +0 -42
- package/src/extractors/vidmoly.ts +0 -52
- package/src/extractors/vizcloud.ts +0 -70
- package/src/extractors/voe.ts +0 -107
- package/src/models/base-types.ts +0 -23
- package/src/providers/anime/animekai/animekai.ts +0 -126
- package/src/providers/anime/animekai/create-animekai.ts +0 -589
- package/src/providers/anime/animeunity.ts +0 -226
- package/src/providers/anime/anineko/anineko.ts +0 -54
- package/src/providers/anime/anineko/create-anineko.ts +0 -490
- package/src/providers/anime/zoro/create-zoro.ts +0 -645
- package/src/providers/anime/zoro/zoro.ts +0 -201
- package/src/providers/meta/tmdb-api-key.ts +0 -27
- package/src/providers/movies/himovies/create-himovies.ts +0 -518
- package/src/providers/movies/himovies/himovies.ts +0 -89
- package/src/providers/movies/multistream/index.ts +0 -244
- package/src/providers/movies/netflixmirror/disneymirror.ts +0 -16
- package/src/providers/movies/netflixmirror/netmirror-parser.ts +0 -43
- package/src/providers/movies/netflixmirror/primemirror.ts +0 -16
- package/src/providers/movies/yflix/create-yflix.ts +0 -496
- package/src/providers/movies/yflix/yflix.ts +0 -85
- package/src/providers/provider-args.ts +0 -15
- package/src/registry-signing-keys.ts +0 -20
- package/src/utils/extension-utils.ts +0 -130
- package/src/utils/index.ts +0 -96
- package/src/utils/provider-maps.ts +0 -80
- package/src/utils/queries.ts +0 -37
|
@@ -23,6 +23,8 @@ export async function fetchTextWithTimeout(
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
const EXTENSION_FETCH_TIMEOUT_MS = 30000;
|
|
27
|
+
|
|
26
28
|
/** What the `fetch` extension code runs with resolves to. */
|
|
27
29
|
export interface ExtensionFetchResponse {
|
|
28
30
|
/** Whether the status is 2xx; HTTP errors resolve with `ok: false` instead of throwing */
|
|
@@ -43,7 +45,7 @@ const bodyText = (data: unknown): string =>
|
|
|
43
45
|
* interceptors apply). Like `fetch`, it rejects only when no response arrives (network error,
|
|
44
46
|
* timeout); an HTTP error status resolves with `ok: false`.
|
|
45
47
|
*/
|
|
46
|
-
export function createExtensionFetch(axios: AxiosInstance
|
|
48
|
+
export function createExtensionFetch(axios: AxiosInstance) {
|
|
47
49
|
return async (url: string, options: any = {}): Promise<ExtensionFetchResponse> => {
|
|
48
50
|
let response: AxiosResponse;
|
|
49
51
|
try {
|
|
@@ -52,7 +54,7 @@ export function createExtensionFetch(axios: AxiosInstance, timeoutMs = 30000) {
|
|
|
52
54
|
method: options.method || 'GET',
|
|
53
55
|
headers: options.headers || {},
|
|
54
56
|
data: options.body,
|
|
55
|
-
timeout:
|
|
57
|
+
timeout: EXTENSION_FETCH_TIMEOUT_MS,
|
|
56
58
|
// Keep the body as text (axios parses JSON by default) and resolve for every status.
|
|
57
59
|
responseType: 'text',
|
|
58
60
|
validateStatus: () => true,
|
package/src/utils/meta-http.ts
CHANGED
|
@@ -1,35 +1,28 @@
|
|
|
1
|
-
import axios, { type AxiosError
|
|
1
|
+
import axios, { type AxiosError } from 'axios';
|
|
2
2
|
|
|
3
3
|
/** Default timeout for metadata APIs (AniList, TMDB, MAL). */
|
|
4
|
-
|
|
5
|
-
/** Timeout for optional enrichment (ani.zip, filler lists); the call still succeeds without it. */
|
|
4
|
+
const META_TIMEOUT_MS = 15000;
|
|
5
|
+
/** Timeout for optional enrichment (ani.zip, filler lists, MALSync); the call still succeeds without it. */
|
|
6
6
|
export const ENRICHMENT_TIMEOUT_MS = 5000;
|
|
7
7
|
|
|
8
|
+
const RETRY_DELAY_MS = 500;
|
|
8
9
|
const MAX_RETRY_DELAY_MS = 5000;
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Retry a request once (by default) when the server answers 429 or 5xx, waiting for
|
|
14
|
-
* `Retry-After` when present (capped) or a short linear backoff.
|
|
15
|
-
*/
|
|
16
|
-
export function withRetry(instance: AxiosInstance, { retries = 1, baseDelayMs = 500 } = {}): AxiosInstance {
|
|
17
|
-
instance.interceptors.response.use(undefined, async (error: AxiosError) => {
|
|
18
|
-
const config = error.config as (typeof error.config & { __retryCount?: number }) | undefined;
|
|
19
|
-
const attempt = config?.__retryCount ?? 0;
|
|
20
|
-
if (!config || attempt >= retries || !isRetryable(error.response?.status)) throw error;
|
|
11
|
+
/** Shared client for meta providers: bounded by a timeout, with one retry on 429/5xx. */
|
|
12
|
+
export const metaHttp = axios.create({ timeout: META_TIMEOUT_MS });
|
|
21
13
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
: baseDelayMs * config.__retryCount;
|
|
28
|
-
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
29
|
-
return instance.request(config);
|
|
30
|
-
});
|
|
31
|
-
return instance;
|
|
32
|
-
}
|
|
14
|
+
// A 429 or 5xx is retried once, after the server's `Retry-After` (capped) or a short delay.
|
|
15
|
+
metaHttp.interceptors.response.use(undefined, async (error: AxiosError) => {
|
|
16
|
+
const config = error.config as (typeof error.config & { __retried?: boolean }) | undefined;
|
|
17
|
+
const status = error.response?.status;
|
|
18
|
+
if (!config || config.__retried || status === undefined || (status !== 429 && status < 500)) throw error;
|
|
33
19
|
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
config.__retried = true;
|
|
21
|
+
const retryAfterSeconds = Number(error.response?.headers?.['retry-after']);
|
|
22
|
+
const delay =
|
|
23
|
+
Number.isFinite(retryAfterSeconds) && retryAfterSeconds > 0
|
|
24
|
+
? Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY_MS)
|
|
25
|
+
: RETRY_DELAY_MS;
|
|
26
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
27
|
+
return metaHttp.request(config);
|
|
28
|
+
});
|
|
@@ -5,7 +5,8 @@ import type {
|
|
|
5
5
|
ProviderType,
|
|
6
6
|
} from '../models/extension-manifest';
|
|
7
7
|
|
|
8
|
-
// No runtime imports: scripts/
|
|
8
|
+
// No runtime imports: the registry scripts (scripts/registry-paths.js) require the built file
|
|
9
|
+
// without installed packages.
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Version of the context this library gives extension code: the `ctx` helpers, the modules it can
|
|
@@ -33,7 +34,7 @@ export class RegistryError extends Error {
|
|
|
33
34
|
readonly code: RegistryErrorCode;
|
|
34
35
|
/** Extension id or extractor name, when the error is about one entry */
|
|
35
36
|
readonly id?: string;
|
|
36
|
-
/** Every problem found, e.g. `extensions[
|
|
37
|
+
/** Every problem found, e.g. `extensions[1] (anikoto): factoryName must be a JavaScript identifier` */
|
|
37
38
|
readonly issues: string[];
|
|
38
39
|
/** Version the registry or entry needs: its `schemaVersion` or `minContextVersion` */
|
|
39
40
|
readonly required?: number;
|
|
@@ -63,12 +64,38 @@ export class RegistryError extends Error {
|
|
|
63
64
|
type Entry = Record<string, unknown>;
|
|
64
65
|
type Rule = { required: boolean; check: (value: unknown) => boolean; expected: string };
|
|
65
66
|
|
|
67
|
+
/**
|
|
68
|
+
* The two lists of a registry. `key` names an entry: names are case-insensitive, so lookups,
|
|
69
|
+
* duplicate checks and published paths (`registry/<list>/<key>/<version>.js`) use it lowercased.
|
|
70
|
+
* `factory` names the function the entry's code defines.
|
|
71
|
+
*/
|
|
72
|
+
export const REGISTRY_KINDS = {
|
|
73
|
+
extensions: { key: 'id', factory: 'factoryName' },
|
|
74
|
+
extractors: { key: 'name', factory: 'name' },
|
|
75
|
+
} as const;
|
|
76
|
+
|
|
77
|
+
export type RegistryKind = keyof typeof REGISTRY_KINDS;
|
|
78
|
+
|
|
79
|
+
/** Pattern of an entry key as published paths use it: its id or name, lowercased. */
|
|
80
|
+
export const REGISTRY_KEY_PATTERN = '[a-z0-9][a-z0-9-]*';
|
|
81
|
+
|
|
82
|
+
/** Pattern of an entry version: major.minor.patch, as published paths use it. */
|
|
83
|
+
export const REGISTRY_VERSION_PATTERN = '\\d+\\.\\d+\\.\\d+';
|
|
84
|
+
|
|
85
|
+
/** The lowercase key of a registry entry of `kind`, or undefined when its key field isn't a string. */
|
|
86
|
+
export function registryKey(kind: RegistryKind, entry: Entry): string | undefined {
|
|
87
|
+
const value = entry[REGISTRY_KINDS[kind].key];
|
|
88
|
+
return typeof value === 'string' ? value.toLowerCase() : undefined;
|
|
89
|
+
}
|
|
90
|
+
|
|
66
91
|
// Factory and extractor names are interpolated into generated code (same rule as assertValidIdentifier).
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
92
|
+
/** A plain JavaScript identifier, as factory and extractor names must be (they're interpolated into code). */
|
|
93
|
+
export const IDENTIFIER_RE = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
94
|
+
// Ids and extractor names end up in cache keys and file paths, in this library and in apps.
|
|
95
|
+
const KEY_RE = new RegExp(`^${REGISTRY_KEY_PATTERN}$`);
|
|
96
|
+
const VERSION_RE = new RegExp(`^${REGISTRY_VERSION_PATTERN}$`);
|
|
71
97
|
const SHA256_RE = /^[a-f0-9]{64}$/;
|
|
98
|
+
const isKey = (v: unknown): v is string => typeof v === 'string' && KEY_RE.test(v.toLowerCase());
|
|
72
99
|
// Keyed by ProviderType, so adding a category to the type doesn't compile until it is listed here.
|
|
73
100
|
const CATEGORIES = Object.keys({
|
|
74
101
|
'anime': true,
|
|
@@ -91,8 +118,12 @@ const nonEmpty = rule('a non-empty string', (v) => typeof v === 'string' && v.le
|
|
|
91
118
|
const flag = rule('a boolean', (v) => typeof v === 'boolean');
|
|
92
119
|
const strings = rule('an array of strings', (v) => Array.isArray(v) && v.every((s) => typeof s === 'string'));
|
|
93
120
|
const identifier = rule('a JavaScript identifier', (v) => typeof v === 'string' && IDENTIFIER_RE.test(v));
|
|
94
|
-
const id = rule('letters, digits
|
|
95
|
-
const
|
|
121
|
+
const id = rule('letters, digits or "-", starting with a letter or digit', isKey);
|
|
122
|
+
const extractorName = rule(
|
|
123
|
+
'a JavaScript identifier of letters and digits',
|
|
124
|
+
(v) => typeof v === 'string' && IDENTIFIER_RE.test(v) && isKey(v)
|
|
125
|
+
);
|
|
126
|
+
const version = rule('a version like 1.2.3', (v) => typeof v === 'string' && VERSION_RE.test(v));
|
|
96
127
|
const sha256 = rule('a lowercase hex SHA-256 digest', (v) => typeof v === 'string' && SHA256_RE.test(v));
|
|
97
128
|
const contextVersion = rule('a positive integer', isPositiveInteger);
|
|
98
129
|
const category = rule(`one of ${CATEGORIES.join(', ')}`, (v) => typeof v === 'string' && CATEGORIES.includes(v));
|
|
@@ -124,10 +155,11 @@ const EXTENSION_RULES: Record<string, Rule> = {
|
|
|
124
155
|
isSourceEmbed: flag.optional,
|
|
125
156
|
isSourceDirect: flag.optional,
|
|
126
157
|
haveMultiServers: flag.optional,
|
|
158
|
+
recommended: flag.optional,
|
|
127
159
|
};
|
|
128
160
|
|
|
129
161
|
const EXTRACTOR_RULES: Record<string, Rule> = {
|
|
130
|
-
name:
|
|
162
|
+
name: extractorName.required,
|
|
131
163
|
aliases: strings.optional,
|
|
132
164
|
version: version.required,
|
|
133
165
|
minContextVersion: contextVersion.optional,
|
|
@@ -191,7 +223,7 @@ export function assertCompatibleEntry(
|
|
|
191
223
|
function checkEntries(
|
|
192
224
|
issues: string[],
|
|
193
225
|
list: unknown,
|
|
194
|
-
field:
|
|
226
|
+
field: RegistryKind,
|
|
195
227
|
rules: Record<string, Rule>,
|
|
196
228
|
incompatibleRules: Record<string, Rule>
|
|
197
229
|
): void {
|
|
@@ -200,7 +232,7 @@ function checkEntries(
|
|
|
200
232
|
return;
|
|
201
233
|
}
|
|
202
234
|
|
|
203
|
-
const keyField = field
|
|
235
|
+
const keyField = REGISTRY_KINDS[field].key;
|
|
204
236
|
const seen = new Set<string>();
|
|
205
237
|
list.forEach((entry, index) => {
|
|
206
238
|
if (!isObject(entry)) {
|
|
@@ -219,10 +251,11 @@ function checkEntries(
|
|
|
219
251
|
}
|
|
220
252
|
}
|
|
221
253
|
|
|
222
|
-
//
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
seen.
|
|
254
|
+
// A second entry with the same lowercase key would shadow the first.
|
|
255
|
+
const lowercase = registryKey(field, entry);
|
|
256
|
+
if (lowercase !== undefined) {
|
|
257
|
+
if (seen.has(lowercase)) issues.push(`${where}: duplicate ${keyField} '${key}'`);
|
|
258
|
+
seen.add(lowercase);
|
|
226
259
|
}
|
|
227
260
|
});
|
|
228
261
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// The format of registry signatures and signing keys, shared by the library (registry-signature.ts)
|
|
2
|
+
// and the signing scripts (scripts/registry-signing.js). No runtime imports: the scripts require
|
|
3
|
+
// the built file without installed packages.
|
|
4
|
+
|
|
5
|
+
/** Most signature lines checked, so an oversized signature file can't keep the app busy verifying. */
|
|
6
|
+
export const MAX_REGISTRY_SIGNATURES = 4;
|
|
7
|
+
|
|
8
|
+
const PUBLIC_KEY_RE = /^[0-9a-f]{64}$/i;
|
|
9
|
+
const SIGNATURE_RE = /^[0-9a-f]{128}$/i;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A raw 32-byte ed25519 public key in hex, either case, as lowercase hex; undefined for anything
|
|
13
|
+
* else. Keys compare in lowercase.
|
|
14
|
+
*/
|
|
15
|
+
export function publicKeyHex(key: unknown): string | undefined {
|
|
16
|
+
return typeof key === 'string' && PUBLIC_KEY_RE.test(key) ? key.toLowerCase() : undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The signatures in a signature file, as lowercase hex: 1 to MAX_REGISTRY_SIGNATURES non-empty
|
|
21
|
+
* lines, each a 128-character hex ed25519 signature.
|
|
22
|
+
*
|
|
23
|
+
* @throws Error saying what is wrong, e.g. `line 2 is not a 128-character hex ed25519 signature`
|
|
24
|
+
*/
|
|
25
|
+
export function parseSignatureLines(text: unknown): string[] {
|
|
26
|
+
const lines = typeof text === 'string' ? text.split('\n').map((line) => line.trim()) : [];
|
|
27
|
+
const signatures = lines.filter(Boolean);
|
|
28
|
+
if (signatures.length === 0 || signatures.length > MAX_REGISTRY_SIGNATURES) {
|
|
29
|
+
throw new Error(
|
|
30
|
+
`must be 1 to ${MAX_REGISTRY_SIGNATURES} lines of hex ed25519 signatures (got ${signatures.length})`
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
return signatures.map((line, index) => {
|
|
34
|
+
if (!SIGNATURE_RE.test(line)) throw new Error(`line ${index + 1} is not a 128-character hex ed25519 signature`);
|
|
35
|
+
return line.toLowerCase();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ed25519 } from '@noble/curves/ed25519';
|
|
2
2
|
import type { ExtensionRegistryData } from '../models/extension-manifest';
|
|
3
|
-
import
|
|
3
|
+
import signingKeys from '../registry-signing-keys.json';
|
|
4
4
|
import { RegistryError, validateRegistry } from './registry-schema';
|
|
5
|
+
import { parseSignatureLines, publicKeyHex } from './registry-signature-format';
|
|
6
|
+
import { utf8Encode } from './utf8';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Signatures for a downloaded extension registry (REG-6).
|
|
@@ -42,8 +44,19 @@ export class RegistrySignatureError extends Error {
|
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
|
|
45
|
-
/**
|
|
46
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Public keys trusted to sign a downloaded registry, as lowercase hex: the `publicKey` of each
|
|
49
|
+
* entry in src/registry-signing-keys.json. `yarn registry:keygen` adds a key there and prints its
|
|
50
|
+
* private key once, for the CI secret that signs src/extension-registry.json
|
|
51
|
+
* (.github/workflows/sign-registry.yml). An app trusts only the keys of the library version it
|
|
52
|
+
* ships, so keep an old key listed while apps move to a release that bundles its replacement.
|
|
53
|
+
* Without keys, downloaded registries can't be verified and verifyRegistrySignature fails closed.
|
|
54
|
+
*/
|
|
55
|
+
export const REGISTRY_SIGNING_KEYS: readonly string[] = (signingKeys as readonly { publicKey: string }[]).map(
|
|
56
|
+
(entry) => entry.publicKey
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
export { MAX_REGISTRY_SIGNATURES } from './registry-signature-format';
|
|
47
60
|
|
|
48
61
|
export interface RegistrySignatureOptions {
|
|
49
62
|
/**
|
|
@@ -53,56 +66,16 @@ export interface RegistrySignatureOptions {
|
|
|
53
66
|
publicKeys?: readonly string[];
|
|
54
67
|
}
|
|
55
68
|
|
|
56
|
-
const PUBLIC_KEY_RE = /^[0-9a-f]{64}$/i;
|
|
57
|
-
const SIGNATURE_RE = /^[0-9a-f]{128}$/i;
|
|
58
69
|
// RFC 8032 checks: rejects non-canonical encodings and small-order keys (noble defaults to ZIP 215).
|
|
59
70
|
const STRICT = { zip215: false };
|
|
60
71
|
|
|
61
|
-
/** Bytes of a hex string already checked
|
|
72
|
+
/** Bytes of a hex string already checked by publicKeyHex or parseSignatureLines. */
|
|
62
73
|
function hexToBytes(hex: string): Uint8Array {
|
|
63
74
|
const bytes = new Uint8Array(hex.length / 2);
|
|
64
75
|
for (let i = 0; i < bytes.length; i++) bytes[i] = parseInt(hex.slice(i * 2, i * 2 + 2), 16);
|
|
65
76
|
return bytes;
|
|
66
77
|
}
|
|
67
78
|
|
|
68
|
-
/**
|
|
69
|
-
* UTF-8 bytes of `text`, the bytes Node writes for it: a lone surrogate becomes U+FFFD, as with
|
|
70
|
-
* TextEncoder. Written out so verification doesn't depend on the runtime providing TextEncoder.
|
|
71
|
-
*/
|
|
72
|
-
function utf8Bytes(text: string): Uint8Array {
|
|
73
|
-
// At most 3 bytes per UTF-16 code unit (a surrogate pair is 2 units and 4 bytes).
|
|
74
|
-
const bytes = new Uint8Array(text.length * 3);
|
|
75
|
-
let length = 0;
|
|
76
|
-
for (let i = 0; i < text.length; i++) {
|
|
77
|
-
let code = text.charCodeAt(i);
|
|
78
|
-
if (code >= 0xd800 && code <= 0xdbff && i + 1 < text.length) {
|
|
79
|
-
const low = text.charCodeAt(i + 1);
|
|
80
|
-
if (low >= 0xdc00 && low <= 0xdfff) {
|
|
81
|
-
code = 0x10000 + ((code - 0xd800) << 10) + (low - 0xdc00);
|
|
82
|
-
i++;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if (code >= 0xd800 && code <= 0xdfff) code = 0xfffd;
|
|
86
|
-
|
|
87
|
-
if (code < 0x80) {
|
|
88
|
-
bytes[length++] = code;
|
|
89
|
-
} else if (code < 0x800) {
|
|
90
|
-
bytes[length++] = 0xc0 | (code >> 6);
|
|
91
|
-
bytes[length++] = 0x80 | (code & 0x3f);
|
|
92
|
-
} else if (code < 0x10000) {
|
|
93
|
-
bytes[length++] = 0xe0 | (code >> 12);
|
|
94
|
-
bytes[length++] = 0x80 | ((code >> 6) & 0x3f);
|
|
95
|
-
bytes[length++] = 0x80 | (code & 0x3f);
|
|
96
|
-
} else {
|
|
97
|
-
bytes[length++] = 0xf0 | (code >> 18);
|
|
98
|
-
bytes[length++] = 0x80 | ((code >> 12) & 0x3f);
|
|
99
|
-
bytes[length++] = 0x80 | ((code >> 6) & 0x3f);
|
|
100
|
-
bytes[length++] = 0x80 | (code & 0x3f);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return bytes.subarray(0, length);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
79
|
function trustedKeys(publicKeys: readonly string[]): { hex: string; bytes: Uint8Array }[] {
|
|
107
80
|
if (!Array.isArray(publicKeys) || publicKeys.length === 0) {
|
|
108
81
|
throw new RegistrySignatureError(
|
|
@@ -112,36 +85,24 @@ function trustedKeys(publicKeys: readonly string[]): { hex: string; bytes: Uint8
|
|
|
112
85
|
);
|
|
113
86
|
}
|
|
114
87
|
return publicKeys.map((key, index) => {
|
|
115
|
-
const
|
|
116
|
-
|
|
88
|
+
const hex = publicKeyHex(key);
|
|
89
|
+
const bytes = hex && hexToBytes(hex);
|
|
90
|
+
if (!hex || !bytes || !ed25519.utils.isValidPublicKey(bytes, false)) {
|
|
117
91
|
throw new RegistrySignatureError(
|
|
118
92
|
'INVALID_SIGNING_KEY',
|
|
119
93
|
`Registry signing key ${index} is not a 64-character hex ed25519 public key`
|
|
120
94
|
);
|
|
121
95
|
}
|
|
122
|
-
return { hex
|
|
96
|
+
return { hex, bytes };
|
|
123
97
|
});
|
|
124
98
|
}
|
|
125
99
|
|
|
126
100
|
function parseSignatures(signature: string): Uint8Array[] {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
throw new RegistrySignatureError(
|
|
131
|
-
'MALFORMED_SIGNATURE',
|
|
132
|
-
`Registry signature must be 1 to ${MAX_REGISTRY_SIGNATURES} lines of hex ed25519 signatures ` +
|
|
133
|
-
`(got ${signatures.length})`
|
|
134
|
-
);
|
|
101
|
+
try {
|
|
102
|
+
return parseSignatureLines(signature).map(hexToBytes);
|
|
103
|
+
} catch (error) {
|
|
104
|
+
throw new RegistrySignatureError('MALFORMED_SIGNATURE', `Registry signature ${(error as Error).message}`);
|
|
135
105
|
}
|
|
136
|
-
return signatures.map((line, index) => {
|
|
137
|
-
if (!SIGNATURE_RE.test(line)) {
|
|
138
|
-
throw new RegistrySignatureError(
|
|
139
|
-
'MALFORMED_SIGNATURE',
|
|
140
|
-
`Registry signature line ${index + 1} is not a 128-character hex ed25519 signature`
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
return hexToBytes(line);
|
|
144
|
-
});
|
|
145
106
|
}
|
|
146
107
|
|
|
147
108
|
/**
|
|
@@ -163,7 +124,7 @@ export function verifyRegistrySignature(
|
|
|
163
124
|
const keys = trustedKeys(publicKeys);
|
|
164
125
|
const signatures = parseSignatures(signature);
|
|
165
126
|
let message: Uint8Array;
|
|
166
|
-
if (typeof registryText === 'string') message =
|
|
127
|
+
if (typeof registryText === 'string') message = Uint8Array.from(utf8Encode(registryText));
|
|
167
128
|
else if (registryText instanceof Uint8Array) message = registryText;
|
|
168
129
|
else throw new TypeError('verifyRegistrySignature: registryText must be a string or a Uint8Array');
|
|
169
130
|
|
|
@@ -211,5 +172,3 @@ export function parseSignedRegistry(
|
|
|
211
172
|
}
|
|
212
173
|
return validateRegistry(registry);
|
|
213
174
|
}
|
|
214
|
-
|
|
215
|
-
export { REGISTRY_SIGNING_KEYS };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module names registry bundles require from the runtime: scripts/build-extensions.js keeps
|
|
3
|
+
* imports of src/models and the context files external under these names, and the managers
|
|
4
|
+
* resolve them (src/utils/extension-modules.ts). No imports, so the scripts can load its build.
|
|
5
|
+
*/
|
|
6
|
+
export const MODELS_MODULE = 'react-native-consumet/models';
|
|
7
|
+
export const UTILS_MODULE = 'react-native-consumet/utils';
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { MediaStatus, TvType, type IMovieInfo, type IMovieResult, type ISearch } from '../models';
|
|
2
|
+
import { emptySearch } from '../providers/common/search';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The URL of a path (`/search/multi?query=...`) of TMDB's API, which META.TMDB and MOVIES.MultiStream
|
|
6
|
+
* read titles from, with the API key.
|
|
7
|
+
*/
|
|
8
|
+
export const tmdbUrl = (path: string, apiKey: string): string =>
|
|
9
|
+
`https://api.themoviedb.org/3${path}${path.includes('?') ? '&' : '?'}api_key=${apiKey}`;
|
|
10
|
+
|
|
11
|
+
/** TMDB's logo, for META.TMDB and MOVIES.MultiStream, whose titles are TMDB's. */
|
|
12
|
+
export const TMDB_LOGO = 'https://pbs.twimg.com/profile_images/1243623122089041920/gVZIvphd_400x400.jpg';
|
|
13
|
+
|
|
14
|
+
/** What `/movie/<id>` and `/tv/<id>` append to the details for mapTmdbInfo: cast, trailer, recommendations. */
|
|
15
|
+
export const TMDB_INFO_APPEND = 'credits,videos,recommendations';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A page of TMDB's paged answer (search, trending) with `results` already mapped from its
|
|
19
|
+
* `results`; an empty page when TMDB sent none. A page whose results were all left out (people, in
|
|
20
|
+
* tmdbMultiSearch) still has the next page TMDB has.
|
|
21
|
+
*/
|
|
22
|
+
export const tmdbPage = <T>(data: any, page: number, results: T[]): ISearch<T> =>
|
|
23
|
+
data?.results?.length
|
|
24
|
+
? {
|
|
25
|
+
currentPage: page,
|
|
26
|
+
hasNextPage: page + 1 <= data?.total_pages,
|
|
27
|
+
totalResults: data?.total_results,
|
|
28
|
+
totalPages: data?.total_pages,
|
|
29
|
+
results,
|
|
30
|
+
}
|
|
31
|
+
: emptySearch(page);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The TMDB API key used when the caller passes none. Every app that doesn't pass its own key shares
|
|
35
|
+
* it, so TMDB can rate-limit or revoke it at any time.
|
|
36
|
+
*/
|
|
37
|
+
const SHARED_TMDB_API_KEY = '5201b54eb0968700e693a30576d7d4dc';
|
|
38
|
+
|
|
39
|
+
const warned = new Set<string>();
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The caller's TMDB API key, or the shared key with a `console.warn` the first time each class
|
|
43
|
+
* falls back to it. A missing key is a setup problem for the app's developer, not a failed request:
|
|
44
|
+
* requests still work, so it is a warning (a LogBox notice in React Native dev builds), not an error.
|
|
45
|
+
*/
|
|
46
|
+
export const resolveTmdbApiKey = (apiKey: string | undefined, className: string): string => {
|
|
47
|
+
const key = apiKey?.trim();
|
|
48
|
+
if (key) return key;
|
|
49
|
+
|
|
50
|
+
if (!warned.has(className)) {
|
|
51
|
+
warned.add(className);
|
|
52
|
+
console.warn(
|
|
53
|
+
`[react-native-consumet] ${className} was created without a TMDB API key, so it uses a key shared by ` +
|
|
54
|
+
'every app that passes none, which TMDB can rate-limit or revoke at any time. Pass your own key ' +
|
|
55
|
+
'(https://www.themoviedb.org/settings/api).'
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
return SHARED_TMDB_API_KEY;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* A TMDB image URL at `size` (`w185`, `w342`, `w780`, `w1280`, `original`, ...); undefined when TMDB has no image.
|
|
63
|
+
* `original` is the uploaded file, often 2000 px and about 1 MB, so each image asks for the size apps show it at.
|
|
64
|
+
*/
|
|
65
|
+
export const tmdbImage = (path: string | null | undefined, size: string): string | undefined =>
|
|
66
|
+
path ? `https://image.tmdb.org/t/p/${size}${path}` : undefined;
|
|
67
|
+
|
|
68
|
+
/** A season poster or episode still in the two sizes apps show them at. */
|
|
69
|
+
export const tmdbImageSizes = (path: string | null | undefined) =>
|
|
70
|
+
path ? { mobile: tmdbImage(path, 'w300')!, hd: tmdbImage(path, 'w780')! } : undefined;
|
|
71
|
+
|
|
72
|
+
/** The year of a TMDB result's release or first air date, or undefined when TMDB has no date. */
|
|
73
|
+
export const releaseYear = (result: any): string | undefined =>
|
|
74
|
+
/^\d{4}/.exec(result?.release_date || result?.first_air_date || '')?.[0];
|
|
75
|
+
|
|
76
|
+
/** `movie` or `tv`, the media types TMDB's paths and results use. */
|
|
77
|
+
export type TmdbMediaType = 'movie' | 'tv';
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The movies and shows TMDB's `/search/multi` finds for `query`, with TMDB's answer for its page
|
|
81
|
+
* counts (tmdbPage). The search also finds people, who have nothing to play, so they are left out.
|
|
82
|
+
* @param get sends a GET to a path of TMDB's API (tmdbUrl) and gives the answer's body
|
|
83
|
+
*/
|
|
84
|
+
export const tmdbMultiSearch = async (
|
|
85
|
+
get: (path: string) => Promise<any>,
|
|
86
|
+
query: string,
|
|
87
|
+
page: number
|
|
88
|
+
): Promise<{ data: any; results: any[] }> => {
|
|
89
|
+
const data = await get(
|
|
90
|
+
`/search/multi?language=en-US&page=${page}&include_adult=false&query=${encodeURIComponent(query)}`
|
|
91
|
+
);
|
|
92
|
+
const results = (data?.results ?? []).filter(
|
|
93
|
+
(result: any) => result?.media_type === 'movie' || result?.media_type === 'tv'
|
|
94
|
+
);
|
|
95
|
+
return { data, results };
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/** A TMDB movie or show as a list result (search, trending, recommendations, similar). */
|
|
99
|
+
export const mapTmdbResult = (result: any, mediaType?: TmdbMediaType): IMovieResult => ({
|
|
100
|
+
id: String(result.id),
|
|
101
|
+
title: result.title || result.name,
|
|
102
|
+
image: tmdbImage(result.poster_path, 'w342'),
|
|
103
|
+
// The info's size, so opening the title finds the backdrop already loaded
|
|
104
|
+
cover: tmdbImage(result.backdrop_path, 'w1280'),
|
|
105
|
+
description: result.overview || undefined,
|
|
106
|
+
// Recommendations carry media_type; similar titles don't, and are of the requested type.
|
|
107
|
+
type: (result.media_type ?? mediaType) === 'movie' ? TvType.MOVIE : TvType.TVSERIES,
|
|
108
|
+
rating: result.vote_average || 0,
|
|
109
|
+
releaseDate: releaseYear(result),
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const SHOW_STATUSES: Record<string, MediaStatus> = {
|
|
113
|
+
'Returning Series': MediaStatus.ONGOING,
|
|
114
|
+
'In Production': MediaStatus.ONGOING,
|
|
115
|
+
'Ended': MediaStatus.COMPLETED,
|
|
116
|
+
'Canceled': MediaStatus.COMPLETED,
|
|
117
|
+
'Planned': MediaStatus.NOT_YET_AIRED,
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const MOVIE_STATUSES: Record<string, MediaStatus> = {
|
|
121
|
+
'Released': MediaStatus.COMPLETED,
|
|
122
|
+
'Rumored': MediaStatus.NOT_YET_AIRED,
|
|
123
|
+
'Planned': MediaStatus.NOT_YET_AIRED,
|
|
124
|
+
'In Production': MediaStatus.NOT_YET_AIRED,
|
|
125
|
+
'Post Production': MediaStatus.NOT_YET_AIRED,
|
|
126
|
+
'Canceled': MediaStatus.CANCELLED,
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* TMDB's `status` of a show or movie as a MediaStatus: a show that is airing or between seasons is
|
|
131
|
+
* ONGOING, one that ended or was canceled COMPLETED; a released movie is COMPLETED, an unreleased
|
|
132
|
+
* one NOT_YET_AIRED. A status TMDB adds later is UNKNOWN; undefined when TMDB sends none.
|
|
133
|
+
*/
|
|
134
|
+
export const tmdbStatus = (status: unknown, mediaType: TmdbMediaType): MediaStatus | undefined => {
|
|
135
|
+
if (typeof status !== 'string' || !status) return undefined;
|
|
136
|
+
const statuses = mediaType === 'movie' ? MOVIE_STATUSES : SHOW_STATUSES;
|
|
137
|
+
return Object.prototype.hasOwnProperty.call(statuses, status) ? statuses[status] : MediaStatus.UNKNOWN;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* TMDB's `with_status` codes of the shows of each MediaStatus tmdbStatus gives (0 Returning Series,
|
|
142
|
+
* 1 Planned, 2 In Production, 3 Ended, 4 Canceled), for `/discover/tv`.
|
|
143
|
+
*/
|
|
144
|
+
export const TMDB_SHOW_STATUS_FILTERS: Partial<Record<MediaStatus, string>> = {
|
|
145
|
+
[MediaStatus.ONGOING]: '0|2',
|
|
146
|
+
[MediaStatus.COMPLETED]: '3|4',
|
|
147
|
+
[MediaStatus.NOT_YET_AIRED]: '1',
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/** A list of TMDB results, or undefined when TMDB sent none. */
|
|
151
|
+
export const mapTmdbResults = (list: any, mediaType: TmdbMediaType): IMovieResult[] | undefined =>
|
|
152
|
+
list?.results?.length ? list.results.map((result: any) => mapTmdbResult(result, mediaType)) : undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The details of `/movie/<id>` or `/tv/<id>` that META.TMDB and MOVIES.MultiStream both return.
|
|
156
|
+
* The request appends TMDB_INFO_APPEND for the fields that use them.
|
|
157
|
+
*/
|
|
158
|
+
export const mapTmdbInfo = (data: any, mediaType: TmdbMediaType) => {
|
|
159
|
+
const video = data?.videos?.results?.[0];
|
|
160
|
+
return {
|
|
161
|
+
title: data?.title || data?.name,
|
|
162
|
+
// Large enough for the poster opened full screen
|
|
163
|
+
image: tmdbImage(data?.poster_path, 'w780'),
|
|
164
|
+
cover: tmdbImage(data?.backdrop_path, 'w1280'),
|
|
165
|
+
type: mediaType === 'movie' ? TvType.MOVIE : TvType.TVSERIES,
|
|
166
|
+
rating: data?.vote_average || 0,
|
|
167
|
+
status: tmdbStatus(data?.status, mediaType),
|
|
168
|
+
releaseDate: data?.release_date || data?.first_air_date,
|
|
169
|
+
description: data?.overview,
|
|
170
|
+
genres: data?.genres?.map((genre: { name: string }) => genre.name),
|
|
171
|
+
duration: data?.runtime || data?.episode_run_time?.[0],
|
|
172
|
+
totalEpisodes: data?.number_of_episodes,
|
|
173
|
+
totalSeasons: data?.number_of_seasons as number | undefined,
|
|
174
|
+
characters: data?.credits?.cast?.map((cast: any) => ({
|
|
175
|
+
id: cast.id,
|
|
176
|
+
name: cast.name,
|
|
177
|
+
url: `https://www.themoviedb.org/person/${cast.id}`,
|
|
178
|
+
character: cast.character,
|
|
179
|
+
image: tmdbImage(cast.profile_path, 'w185'),
|
|
180
|
+
})),
|
|
181
|
+
trailer: video?.key
|
|
182
|
+
? { id: video.key, site: video.site, url: `https://www.youtube.com/watch?v=${video.key}` }
|
|
183
|
+
: undefined,
|
|
184
|
+
recommendations: mapTmdbResults(data?.recommendations, mediaType),
|
|
185
|
+
} satisfies Partial<IMovieInfo>;
|
|
186
|
+
};
|