react-native-consumet 4.0.0 → 5.1.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/android/src/androidTest/java/com/consumet/TestSupport.kt +12 -6
- package/android/src/androidTest/java/com/consumet/WebViewContractTest.kt +30 -2
- package/android/src/main/java/com/consumet/HttpRequestModule.kt +27 -13
- package/ios/Consumet.mm +42 -19
- package/lib/commonjs/NativeConsumet.ts +13 -8
- package/lib/commonjs/extension-registry.json +35 -64
- package/lib/commonjs/extension-registry.json.sig +1 -1
- package/lib/commonjs/extractors/gofile.js +47 -10
- package/lib/commonjs/extractors/gofile.js.map +1 -1
- package/lib/commonjs/extractors/hubcloud.js +49 -42
- package/lib/commonjs/extractors/hubcloud.js.map +1 -1
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/index.js +9 -1
- package/lib/commonjs/models/index.js.map +1 -1
- package/lib/commonjs/models/meta-error.js +6 -3
- package/lib/commonjs/models/meta-error.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 +3 -2
- package/lib/commonjs/models/types.js.map +1 -1
- package/lib/commonjs/providers/anime/anikoto/create-anikoto.js +90 -25
- package/lib/commonjs/providers/anime/anikoto/create-anikoto.js.map +1 -1
- package/lib/commonjs/providers/anime/{hianime.js → anikoto/hianime.js} +4 -4
- package/lib/commonjs/providers/anime/anikoto/hianime.js.map +1 -0
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +110 -18
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/index.js +1 -9
- package/lib/commonjs/providers/anime/index.js.map +1 -1
- package/lib/commonjs/providers/anime/reanime/create-reanime.js +6 -2
- package/lib/commonjs/providers/anime/reanime/create-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/errors.js +77 -0
- package/lib/commonjs/providers/common/errors.js.map +1 -0
- package/lib/commonjs/providers/common/servers.js +9 -3
- package/lib/commonjs/providers/common/servers.js.map +1 -1
- 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/manga/asurascans.js +29 -7
- package/lib/commonjs/providers/manga/asurascans.js.map +1 -1
- package/lib/commonjs/providers/meta/anilist-media.js +23 -13
- package/lib/commonjs/providers/meta/anilist-media.js.map +1 -1
- package/lib/commonjs/providers/meta/anilist.js +63 -18
- package/lib/commonjs/providers/meta/anilist.js.map +1 -1
- package/lib/commonjs/providers/meta/mal.js +3 -3
- package/lib/commonjs/providers/meta/mal.js.map +1 -1
- package/lib/commonjs/providers/meta/shared.js +7 -2
- package/lib/commonjs/providers/meta/shared.js.map +1 -1
- package/lib/commonjs/providers/meta/tmdb.js +151 -45
- package/lib/commonjs/providers/meta/tmdb.js.map +1 -1
- package/lib/commonjs/providers/movies/index.js +0 -4
- package/lib/commonjs/providers/movies/index.js.map +1 -1
- package/lib/commonjs/providers/movies/multimovies/create-multimovies.js +2 -1
- package/lib/commonjs/providers/movies/multimovies/create-multimovies.js.map +1 -1
- package/lib/commonjs/providers/movies/multistream/create-multistream.js +1 -1
- package/lib/commonjs/providers/movies/multistream/create-multistream.js.map +1 -1
- package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js +44 -11
- package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
- package/lib/commonjs/providers/movies/site-paths.js +3 -2
- package/lib/commonjs/providers/movies/site-paths.js.map +1 -1
- package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js +95 -44
- package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
- package/lib/commonjs/providers/provider-class.js +1 -1
- package/lib/commonjs/utils/ExtractorManager.js +90 -11
- package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
- package/lib/commonjs/utils/ProviderManager.js +54 -18
- package/lib/commonjs/utils/ProviderManager.js.map +1 -1
- package/lib/commonjs/utils/extension-modules.js +136 -24
- package/lib/commonjs/utils/extension-modules.js.map +1 -1
- package/lib/commonjs/utils/registry-schema.js +3 -2
- package/lib/commonjs/utils/registry-schema.js.map +1 -1
- package/lib/commonjs/utils/tmdb.js +53 -8
- package/lib/commonjs/utils/tmdb.js.map +1 -1
- package/lib/module/NativeConsumet.ts +13 -8
- package/lib/module/extension-registry.json +35 -64
- package/lib/module/extension-registry.json.sig +1 -1
- package/lib/module/extractors/gofile.js +47 -10
- package/lib/module/extractors/gofile.js.map +1 -1
- package/lib/module/extractors/hubcloud.js +49 -42
- package/lib/module/extractors/hubcloud.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/index.js +1 -0
- package/lib/module/models/index.js.map +1 -1
- package/lib/module/models/meta-error.js +7 -3
- package/lib/module/models/meta-error.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 +3 -2
- package/lib/module/models/types.js.map +1 -1
- package/lib/module/providers/anime/anikoto/create-anikoto.js +91 -25
- package/lib/module/providers/anime/anikoto/create-anikoto.js.map +1 -1
- package/lib/module/providers/anime/{hianime.js → anikoto/hianime.js} +4 -4
- package/lib/module/providers/anime/anikoto/hianime.js.map +1 -0
- package/lib/module/providers/anime/animepahe/create-animepahe.js +111 -18
- package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/module/providers/anime/index.js +1 -9
- package/lib/module/providers/anime/index.js.map +1 -1
- package/lib/module/providers/anime/reanime/create-reanime.js +6 -2
- package/lib/module/providers/anime/reanime/create-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/errors.js +70 -0
- package/lib/module/providers/common/errors.js.map +1 -0
- package/lib/module/providers/common/servers.js +10 -3
- package/lib/module/providers/common/servers.js.map +1 -1
- 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/manga/asurascans.js +29 -7
- package/lib/module/providers/manga/asurascans.js.map +1 -1
- package/lib/module/providers/meta/anilist-media.js +23 -13
- package/lib/module/providers/meta/anilist-media.js.map +1 -1
- package/lib/module/providers/meta/anilist.js +64 -19
- package/lib/module/providers/meta/anilist.js.map +1 -1
- package/lib/module/providers/meta/mal.js +3 -3
- package/lib/module/providers/meta/mal.js.map +1 -1
- package/lib/module/providers/meta/shared.js +8 -3
- package/lib/module/providers/meta/shared.js.map +1 -1
- package/lib/module/providers/meta/tmdb.js +153 -47
- package/lib/module/providers/meta/tmdb.js.map +1 -1
- package/lib/module/providers/movies/index.js +0 -4
- package/lib/module/providers/movies/index.js.map +1 -1
- package/lib/module/providers/movies/multimovies/create-multimovies.js +2 -1
- package/lib/module/providers/movies/multimovies/create-multimovies.js.map +1 -1
- package/lib/module/providers/movies/multistream/create-multistream.js +1 -1
- package/lib/module/providers/movies/multistream/create-multistream.js.map +1 -1
- package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js +44 -11
- package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
- package/lib/module/providers/movies/site-paths.js +3 -2
- package/lib/module/providers/movies/site-paths.js.map +1 -1
- package/lib/module/providers/movies/vegamovies/create-vegamovies.js +95 -44
- package/lib/module/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
- package/lib/module/providers/provider-class.js +1 -1
- package/lib/module/utils/ExtractorManager.js +89 -11
- package/lib/module/utils/ExtractorManager.js.map +1 -1
- package/lib/module/utils/ProviderManager.js +54 -18
- package/lib/module/utils/ProviderManager.js.map +1 -1
- package/lib/module/utils/extension-modules.js +136 -24
- package/lib/module/utils/extension-modules.js.map +1 -1
- package/lib/module/utils/registry-schema.js +3 -2
- package/lib/module/utils/registry-schema.js.map +1 -1
- package/lib/module/utils/tmdb.js +51 -7
- package/lib/module/utils/tmdb.js.map +1 -1
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts +13 -8
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/gofile.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +4 -3
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/extension-manifest.d.ts +2 -0
- package/lib/typescript/commonjs/src/models/extension-manifest.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/models/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/meta-error.d.ts +4 -1
- package/lib/typescript/commonjs/src/models/meta-error.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 +31 -3
- package/lib/typescript/commonjs/src/models/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
- package/lib/typescript/{module/src/providers/anime → commonjs/src/providers/anime/anikoto}/hianime.d.ts +2 -2
- package/lib/typescript/commonjs/src/providers/anime/anikoto/hianime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts +0 -6
- 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.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/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/servers.d.ts +2 -1
- package/lib/typescript/commonjs/src/providers/common/servers.d.ts.map +1 -1
- 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/manga/asurascans.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/anilist-media.d.ts +19 -7
- package/lib/typescript/commonjs/src/providers/meta/anilist-media.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts +15 -7
- package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/mal.d.ts +1 -1
- package/lib/typescript/commonjs/src/providers/meta/shared.d.ts +4 -1
- package/lib/typescript/commonjs/src/providers/meta/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts +65 -6
- package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/index.d.ts +0 -3
- 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.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/site-paths.d.ts +3 -2
- package/lib/typescript/commonjs/src/providers/movies/site-paths.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/provider-class.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts +29 -1
- package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts +19 -5
- package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/extension-modules.d.ts +33 -8
- package/lib/typescript/commonjs/src/utils/extension-modules.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/registry-schema.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/registry-schema.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/tmdb.d.ts +18 -3
- package/lib/typescript/commonjs/src/utils/tmdb.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeConsumet.d.ts +13 -8
- package/lib/typescript/module/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/gofile.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/hubcloud.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +4 -3
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/extension-manifest.d.ts +2 -0
- package/lib/typescript/module/src/models/extension-manifest.d.ts.map +1 -1
- package/lib/typescript/module/src/models/index.d.ts +1 -0
- package/lib/typescript/module/src/models/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/meta-error.d.ts +4 -1
- package/lib/typescript/module/src/models/meta-error.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 +31 -3
- package/lib/typescript/module/src/models/types.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
- package/lib/typescript/{commonjs/src/providers/anime → module/src/providers/anime/anikoto}/hianime.d.ts +2 -2
- package/lib/typescript/module/src/providers/anime/anikoto/hianime.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/index.d.ts +0 -6
- 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.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/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/servers.d.ts +2 -1
- package/lib/typescript/module/src/providers/common/servers.d.ts.map +1 -1
- 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/manga/asurascans.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/anilist-media.d.ts +19 -7
- package/lib/typescript/module/src/providers/meta/anilist-media.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/anilist.d.ts +15 -7
- package/lib/typescript/module/src/providers/meta/anilist.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/mal.d.ts +1 -1
- package/lib/typescript/module/src/providers/meta/shared.d.ts +4 -1
- package/lib/typescript/module/src/providers/meta/shared.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/tmdb.d.ts +65 -6
- package/lib/typescript/module/src/providers/meta/tmdb.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/index.d.ts +0 -3
- 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.map +1 -1
- package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/site-paths.d.ts +3 -2
- package/lib/typescript/module/src/providers/movies/site-paths.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/provider-class.d.ts +1 -1
- package/lib/typescript/module/src/utils/ExtractorManager.d.ts +29 -1
- package/lib/typescript/module/src/utils/ExtractorManager.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/ProviderManager.d.ts +19 -5
- package/lib/typescript/module/src/utils/ProviderManager.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/extension-modules.d.ts +33 -8
- package/lib/typescript/module/src/utils/extension-modules.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/registry-schema.d.ts +1 -1
- package/lib/typescript/module/src/utils/registry-schema.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/tmdb.d.ts +18 -3
- package/lib/typescript/module/src/utils/tmdb.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeConsumet.ts +13 -8
- package/src/extension-registry.json +35 -64
- package/src/extension-registry.json.sig +1 -1
- package/src/extractors/gofile.ts +52 -11
- package/src/extractors/hubcloud.ts +62 -49
- package/src/index.tsx +4 -1
- package/src/models/extension-manifest.ts +3 -0
- package/src/models/index.ts +1 -0
- package/src/models/meta-error.ts +7 -3
- package/src/models/provider-error.ts +57 -0
- package/src/models/types.ts +27 -3
- package/src/providers/anime/anikoto/create-anikoto.ts +75 -27
- package/src/providers/anime/{hianime.ts → anikoto/hianime.ts} +5 -5
- package/src/providers/anime/animepahe/create-animepahe.ts +101 -19
- package/src/providers/anime/index.ts +0 -8
- package/src/providers/anime/reanime/create-reanime.ts +8 -1
- package/src/providers/common/concurrency.ts +32 -0
- package/src/providers/common/errors.ts +84 -0
- package/src/providers/common/servers.ts +7 -3
- package/src/providers/common/ttl-cache.ts +65 -0
- package/src/providers/manga/asurascans.ts +31 -7
- package/src/providers/meta/anilist-media.ts +20 -15
- package/src/providers/meta/anilist.ts +59 -17
- package/src/providers/meta/mal.ts +3 -3
- package/src/providers/meta/shared.ts +10 -3
- package/src/providers/meta/tmdb.ts +173 -38
- package/src/providers/movies/index.ts +0 -4
- package/src/providers/movies/multimovies/create-multimovies.ts +1 -0
- package/src/providers/movies/multistream/create-multistream.ts +1 -1
- package/src/providers/movies/netflixmirror/create-netflixmirror.ts +49 -11
- package/src/providers/movies/site-paths.ts +3 -2
- package/src/providers/movies/vegamovies/create-vegamovies.ts +93 -42
- package/src/providers/provider-class.ts +1 -1
- package/src/utils/ExtractorManager.ts +97 -11
- package/src/utils/ProviderManager.ts +74 -22
- package/src/utils/extension-modules.ts +145 -32
- package/src/utils/registry-schema.ts +2 -1
- package/src/utils/tmdb.ts +53 -7
- package/lib/commonjs/providers/anime/anineko/anineko.js +0 -11
- package/lib/commonjs/providers/anime/anineko/anineko.js.map +0 -1
- package/lib/commonjs/providers/anime/anineko/create-anineko.js +0 -358
- package/lib/commonjs/providers/anime/anineko/create-anineko.js.map +0 -1
- package/lib/commonjs/providers/anime/hianime.js.map +0 -1
- package/lib/commonjs/providers/anime/zoro/create-zoro.js +0 -362
- package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +0 -1
- package/lib/commonjs/providers/anime/zoro/zoro.js +0 -11
- package/lib/commonjs/providers/anime/zoro/zoro.js.map +0 -1
- package/lib/commonjs/providers/movies/himovies/create-himovies.js +0 -231
- package/lib/commonjs/providers/movies/himovies/create-himovies.js.map +0 -1
- package/lib/commonjs/providers/movies/himovies/himovies.js +0 -11
- package/lib/commonjs/providers/movies/himovies/himovies.js.map +0 -1
- package/lib/module/providers/anime/anineko/anineko.js +0 -7
- package/lib/module/providers/anime/anineko/anineko.js.map +0 -1
- package/lib/module/providers/anime/anineko/create-anineko.js +0 -354
- package/lib/module/providers/anime/anineko/create-anineko.js.map +0 -1
- package/lib/module/providers/anime/hianime.js.map +0 -1
- package/lib/module/providers/anime/zoro/create-zoro.js +0 -358
- package/lib/module/providers/anime/zoro/create-zoro.js.map +0 -1
- package/lib/module/providers/anime/zoro/zoro.js +0 -7
- package/lib/module/providers/anime/zoro/zoro.js.map +0 -1
- package/lib/module/providers/movies/himovies/create-himovies.js +0 -227
- package/lib/module/providers/movies/himovies/create-himovies.js.map +0 -1
- package/lib/module/providers/movies/himovies/himovies.js +0 -7
- package/lib/module/providers/movies/himovies/himovies.js.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/anineko/anineko.d.ts +0 -5
- 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/hianime.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 -5
- package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts +0 -28
- 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 -5
- package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/anineko/anineko.d.ts +0 -5
- 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/hianime.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 -5
- package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts +0 -28
- 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 -5
- package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts.map +0 -1
- package/src/providers/anime/anineko/anineko.ts +0 -6
- package/src/providers/anime/anineko/create-anineko.ts +0 -394
- package/src/providers/anime/zoro/create-zoro.ts +0 -398
- package/src/providers/anime/zoro/zoro.ts +0 -6
- package/src/providers/movies/himovies/create-himovies.ts +0 -252
- package/src/providers/movies/himovies/himovies.ts +0 -6
|
@@ -2,6 +2,7 @@ import { extensionEnums } from '../models/types';
|
|
|
2
2
|
import type { ExtractorContext, ProviderContext } from '../models';
|
|
3
3
|
import { MODELS_MODULE, UTILS_MODULE } from './runtime-modules';
|
|
4
4
|
import { assertValidIdentifier, verifyExtensionCode, type IntegrityOptions } from './extension-integrity';
|
|
5
|
+
import { IDENTIFIER_RE } from './registry-schema';
|
|
5
6
|
import { createExtensionFetch, fetchTextWithTimeout } from './fetch-with-timeout';
|
|
6
7
|
|
|
7
8
|
export type ExtensionKind = 'provider' | 'extractor';
|
|
@@ -23,6 +24,8 @@ export function createExtensionRequire(extensionId: string, modules: Record<stri
|
|
|
23
24
|
|
|
24
25
|
export type ExtensionFactory = (...args: any[]) => any;
|
|
25
26
|
|
|
27
|
+
const isIdentifier = (value: unknown): value is string => typeof value === 'string' && IDENTIFIER_RE.test(value);
|
|
28
|
+
|
|
26
29
|
/** The globals extension code runs with; each key becomes a local constant of that name. */
|
|
27
30
|
export type ExtensionGlobals = { exports: Record<string, any>; module: { exports: any } } & Record<string, unknown>;
|
|
28
31
|
|
|
@@ -73,34 +76,58 @@ export function extensionGlobals(
|
|
|
73
76
|
return globals;
|
|
74
77
|
}
|
|
75
78
|
|
|
76
|
-
/**
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
export function evaluateExtensionCode(
|
|
79
|
+
/** The functions an evaluation of extension code provides, by the name they were asked for. */
|
|
80
|
+
export type ExtensionFactories = Map<string, ExtensionFactory | undefined>;
|
|
81
|
+
|
|
82
|
+
/** Extension code wrapped in a function that runs it and returns its top-level `names`, in order. */
|
|
83
|
+
function parseExtensionCode(
|
|
82
84
|
code: string,
|
|
83
|
-
|
|
84
|
-
globals: ExtensionGlobals
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
try {
|
|
90
|
-
run = new Function(
|
|
91
|
-
'context',
|
|
92
|
-
`
|
|
85
|
+
names: readonly string[],
|
|
86
|
+
globals: ExtensionGlobals
|
|
87
|
+
): (context: ExtensionGlobals) => unknown[] {
|
|
88
|
+
return new Function(
|
|
89
|
+
'context',
|
|
90
|
+
`
|
|
93
91
|
${Object.keys(globals)
|
|
94
92
|
.map((key) => `const ${key} = context.${key};`)
|
|
95
93
|
.join('\n ')}
|
|
96
94
|
|
|
97
95
|
${code}
|
|
98
96
|
|
|
99
|
-
return typeof ${name} !== 'undefined' ? ${name} : undefined;
|
|
97
|
+
return [${names.map((name) => `typeof ${name} !== 'undefined' ? ${name} : undefined`).join(', ')}];
|
|
100
98
|
`
|
|
101
|
-
|
|
99
|
+
) as (context: ExtensionGlobals) => unknown[];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Run single-file extension code once and return the functions it provides for `names`. For each
|
|
104
|
+
* name: a top-level `function name`, `exports[name]`, `module.exports[name]`, or its default export;
|
|
105
|
+
* undefined when it provides none. `names[0]` is the one the caller needs; the others are looked up
|
|
106
|
+
* when the code also parses with them, and are missing from the result otherwise. Every name must
|
|
107
|
+
* be a valid identifier (assertValidIdentifier).
|
|
108
|
+
*/
|
|
109
|
+
export function evaluateExtensionCode(
|
|
110
|
+
code: string,
|
|
111
|
+
names: readonly string[],
|
|
112
|
+
globals: ExtensionGlobals,
|
|
113
|
+
kind: ExtensionKind
|
|
114
|
+
): ExtensionFactories {
|
|
115
|
+
const label = kind === 'provider' ? 'Provider' : 'Extractor';
|
|
116
|
+
const parseError = (syntaxError: any) =>
|
|
117
|
+
new Error(`Failed to parse ${kind} code: ${syntaxError.message}`, { cause: syntaxError });
|
|
118
|
+
let captured = names;
|
|
119
|
+
let run: (context: ExtensionGlobals) => unknown[];
|
|
120
|
+
try {
|
|
121
|
+
run = parseExtensionCode(code, captured, globals);
|
|
102
122
|
} catch (syntaxError: any) {
|
|
103
|
-
|
|
123
|
+
if (names.length <= 1) throw parseError(syntaxError);
|
|
124
|
+
// A name that can't be referenced (a reserved word, say) must not fail the one asked for.
|
|
125
|
+
captured = names.slice(0, 1);
|
|
126
|
+
try {
|
|
127
|
+
run = parseExtensionCode(code, captured, globals);
|
|
128
|
+
} catch (singleError: any) {
|
|
129
|
+
throw parseError(singleError);
|
|
130
|
+
}
|
|
104
131
|
}
|
|
105
132
|
|
|
106
133
|
// The top-level declaration comes first: it always binds its own name, while bundle export
|
|
@@ -113,9 +140,16 @@ export function evaluateExtensionCode(
|
|
|
113
140
|
} catch (execError: any) {
|
|
114
141
|
throw new Error(`${label} code execution failed: ${execError?.message ?? execError}`, { cause: execError });
|
|
115
142
|
}
|
|
143
|
+
// Not the list when the code returns early on its own (a top-level `return`).
|
|
144
|
+
const declaredAt = (index: number) => (Array.isArray(declared) ? declared[index] : undefined);
|
|
116
145
|
const { exports, module } = globals;
|
|
117
|
-
return
|
|
118
|
-
(
|
|
146
|
+
return new Map(
|
|
147
|
+
captured.map((name, index): [string, ExtensionFactory | undefined] => [
|
|
148
|
+
name,
|
|
149
|
+
[declaredAt(index), exports[name], module.exports?.[name], exports.default, module.exports?.default].find(
|
|
150
|
+
(candidate): candidate is ExtensionFactory => typeof candidate === 'function'
|
|
151
|
+
),
|
|
152
|
+
])
|
|
119
153
|
);
|
|
120
154
|
}
|
|
121
155
|
|
|
@@ -158,8 +192,14 @@ export async function fetchEntryCode(kind: ExtensionKind, main: string): Promise
|
|
|
158
192
|
return response.text;
|
|
159
193
|
}
|
|
160
194
|
|
|
195
|
+
/**
|
|
196
|
+
* One evaluation of verified code with a sha256: the functions it provides by name, and the keys
|
|
197
|
+
* compiled from it. Every key whose entry has that sha256 shares it, and so its top-level state.
|
|
198
|
+
*/
|
|
199
|
+
type SharedModule = { sha256: string; code: string; factories: ExtensionFactories; keys: Set<string> };
|
|
200
|
+
|
|
161
201
|
/** Compiled extension code, reused only for the same code and sha256 (one entry per key). */
|
|
162
|
-
type CompiledCode = { sha256: string; code: string; factory: ExtensionFactory };
|
|
202
|
+
type CompiledCode = { sha256: string; code: string; factory: ExtensionFactory; module?: SharedModule };
|
|
163
203
|
|
|
164
204
|
export interface CompileRequest {
|
|
165
205
|
kind: ExtensionKind;
|
|
@@ -170,40 +210,113 @@ export interface CompileRequest {
|
|
|
170
210
|
code: string;
|
|
171
211
|
entry: { id?: string; name?: string; sha256?: string };
|
|
172
212
|
globals: () => ExtensionGlobals;
|
|
173
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* The function names of other entries whose code has the same sha256, also looked up when the
|
|
215
|
+
* code runs, so those entries get their function from the same run. Names that aren't plain
|
|
216
|
+
* identifiers are skipped.
|
|
217
|
+
*/
|
|
218
|
+
siblings?: () => readonly unknown[];
|
|
219
|
+
/** Run the code without checking it against `entry.sha256`; such code is never cached or shared. */
|
|
174
220
|
skipIntegrity?: boolean;
|
|
175
221
|
}
|
|
176
222
|
|
|
223
|
+
/** Whether a cache key belongs to the extension or extractor `id`: keys are `${id}` and `${id}|…`. */
|
|
224
|
+
const isKeyOf = (key: string, id: string) => key === id || key.startsWith(`${id}|`);
|
|
225
|
+
/** The id a cache key belongs to. */
|
|
226
|
+
const idOfKey = (key: string) => key.split('|')[0]!;
|
|
227
|
+
|
|
177
228
|
/**
|
|
178
229
|
* Turns verified registry code into the function it provides. The same code verified against the
|
|
179
|
-
* same hash runs from its compiled copy; unverified code is checked again on every call.
|
|
230
|
+
* same hash runs from its compiled copy; unverified code is checked again on every call. Verified
|
|
231
|
+
* code with a sha256 runs once per sha256: entries that share a bundle (same code, same hash) get
|
|
232
|
+
* their functions from one run, so they share its top-level state.
|
|
180
233
|
*/
|
|
181
234
|
export class CompiledCodeCache {
|
|
182
235
|
private compiled = new Map<string, CompiledCode>();
|
|
236
|
+
// By sha256
|
|
237
|
+
private modules = new Map<string, SharedModule>();
|
|
183
238
|
|
|
184
239
|
constructor(private integrityOptions: IntegrityOptions = {}) {}
|
|
185
240
|
|
|
241
|
+
/**
|
|
242
|
+
* The function `name` for `key`, when this cache has it from code verified against `sha256` (not
|
|
243
|
+
* empty): compiled for `key`, or provided by a run of code with that sha256 for another key.
|
|
244
|
+
* Undefined otherwise, without running anything.
|
|
245
|
+
*/
|
|
246
|
+
lookup(key: string, sha256: string | undefined, name: unknown): ExtensionFactory | undefined {
|
|
247
|
+
if (!sha256) return undefined;
|
|
248
|
+
const cached = this.compiled.get(key);
|
|
249
|
+
if (cached?.sha256 === sha256) return cached.factory;
|
|
250
|
+
const module = this.modules.get(sha256);
|
|
251
|
+
const factory = typeof name === 'string' ? module?.factories.get(name) : undefined;
|
|
252
|
+
if (!module || !factory) return undefined;
|
|
253
|
+
this.remember(key, { sha256, code: module.code, factory, module });
|
|
254
|
+
return factory;
|
|
255
|
+
}
|
|
256
|
+
|
|
186
257
|
compile(key: string, request: CompileRequest): ExtensionFactory {
|
|
187
258
|
const { kind, id, name, code, entry, skipIntegrity } = request;
|
|
188
259
|
assertValidIdentifier(name, kind === 'provider' ? 'factoryName' : 'extractor name', id);
|
|
189
260
|
const label = kind === 'provider' ? 'extension' : 'extractor code';
|
|
261
|
+
const notFound = () => new Error(`Factory function '${name}' not found in ${label}`);
|
|
190
262
|
|
|
191
263
|
const sha256 = entry.sha256 ?? '';
|
|
192
264
|
const cached = this.compiled.get(key);
|
|
193
265
|
if (cached?.sha256 === sha256 && cached.code === code) return cached.factory;
|
|
194
266
|
if (!skipIntegrity) verifyExtensionCode(code, entry, this.integrityOptions);
|
|
195
267
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
268
|
+
// Only verified code with a hash is shared.
|
|
269
|
+
const shareable = !skipIntegrity && sha256 !== '';
|
|
270
|
+
const shared = shareable ? this.modules.get(sha256) : undefined;
|
|
271
|
+
if (shared && shared.code === code && shared.factories.has(name)) {
|
|
272
|
+
const factory = shared.factories.get(name);
|
|
273
|
+
if (!factory) throw notFound();
|
|
274
|
+
this.remember(key, { sha256, code, factory, module: shared });
|
|
275
|
+
return factory;
|
|
199
276
|
}
|
|
200
|
-
|
|
277
|
+
|
|
278
|
+
const siblings = shareable ? (request.siblings?.() ?? []) : [];
|
|
279
|
+
const names = [name, ...siblings.filter((sibling): sibling is string => isIdentifier(sibling) && sibling !== name)];
|
|
280
|
+
const factories = evaluateExtensionCode(code, Array.from(new Set(names)), request.globals(), kind);
|
|
281
|
+
const factory = factories.get(name);
|
|
282
|
+
if (!factory) throw notFound();
|
|
283
|
+
if (skipIntegrity) return factory;
|
|
284
|
+
// When a shared run exists (one that lacks this name), this run stays this key's own.
|
|
285
|
+
const module = shareable && !shared ? { sha256, code, factories, keys: new Set<string>() } : undefined;
|
|
286
|
+
if (module) this.modules.set(sha256, module);
|
|
287
|
+
this.remember(key, { sha256, code, factory, module });
|
|
201
288
|
return factory;
|
|
202
289
|
}
|
|
203
290
|
|
|
204
|
-
/**
|
|
205
|
-
|
|
206
|
-
|
|
291
|
+
/**
|
|
292
|
+
* Forget the compiled code of one extension or extractor (keys `${id}` and `${id}|…`), the shared
|
|
293
|
+
* runs it came from, and the compiled code of every other key that came from those runs. Returns
|
|
294
|
+
* the ids of those other keys.
|
|
295
|
+
*/
|
|
296
|
+
forget(id: string): string[] {
|
|
297
|
+
const siblings = new Set<string>();
|
|
298
|
+
for (const [key, { module }] of Array.from(this.compiled.entries())) {
|
|
299
|
+
if (!isKeyOf(key, id) || !this.compiled.has(key)) continue;
|
|
300
|
+
this.compiled.delete(key);
|
|
301
|
+
if (!module) continue;
|
|
302
|
+
if (this.modules.get(module.sha256) === module) this.modules.delete(module.sha256);
|
|
303
|
+
for (const other of module.keys) {
|
|
304
|
+
this.compiled.delete(other);
|
|
305
|
+
if (!isKeyOf(other, id)) siblings.add(idOfKey(other));
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return Array.from(siblings);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** Store the compiled code of `key`, moving it off the shared run it had before. */
|
|
312
|
+
private remember(key: string, compiled: CompiledCode): void {
|
|
313
|
+
const previous = this.compiled.get(key)?.module;
|
|
314
|
+
if (previous && previous !== compiled.module) {
|
|
315
|
+
previous.keys.delete(key);
|
|
316
|
+
if (!previous.keys.size && this.modules.get(previous.sha256) === previous) this.modules.delete(previous.sha256);
|
|
317
|
+
}
|
|
318
|
+
this.compiled.set(key, compiled);
|
|
319
|
+
compiled.module?.keys.add(key);
|
|
207
320
|
}
|
|
208
321
|
}
|
|
209
322
|
|
|
@@ -225,6 +338,6 @@ export function memoiseLoad<T>(cache: Map<string, Promise<T>>, key: string, load
|
|
|
225
338
|
/** Delete the entries of one extension or extractor: keys `${id}` and `${id}|…`. */
|
|
226
339
|
export function deleteEntriesOf(cache: Map<string, unknown>, id: string): void {
|
|
227
340
|
for (const key of Array.from(cache.keys())) {
|
|
228
|
-
if (key
|
|
341
|
+
if (isKeyOf(key, id)) cache.delete(key);
|
|
229
342
|
}
|
|
230
343
|
}
|
|
@@ -34,7 +34,7 @@ export class RegistryError extends Error {
|
|
|
34
34
|
readonly code: RegistryErrorCode;
|
|
35
35
|
/** Extension id or extractor name, when the error is about one entry */
|
|
36
36
|
readonly id?: string;
|
|
37
|
-
/** Every problem found, e.g. `extensions[
|
|
37
|
+
/** Every problem found, e.g. `extensions[1] (anikoto): factoryName must be a JavaScript identifier` */
|
|
38
38
|
readonly issues: string[];
|
|
39
39
|
/** Version the registry or entry needs: its `schemaVersion` or `minContextVersion` */
|
|
40
40
|
readonly required?: number;
|
|
@@ -155,6 +155,7 @@ const EXTENSION_RULES: Record<string, Rule> = {
|
|
|
155
155
|
isSourceEmbed: flag.optional,
|
|
156
156
|
isSourceDirect: flag.optional,
|
|
157
157
|
haveMultiServers: flag.optional,
|
|
158
|
+
recommended: flag.optional,
|
|
158
159
|
};
|
|
159
160
|
|
|
160
161
|
const EXTRACTOR_RULES: Record<string, Rule> = {
|
package/src/utils/tmdb.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TvType, type IMovieInfo, type IMovieResult, type ISearch } from '../models';
|
|
1
|
+
import { MediaStatus, TvType, type IMovieInfo, type IMovieResult, type ISearch } from '../models';
|
|
2
2
|
import { emptySearch } from '../providers/common/search';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -58,8 +58,11 @@ export const resolveTmdbApiKey = (apiKey: string | undefined, className: string)
|
|
|
58
58
|
return SHARED_TMDB_API_KEY;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
|
|
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 =>
|
|
63
66
|
path ? `https://image.tmdb.org/t/p/${size}${path}` : undefined;
|
|
64
67
|
|
|
65
68
|
/** A season poster or episode still in the two sizes apps show them at. */
|
|
@@ -96,13 +99,54 @@ export const tmdbMultiSearch = async (
|
|
|
96
99
|
export const mapTmdbResult = (result: any, mediaType?: TmdbMediaType): IMovieResult => ({
|
|
97
100
|
id: String(result.id),
|
|
98
101
|
title: result.title || result.name,
|
|
99
|
-
image: tmdbImage(result.poster_path),
|
|
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,
|
|
100
106
|
// Recommendations carry media_type; similar titles don't, and are of the requested type.
|
|
101
107
|
type: (result.media_type ?? mediaType) === 'movie' ? TvType.MOVIE : TvType.TVSERIES,
|
|
102
108
|
rating: result.vote_average || 0,
|
|
103
109
|
releaseDate: releaseYear(result),
|
|
104
110
|
});
|
|
105
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
|
+
|
|
106
150
|
/** A list of TMDB results, or undefined when TMDB sent none. */
|
|
107
151
|
export const mapTmdbResults = (list: any, mediaType: TmdbMediaType): IMovieResult[] | undefined =>
|
|
108
152
|
list?.results?.length ? list.results.map((result: any) => mapTmdbResult(result, mediaType)) : undefined;
|
|
@@ -115,10 +159,12 @@ export const mapTmdbInfo = (data: any, mediaType: TmdbMediaType) => {
|
|
|
115
159
|
const video = data?.videos?.results?.[0];
|
|
116
160
|
return {
|
|
117
161
|
title: data?.title || data?.name,
|
|
118
|
-
|
|
119
|
-
|
|
162
|
+
// Large enough for the poster opened full screen
|
|
163
|
+
image: tmdbImage(data?.poster_path, 'w780'),
|
|
164
|
+
cover: tmdbImage(data?.backdrop_path, 'w1280'),
|
|
120
165
|
type: mediaType === 'movie' ? TvType.MOVIE : TvType.TVSERIES,
|
|
121
166
|
rating: data?.vote_average || 0,
|
|
167
|
+
status: tmdbStatus(data?.status, mediaType),
|
|
122
168
|
releaseDate: data?.release_date || data?.first_air_date,
|
|
123
169
|
description: data?.overview,
|
|
124
170
|
genres: data?.genres?.map((genre: { name: string }) => genre.name),
|
|
@@ -130,7 +176,7 @@ export const mapTmdbInfo = (data: any, mediaType: TmdbMediaType) => {
|
|
|
130
176
|
name: cast.name,
|
|
131
177
|
url: `https://www.themoviedb.org/person/${cast.id}`,
|
|
132
178
|
character: cast.character,
|
|
133
|
-
image: tmdbImage(cast.profile_path),
|
|
179
|
+
image: tmdbImage(cast.profile_path, 'w185'),
|
|
134
180
|
})),
|
|
135
181
|
trailer: video?.key
|
|
136
182
|
? { id: video.key, site: video.site, url: `https://www.youtube.com/watch?v=${video.key}` }
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.AniNeko = void 0;
|
|
7
|
-
var _index = require("../../../models/index.js");
|
|
8
|
-
var _providerClass = require("../../provider-class.js");
|
|
9
|
-
var _createAnineko = require("./create-anineko.js");
|
|
10
|
-
const AniNeko = exports.AniNeko = (0, _providerClass.providerClass)(_index.AnimeParser, _createAnineko.createAniNeko);
|
|
11
|
-
//# sourceMappingURL=anineko.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_index","require","_providerClass","_createAnineko","AniNeko","exports","providerClass","AnimeParser","createAniNeko"],"sourceRoot":"../../../../../src","sources":["providers/anime/anineko/anineko.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEO,MAAMG,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,IAAAE,4BAAa,EAACC,kBAAW,EAAEC,4BAAa,CAAC","ignoreList":[]}
|