diff --git a/README.md b/README.md index 56dca7c..a6fb533 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ You can now use this to access Vyla's content. ```js // Get sources // Args: excludeDisabled -sdk.getSources(false); +sdk.getSources(false); -> {key, timeout, label, ...}[] // Get subtitles // Args: tmdb id, season?, episode? @@ -37,4 +37,8 @@ await sdk.probeSource('nebula'); -> {ok, ms} // Probe & test all sources await sdk.probeAllSources(); -> {'key': {ok, ms}, ...} + +// Get HLS streams +// Args: source key, tmdb id, season?, episode?, clientIP? +await sdk.getStream('nebula', '0000000', null, null, null) -> {allUrls: {url, quality, label?, server?, type?, skipProxy?, skipVerify?, headers? ...}[]} ``` \ No newline at end of file diff --git a/package.json b/package.json index e8c7db3..a29f941 100644 --- a/package.json +++ b/package.json @@ -24,5 +24,8 @@ "keywords": [], "devDependencies": { "dotenv": "^17.4.2" + }, + "publishConfig": { + "access": "public" } -} +} \ No newline at end of file diff --git a/src/downloads/downloads.js b/src/downloads/downloads.js index 6e512e9..e553685 100644 --- a/src/downloads/downloads.js +++ b/src/downloads/downloads.js @@ -1,4 +1,4 @@ -import { getDownloads, getDownloadsTv } from "./sources/trendimovies"; +import { getDownloads, getDownloadsTv } from "./sources/trendimovies.js"; export async function fetchDownloads(id, s = null, e = null) { const res = s != null && e != null diff --git a/test/index.js b/test/index.js index e14c777..b764776 100644 --- a/test/index.js +++ b/test/index.js @@ -10,11 +10,11 @@ const sdk = new VylaSDK({ }); // 'true' is excludeDisabled -// const sources = sdk.getSources(true); -// const source = sources.find(s => s.key === 'lookmovie'); +const sources = sdk.getSources(true); +const source = sources.find(s => s.key === 'goated'); -// const result = await sdk.getStream(source.key, BACKROOMS); -// console.log("Result:", result.allUrls[0].url); +const result = await sdk.getStream(source.key, BACKROOMS); +console.log("Result:", result); // const tests = { // probeAll(log) {