mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
fix: dont include config in regex
This commit is contained in:
@@ -63,8 +63,8 @@ app.get('/:config/stream/:type/:id', (req: Request, res: Response) => {
|
||||
const decodedPath = decodeURIComponent(req.path);
|
||||
|
||||
const streamMatch = new RegExp(
|
||||
`/${config}/stream/(movie|series)/tt([0-9]{7,})(?::([0-9]+):([0-9]+))?\.json`
|
||||
).exec(decodedPath);
|
||||
`/stream/(movie|series)/tt([0-9]{7,})(?::([0-9]+):([0-9]+))?\.json`
|
||||
).exec(decodedPath.replace(`/${config}`, ''));
|
||||
|
||||
if (!streamMatch) {
|
||||
// log after removing config if present
|
||||
|
||||
@@ -71,9 +71,7 @@ export default {
|
||||
const config = components[0];
|
||||
const decodedPath = decodeURIComponent(url.pathname);
|
||||
|
||||
const streamMatch = new RegExp(
|
||||
`/${config}/stream/(movie|series)/tt([0-9]{7,})(?::([0-9]+):([0-9]+))?.json`
|
||||
).exec(decodedPath);
|
||||
const streamMatch = /\/stream\/(movie|series)\/tt(\d{7,})(?::(\d+):(\d+))?.json/.exec(decodedPath.replace(`/${config}`, ''));
|
||||
|
||||
if (!streamMatch) {
|
||||
let path = decodedPath.replace(`/${config}`, '');
|
||||
|
||||
Reference in New Issue
Block a user