From e1dd5b363be0c0b2794ac99efffba55644793abd Mon Sep 17 00:00:00 2001 From: Pauljd Date: Mon, 2 Nov 2026 07:04:55 +0000 Subject: [PATCH] Give Vortex a Toonami-inspired lineup (0.45.0 in testing) Co-Authored-By: Claude Opus 5.5 (1M context) --- android/app/build.gradle.kts | 4 ++-- .../main/java/tv/orbit/classic/ChannelSchedule.kt | 12 ++++++++---- .../app/src/main/java/tv/orbit/classic/EmbyClient.kt | 2 +- .../java/tv/orbit/classic/SecureMediaDataSource.kt | 2 +- .../java/tv/orbit/classic/ChannelSuggestionsTest.kt | 9 +++++++++ 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index d360d336..4baf859b 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -9,8 +9,8 @@ android { applicationId = "tv.orbit.classic" minSdk = 26 targetSdk = 36 - versionCode = 45 - versionName = "0.44.0-bigger-pools" + versionCode = 46 + versionName = "0.45.0-toonami-vortex" } buildFeatures { compose = true } compileOptions { sourceCompatibility = JavaVersion.VERSION_17; targetCompatibility = JavaVersion.VERSION_17 } diff --git a/android/app/src/main/java/tv/orbit/classic/ChannelSchedule.kt b/android/app/src/main/java/tv/orbit/classic/ChannelSchedule.kt index efc4fcbf..edd3b2eb 100644 --- a/android/app/src/main/java/tv/orbit/classic/ChannelSchedule.kt +++ b/android/app/src/main/java/tv/orbit/classic/ChannelSchedule.kt @@ -19,6 +19,12 @@ internal data class ChannelProgramming(val number: Int, val name: String, val se val signature get() = "${searches.joinToString("|")}#$seriesCount" } +/** Toonami-inspired: Paul's picks and the earlier shortlist, split into cartoons by day and anime from the evening. */ +private val VortexDaytime = listOf("Batman Beyond", "Batman: The Animated Series", "Superman: The Animated Series", "ThunderCats", "The Powerpuff Girls", "Jonny Quest", + "Samurai Jack", "Justice League", "Voltron", "ReBoot", "Beast Wars") +private val VortexEvening = listOf("Dragon Ball Z", "Dragon Ball", "Dragon Ball GT", "Naruto", "Yu Yu Hakusho", "Gundam Wing", "Sailor Moon", "Robotech", "Ronin Warriors", + "Tenchi Muyo", "Outlaw Star", "The Big O", "Cardcaptors", "Zoids") + internal val SmartChannels = listOf( ChannelProgramming(102, "After Dark", listOf("The Thing", "The Evil Dead", "Re-Animator", "Hellraiser", "Videodrome", "An American Werewolf in London", "Halloween", "Day of the Dead", "They Live", "Escape from New York", "The Fog", "Near Dark", "The Lost Boys", "Fright Night", "Society", "Tremors", @@ -32,10 +38,8 @@ internal val SmartChannels = listOf( SuggestionRule("day", "Daytime", "Movie", listOf("Science Fiction", "Action"), 1975..2005, 6.5f, setOf("NC-17", "X"), 40), SuggestionRule("day", "Daytime", "Movie", listOf("Thriller", "Mystery"), 1975..2005, 6.5f, setOf("NC-17", "X"), 30), SuggestionRule("late", "Late night", "Movie", listOf("Horror"), 1970..2010, 6f, emptySet(), 90))), - ChannelProgramming(103, "Vortex", listOf("Dragon Ball Z", "Batman Beyond", "Superman: The Animated Series", "Naruto", "Gundam Wing", "Yu Yu Hakusho", "Samurai Jack"), - seriesCount = 6, finishTogether = true, - dayParts = listOf(DayPart(6, 18, listOf("Batman Beyond", "Superman: The Animated Series", "Samurai Jack"), group = "day"), - DayPart(18, 6, listOf("Dragon Ball Z", "Naruto", "Yu Yu Hakusho", "Gundam Wing"), group = "night")), + ChannelProgramming(103, "Vortex", VortexDaytime + VortexEvening, seriesCount = 30, finishTogether = true, + dayParts = listOf(DayPart(6, 18, VortexDaytime, group = "day"), DayPart(18, 6, VortexEvening, group = "night")), suggestionRules = listOf( SuggestionRule("day", "Daytime", "Series", listOf("Animation", "Action"), 1985..2015, 7f, setOf("TV-MA"), 30), SuggestionRule("night", "Evening", "Series", listOf("Anime"), 1985..2020, 7.5f, emptySet(), 20))), diff --git a/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt b/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt index 92afb9fa..91a454b4 100644 --- a/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt +++ b/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt @@ -41,7 +41,7 @@ internal class HttpsEmbyTransport(internal val deviceId: String = UUID.randomUUI connection.connectTimeout = 10_000 connection.readTimeout = request.readTimeoutMs ?: if (request.path == "/Sessions/Logout") 5_000 else 15_000 connection.setRequestProperty("Accept", "application/json") - connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.44.0\"") + connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.45.0\"") request.token?.let { connection.setRequestProperty("X-Emby-Token", it) } if (request.method == "POST") { val bytes = request.body.orEmpty().toByteArray(Charsets.UTF_8) diff --git a/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt b/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt index aad23038..2101a10b 100644 --- a/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt +++ b/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt @@ -33,7 +33,7 @@ internal class SecureMediaDataSource(private val session: EmbySampleSession) : B next.instanceFollowRedirects = false next.connectTimeout = 10_000 next.readTimeout = 20_000 - next.setRequestProperty("User-Agent", "OrbitTV/0.44.0") + next.setRequestProperty("User-Agent", "OrbitTV/0.45.0") next.setRequestProperty("Accept-Encoding", "identity") session.mediaHeaders(address).forEach { (key, value) -> next.setRequestProperty(key, value) } if (dataSpec.position != 0L || dataSpec.length != C.LENGTH_UNSET.toLong()) { diff --git a/android/app/src/test/java/tv/orbit/classic/ChannelSuggestionsTest.kt b/android/app/src/test/java/tv/orbit/classic/ChannelSuggestionsTest.kt index 205b7e92..d8240a5f 100644 --- a/android/app/src/test/java/tv/orbit/classic/ChannelSuggestionsTest.kt +++ b/android/app/src/test/java/tv/orbit/classic/ChannelSuggestionsTest.kt @@ -85,4 +85,13 @@ class ChannelSuggestionsTest { assertEquals("day", SmartChannels.first { it.number == 102 }.dayParts[1].group) assertEquals(listOf("day", "night"), SmartChannels.first { it.number == 103 }.dayParts.map { it.group }) } + + @Test fun vortexKeepsPaulsToonamiPicksInTheRightBlocks() { + val vortex = SmartChannels.first { it.number == 103 } + val day = vortex.dayParts[0].titles.map(::seriesKey) + assertTrue(listOf("Batman Beyond", "Batman: The Animated Series", "ThunderCats", "The Powerpuff Girls", "Jonny Quest").all { seriesKey(it) in day }) + assertTrue(seriesKey("Dragon Ball Z") in vortex.dayParts[1].titles.map(::seriesKey)) + assertEquals(vortex.searches.size, vortex.searches.distinct().size) + assertTrue(vortex.seriesCount >= vortex.searches.size) + } }