mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-11 03:05:05 +01:00
Allow lookmovie content search to fail
This commit is contained in:
parent
455805cb88
commit
3627660840
@ -5,6 +5,7 @@ const BASE_URL = `${process.env.REACT_APP_CORS_PROXY_URL}https://lookmovie.io`;
|
||||
let phpsessid;
|
||||
|
||||
async function findContent(searchTerm, type) {
|
||||
try {
|
||||
const searchUrl = `${BASE_URL}/${type}s/search/?q=${encodeURIComponent(searchTerm)}`;
|
||||
const searchRes = await fetch(searchUrl).then((d) => d.text());
|
||||
|
||||
@ -49,6 +50,9 @@ async function findContent(searchTerm, type) {
|
||||
options: [{ title, slug, type, year, source: 'lookmovie' }]
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
return { options: [] }
|
||||
}
|
||||
}
|
||||
async function getVideoUrl(config) {
|
||||
const { subtitles, token: accessToken } = await getAccessInfo(config);
|
||||
|
Loading…
Reference in New Issue
Block a user