Skip to content

Commit

Permalink
fix: fixed source extractor using 'https://github.com/drblgn/rabbit_wasm
Browse files Browse the repository at this point in the history
'
  • Loading branch information
WBRK-dev committed Dec 24, 2024
1 parent 37eeb18 commit 1c93de2
Show file tree
Hide file tree
Showing 3 changed files with 599 additions and 1,146 deletions.
18 changes: 10 additions & 8 deletions controllers/movieEpisodeSources.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ export default async function (req: any, res: Response) {

const sourceProviderBaseUrl = (new URL(serverAjaxResponse.data.data.link)).hostname;

switch (sourceProviderBaseUrl) {
case SERVERS.RABBITSTREAM:
// switch (sourceProviderBaseUrl) {
// case SERVERS.RABBITSTREAM:
const sourceId = (new URL(serverAjaxResponse.data.data.link)).pathname.split("/").pop();
res.send(await RabbitStream(sourceId));
break;
default:
throw { name: "ParserNotFoundError", message: `Parser not found for provider '${sourceProviderBaseUrl}'` };
}
console.log(sourceProviderBaseUrl, sourceId);
res.send(await RabbitStream(serverAjaxResponse.data.data.link, "https://vidstream.to"));
// break;
// default:
// console.log(serverAjaxResponse);
// throw { name: "ParserNotFoundError", message: `Parser not found for provider '${sourceProviderBaseUrl}'` };
// }

}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"crypto-js": "^4.2.0",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"image-pixels": "^2.2.2",
"tsx": "^4.17.0",
"typescript": "^5.5.4"
},
Expand Down
Loading

0 comments on commit 1c93de2

Please sign in to comment.