From ddccd31f0f39ef7072084f3457cac7cc3eba557e Mon Sep 17 00:00:00 2001 From: Arjix <53124886+ArjixWasTaken@users.noreply.github.com> Date: Sat, 30 Oct 2021 23:35:03 +0300 Subject: [PATCH] Update AllAnimeProvider.kt --- .../cloudstream3/animeproviders/AllAnimeProvider.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AllAnimeProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AllAnimeProvider.kt index fdb316f5..9fb45c00 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AllAnimeProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/animeproviders/AllAnimeProvider.kt @@ -247,12 +247,12 @@ class AllAnimeProvider : MainAPI() { @JsonProperty("episodeIframeHead") val episodeIframeHead: String ) - private fun getM3u8Qualities(m3u8Link: String, referer: String): ArrayList { + private fun getM3u8Qualities(m3u8Link: String, referer: String, qualityName: String): ArrayList { return ArrayList(hlsHelper.m3u8Generation(M3u8Helper.M3u8Stream(m3u8Link, null), true).map { stream -> val qualityString = if ((stream.quality ?: 0) == 0) "" else "${stream.quality}p" ExtractorLink( this.name, - "${this.name} $qualityString", + "${this.name} - $qualityName $qualityString", stream.streamUrl, referer, getQualityFromName(stream.quality.toString()), @@ -283,7 +283,7 @@ class AllAnimeProvider : MainAPI() { // for now ignore } else if (!embedIsBlacklisted(link)) { if (URI(link).path.contains(".m3u")) { - getM3u8Qualities(link, data).forEach(callback) + getM3u8Qualities(link, data, URI(link).host).forEach(callback) } else { callback( ExtractorLink( @@ -305,7 +305,7 @@ class AllAnimeProvider : MainAPI() { val links = mapper.readValue(response.text).links links.forEach { server -> if (server.hls != null && server.hls) { - getM3u8Qualities(server.link, "$apiEndPoint/player?uri=" + (if (URI(server.link).host.isNotEmpty()) server.link else apiEndPoint + URI(server.link).path)).forEach(callback) + getM3u8Qualities(server.link, "$apiEndPoint/player?uri=" + (if (URI(server.link).host.isNotEmpty()) server.link else apiEndPoint + URI(server.link).path), server.resolutionStr).forEach(callback) } else { callback(ExtractorLink( "AllAnime - " + URI(server.link).host,