mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
refactor: Simplify link generation in getMeta and getStream functions
This commit is contained in:
@@ -93,12 +93,9 @@ export const getStream = async function ({
|
||||
console.log(id);
|
||||
const streams: Stream[] = [];
|
||||
// Handle double-encoded JSON
|
||||
let parsedId = typeof id === "string" ? JSON.parse(id) : id;
|
||||
if (typeof parsedId === "string") {
|
||||
parsedId = JSON.parse(parsedId);
|
||||
}
|
||||
const { imdbId, season, episode } = parsedId;
|
||||
console.log("Parsed ID:", parsedId);
|
||||
|
||||
const [imdbId, season, episode] = id.split("-");
|
||||
console.log("Parsed ID:", { imdbId, season, episode });
|
||||
console.log("imdbId:", imdbId);
|
||||
|
||||
///// mostraguarda
|
||||
|
||||
Reference in New Issue
Block a user