diff --git a/anime/anicrush/source.js b/anime/anicrush/source.js index bb2c7b2..de5d46b 100644 --- a/anime/anicrush/source.js +++ b/anime/anicrush/source.js @@ -1,13 +1,18 @@ class AniCrush { constructor() { - this.type = "anime-board"; + this.type = "anime-streaming"; this.version = "1.0.0"; this.baseUrl = "https://anicrush.to"; this.apiBase = "https://api.anicrush.to"; } getSettings() { - return { episodeServers: ["Southcloud-1", "Southcloud-2", "Southcloud-3"], supportsDub: true }; + return { + episodeServers: ["Southcloud-1", "Southcloud-2", "Southcloud-3"], + supportsSub: true, + supportsDub: true, + supportsHls: true + }; } _nativeFetch(url, method, headers, body) { @@ -258,8 +263,6 @@ class AniCrush { `${this.apiBase}/shared/v2/episode/sources?_movieId=${encodeURIComponent(id)}` + `&ep=${encodeURIComponent(String(num))}&sv=${encodeURIComponent(String(sv))}&sc=${encodeURIComponent(subOrDub)}`; - try { Native.log("AniCrush", "findEpisodeServer: sc=" + subOrDub + " movieId=" + id + " ep=" + num + " sv=" + sv + " url=" + linkUrl); } catch (e) {} - const json = this._getJson(linkUrl, this._headers()); const encryptedIframe = (((json || {}).result || {}).link) ? String(json.result.link) : ""; if (!encryptedIframe) throw new Error("Missing encrypted iframe link"); @@ -367,4 +370,4 @@ class AniCrush { } } -module.exports = AniCrush; +module.exports = new AniCrush();