From a5b84aeb6eb68912025ed7b95350404d8820688e Mon Sep 17 00:00:00 2001 From: Swakshan Date: Sun, 16 Mar 2025 11:55:34 +0530 Subject: [PATCH 1/3] extension(aniplay): update yuki proxy --- javascript/anime/src/en/aniplay.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/anime/src/en/aniplay.js b/javascript/anime/src/en/aniplay.js index 44d5c342..db8aa7ff 100644 --- a/javascript/anime/src/en/aniplay.js +++ b/javascript/anime/src/en/aniplay.js @@ -6,7 +6,7 @@ const mangayomiSources = [{ "iconUrl": "https://www.google.com/s2/favicons?sz=128&domain=https://aniplaynow.live/", "typeSource": "single", "itemType": 1, - "version": "1.2.0", + "version": "1.2.1", "dateFormat": "", "dateFormatLocale": "", "pkgPath": "anime/src/en/aniplay.js" @@ -389,7 +389,7 @@ class DefaultExtension extends MProvider { var slug = "/fetch?url=" var ref = "&ref=" if (providerId == "yuki") { - slug = "/zoroprox?url=" + slug = "/yukiprox?url=" ref = "" } else if (providerId == "pahe") { ref += "https://kwik.si" From 2a1ff024f4afd60b81c6a60dc1100b2fd23a13be Mon Sep 17 00:00:00 2001 From: Swakshan Date: Sun, 16 Mar 2025 12:06:40 +0530 Subject: [PATCH 2/3] extension(aniplay): dont include thumbnails in subs --- javascript/anime/src/en/aniplay.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/javascript/anime/src/en/aniplay.js b/javascript/anime/src/en/aniplay.js index db8aa7ff..a09d5c26 100644 --- a/javascript/anime/src/en/aniplay.js +++ b/javascript/anime/src/en/aniplay.js @@ -6,7 +6,7 @@ const mangayomiSources = [{ "iconUrl": "https://www.google.com/s2/favicons?sz=128&domain=https://aniplaynow.live/", "typeSource": "single", "itemType": 1, - "version": "1.2.1", + "version": "1.2.2", "dateFormat": "", "dateFormatLocale": "", "pkgPath": "anime/src/en/aniplay.js" @@ -420,7 +420,7 @@ class DefaultExtension extends MProvider { }]; // Pahe only has auto if (providerId === "pahe") { - return streams; + return streams; } for (let i = 0; i < lines.length; i++) { if (lines[i].startsWith('#EXT-X-STREAM-INF:')) { @@ -453,10 +453,13 @@ class DefaultExtension extends MProvider { var subtitles = [] result.subtitles.forEach(sub => { - subtitles.push({ - "label": sub.lang, - "file": sub.url, - }); + var label = sub.label + if (label.indexOf("thumbnail") < 0) { // thumbnails shouldnt be included + subtitles.push({ + "label": label, + "file": sub.url, + }); + } }) streams[0].subtitles = subtitles @@ -527,7 +530,7 @@ class DefaultExtension extends MProvider { } else { streams = await this.getAnyStreams(result) //If new provider found getAnyStreams will extract only the streams } - + streams = await this.streamProxy(providerId, streams) return await this.sortStreams(streams) } From a34fbc84533aa5b7c27b06d5aeafa797e82d80e7 Mon Sep 17 00:00:00 2001 From: Swakshan Date: Sun, 16 Mar 2025 12:12:28 +0530 Subject: [PATCH 3/3] extension(aniplay): Added preference to "split streams based on quality" --- javascript/anime/src/en/aniplay.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/javascript/anime/src/en/aniplay.js b/javascript/anime/src/en/aniplay.js index a09d5c26..6a08fddc 100644 --- a/javascript/anime/src/en/aniplay.js +++ b/javascript/anime/src/en/aniplay.js @@ -6,7 +6,7 @@ const mangayomiSources = [{ "iconUrl": "https://www.google.com/s2/favicons?sz=128&domain=https://aniplaynow.live/", "typeSource": "single", "itemType": 1, - "version": "1.2.2", + "version": "1.2.3", "dateFormat": "", "dateFormatLocale": "", "pkgPath": "anime/src/en/aniplay.js" @@ -409,19 +409,22 @@ class DefaultExtension extends MProvider { // Extracts the streams url for different resolutions from a hls stream. async extractStreams(url, providerId, hdr = {}) { - const response = await new Client().get(url, hdr); - const body = response.body; - const lines = body.split('\n'); var streams = [{ url: url, originalUrl: url, quality: `Auto - ${providerId}`, headers: hdr }]; + var doExtract = this.getPreference("aniplay_pref_extract_streams"); // Pahe only has auto - if (providerId === "pahe") { + if (providerId === "pahe" || !doExtract) { return streams; } + + const response = await new Client().get(url, hdr); + const body = response.body; + const lines = body.split('\n'); + for (let i = 0; i < lines.length; i++) { if (lines[i].startsWith('#EXT-X-STREAM-INF:')) { var resolution = lines[i].match(/RESOLUTION=(\d+x\d+)/)[1]; @@ -582,7 +585,14 @@ class DefaultExtension extends MProvider { "entries": ["Sub", "Dub"], "entryValues": ["sub", "dub"], } - }, { + }, { + "key": "aniplay_pref_extract_streams", + "switchPreferenceCompat": { + 'title': 'Split stream into different quality streams', + "summary": "Split stream Auto into 360p/720p/1080p", + "value": true + } + },{ key: 'aniplay_pref_video_resolution', listPreference: { title: 'Preferred video resolution',