diff --git a/src/all/torrentio/build.gradle b/src/all/torrentio/build.gradle index 9c35d4543d..babff732ad 100644 --- a/src/all/torrentio/build.gradle +++ b/src/all/torrentio/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Torrentio (Torrent / Debrid)' extClass = '.Torrentio' - extVersionCode = 1 + extVersionCode = 2 containsNsfw = false } diff --git a/src/all/torrentio/src/eu/kanade/tachiyomi/animeextension/all/torrentio/Torrentio.kt b/src/all/torrentio/src/eu/kanade/tachiyomi/animeextension/all/torrentio/Torrentio.kt index a50dc6b302..7eed3eb354 100644 --- a/src/all/torrentio/src/eu/kanade/tachiyomi/animeextension/all/torrentio/Torrentio.kt +++ b/src/all/torrentio/src/eu/kanade/tachiyomi/animeextension/all/torrentio/Torrentio.kt @@ -602,6 +602,7 @@ class Torrentio : ConfigurableAnimeSource, AnimeHttpSource() { "AllDebrid", "DebridLink", "Offcloud", + "TorBox", ) private val PREF_DEBRID_VALUES = arrayOf( "none", @@ -610,6 +611,7 @@ class Torrentio : ConfigurableAnimeSource, AnimeHttpSource() { "alldebrid", "debridlink", "offcloud", + "torbox", ) // Sort diff --git a/src/all/torrentioanime/build.gradle b/src/all/torrentioanime/build.gradle index 05d1795dec..61921d82a7 100644 --- a/src/all/torrentioanime/build.gradle +++ b/src/all/torrentioanime/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Torrentio Anime (Torrent / Debrid)' extClass = '.Torrentio' - extVersionCode = 9 + extVersionCode = 11 containsNsfw = false } diff --git a/src/all/torrentioanime/src/eu/kanade/tachiyomi/animeextension/all/torrentioanime/Torrentio.kt b/src/all/torrentioanime/src/eu/kanade/tachiyomi/animeextension/all/torrentioanime/Torrentio.kt index 7270613e03..f985310aa5 100644 --- a/src/all/torrentioanime/src/eu/kanade/tachiyomi/animeextension/all/torrentioanime/Torrentio.kt +++ b/src/all/torrentioanime/src/eu/kanade/tachiyomi/animeextension/all/torrentioanime/Torrentio.kt @@ -317,6 +317,7 @@ class Torrentio : ConfigurableAnimeSource, AnimeHttpSource() { ?.let { videos -> if (preferences.getBoolean(UPCOMING_EP_KEY, UPCOMING_EP_DEFAULT)) { videos } else { videos.filter { video -> (video.released?.let { parseDate(it) } ?: 0L) <= System.currentTimeMillis() } } } + ?.filter { it.thumbnail != null } ?.map { video -> SEpisode.create().apply { episode_number = video.episode?.toFloat() ?: 0.0F @@ -603,6 +604,7 @@ class Torrentio : ConfigurableAnimeSource, AnimeHttpSource() { "AllDebrid", "DebridLink", "Offcloud", + "TorBox", ) private val PREF_DEBRID_VALUES = arrayOf( "none", @@ -611,6 +613,7 @@ class Torrentio : ConfigurableAnimeSource, AnimeHttpSource() { "alldebrid", "debridlink", "offcloud", + "torbox", ) // Sort diff --git a/src/all/torrentioanime/src/eu/kanade/tachiyomi/animeextension/all/torrentioanime/dto/TorrentioDto.kt b/src/all/torrentioanime/src/eu/kanade/tachiyomi/animeextension/all/torrentioanime/dto/TorrentioDto.kt index d62b163751..0fd7d6fa27 100644 --- a/src/all/torrentioanime/src/eu/kanade/tachiyomi/animeextension/all/torrentioanime/dto/TorrentioDto.kt +++ b/src/all/torrentioanime/src/eu/kanade/tachiyomi/animeextension/all/torrentioanime/dto/TorrentioDto.kt @@ -154,4 +154,5 @@ data class EpisodeVideo( val episode: Int? = null, val released: String? = null, val title: String? = null, + val thumbnail: String? = null, ) diff --git a/src/en/aniplay/build.gradle b/src/en/aniplay/build.gradle index e78b9bfeea..e6dc109ab3 100644 --- a/src/en/aniplay/build.gradle +++ b/src/en/aniplay/build.gradle @@ -2,7 +2,7 @@ ext { extName = 'AniPlay' extClass = '.AniPlay' themePkg = 'anilist' - overrideVersionCode = 6 + overrideVersionCode = 8 } apply from: "$rootDir/common.gradle" diff --git a/src/en/aniplay/src/eu/kanade/tachiyomi/animeextension/en/aniplay/AniPlay.kt b/src/en/aniplay/src/eu/kanade/tachiyomi/animeextension/en/aniplay/AniPlay.kt index 01096cb44a..9dec8ff346 100644 --- a/src/en/aniplay/src/eu/kanade/tachiyomi/animeextension/en/aniplay/AniPlay.kt +++ b/src/en/aniplay/src/eu/kanade/tachiyomi/animeextension/en/aniplay/AniPlay.kt @@ -15,9 +15,9 @@ import eu.kanade.tachiyomi.animesource.model.Track import eu.kanade.tachiyomi.animesource.model.Video import eu.kanade.tachiyomi.lib.playlistutils.PlaylistUtils import eu.kanade.tachiyomi.multisrc.anilist.AniListAnimeHttpSource -import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.POST -import eu.kanade.tachiyomi.util.parallelFlatMapBlocking +import eu.kanade.tachiyomi.util.parallelFlatMap +import eu.kanade.tachiyomi.util.parallelMap import eu.kanade.tachiyomi.util.parseAs import kotlinx.serialization.SerializationException import kotlinx.serialization.encodeToString @@ -32,6 +32,7 @@ import java.io.IOException import java.text.SimpleDateFormat import java.util.Locale +@Suppress("unused") class AniPlay : AniListAnimeHttpSource(), ConfigurableAnimeSource { override val name = "AniPlay" override val lang = "en" @@ -68,7 +69,7 @@ class AniPlay : AniListAnimeHttpSource(), ConfigurableAnimeSource { } } - val baseHost: String get() = "${preferences.getString(PREF_DOMAIN_KEY, PREF_DOMAIN_DEFAULT)}" + private val baseHost: String get() = "${preferences.getString(PREF_DOMAIN_KEY, PREF_DOMAIN_DEFAULT)}" /* ====================================== Episode List ====================================== */ @@ -93,22 +94,6 @@ class AniPlay : AniListAnimeHttpSource(), ConfigurableAnimeSource { val episodeListUrl = response.request.url val animeId = episodeListUrl.pathSegments[2] - val responsePage = client.newCall(GET("$baseUrl/anime/watch/$animeId")).execute() - val responsePageString = responsePage.body.string() - var idMal: Number? = null - val idMalIndex = responsePageString.indexOf("\\\"idMal\\\":") - if (idMalIndex != -1) { - val startIndex = idMalIndex + "\\\"idMal\\\":".length - val endIndex = responsePageString.indexOf(',', startIndex) - if (endIndex != -1) { - idMal = responsePageString.substring(startIndex, endIndex).toIntOrNull() - } - } - if (idMal == null) { - Log.e("AniPlay", "idMal not found - responsePageString: $responsePageString") - throw Exception("idMal not found") - } - val responseString = response.body.string() val episodesArrayString = extractEpisodeList(responseString) if (episodesArrayString == null) { @@ -131,7 +116,7 @@ class AniPlay : AniListAnimeHttpSource(), ConfigurableAnimeSource { source = provider.providerId, episodeId = episode.id, episodeNum = episode.number, - hasDub = episode.hasDub, + hasDub = episode.hasDub ?: false, ) episodeExtras[episodeNumber] = existingEpisodeExtras + listOf(episodeExtra) } @@ -150,7 +135,6 @@ class AniPlay : AniListAnimeHttpSource(), ConfigurableAnimeSource { .addQueryParameter("id", animeId) .addQueryParameter("ep", episodeNumber.toString()) .addQueryParameter("extras", episodeExtraString) - .addQueryParameter("idMal", idMal.toString()) .build() val name = parseEpisodeName(episodeNumber.toString(), episode.title) @@ -160,7 +144,7 @@ class AniPlay : AniListAnimeHttpSource(), ConfigurableAnimeSource { else -> "" } val filler = when { - episode.isFiller && isMarkFiller -> " • Filler Episode" + episode.isFiller == true && isMarkFiller -> " • Filler Episode" else -> "" } val scanlator = "Sub$dub$filler" @@ -180,7 +164,6 @@ class AniPlay : AniListAnimeHttpSource(), ConfigurableAnimeSource { override suspend fun getVideoList(episode: SEpisode): List