mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-11 01:05:08 +01:00
URL encode all params
This commit is contained in:
parent
56c50fbb2f
commit
bb6e363829
@ -17,7 +17,7 @@ export const flixhqProvider: MWMediaProvider = {
|
|||||||
|
|
||||||
async getMediaFromPortable(media: MWPortableMedia): Promise<MWProviderMediaResult> {
|
async getMediaFromPortable(media: MWPortableMedia): Promise<MWProviderMediaResult> {
|
||||||
const searchRes = await fetch(
|
const searchRes = await fetch(
|
||||||
`${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/info?id=${media.mediaId}`
|
`${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/info?id=${encodeURIComponent(media.mediaId)}`
|
||||||
).then((d) => d.json());
|
).then((d) => d.json());
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -29,7 +29,7 @@ export const flixhqProvider: MWMediaProvider = {
|
|||||||
|
|
||||||
async searchForMedia(query: MWQuery): Promise<MWProviderMediaResult[]> {
|
async searchForMedia(query: MWQuery): Promise<MWProviderMediaResult[]> {
|
||||||
const searchRes = await fetch(
|
const searchRes = await fetch(
|
||||||
`${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/${query.searchQuery}`
|
`${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/${encodeURIComponent(query.searchQuery)}`
|
||||||
).then((d) => d.json());
|
).then((d) => d.json());
|
||||||
|
|
||||||
const results: MWProviderMediaResult[] = (searchRes || []).results.map((item: any) => ({
|
const results: MWProviderMediaResult[] = (searchRes || []).results.map((item: any) => ({
|
||||||
@ -44,7 +44,7 @@ export const flixhqProvider: MWMediaProvider = {
|
|||||||
|
|
||||||
async getStream(media: MWPortableMedia): Promise<MWMediaStream> {
|
async getStream(media: MWPortableMedia): Promise<MWMediaStream> {
|
||||||
const searchRes = await fetch(
|
const searchRes = await fetch(
|
||||||
`${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/info?id=${media.mediaId}`
|
`${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/info?id=${encodeURIComponent(media.mediaId)}`
|
||||||
).then((d) => d.json());
|
).then((d) => d.json());
|
||||||
|
|
||||||
const params = new URLSearchParams({
|
const params = new URLSearchParams({
|
||||||
|
Loading…
Reference in New Issue
Block a user