Debloat your Android TV, install apps, browse and transfer files on it, all from your phone. Just 3 MB, no tracking, no root, no PC.
Download the launcher, app name and streaming lists and the logos
jesse-agent-2326f5c6037d6d4
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ad25650..c3e6dba 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -12,6 +12,7 @@ until this file has a section for its version.## Unreleased+- **Improved:** Streaming services, launchers and app names come from tellyscope-devices, so new ones arrive without an app update. Your own list source can change them too. [#PR](../../pull/PR)- **New:** Remote buttons open Netflix, YouTube, Plex and 20 more streaming apps. [#224](../../pull/224)- Hold a button, or use ⋮ › Remote buttons, to pick up to three (four on a tablet).- Screen off and Restart TV moved into ⋮ at the top of the Remote.diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 4bc1267..9ef51cd 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -28,13 +28,17 @@ The per-TV lists behind **Debloat** and the Overview's list card live in the [teYou don't have to trust ours. Fork tellyscope-devices, edit the lists in your fork, and keep `index.json` on schema 1 with each file's sha256 updated. Then in the app open **Settings** (in the ⋮ menu at the top right), open **Advanced** at the bottom, tap **Use your own debloat lists**, and paste the raw address of the folder that holds `index.json`, for example `https://raw.githubusercontent.com/<you>/tellyscope-devices/main/`. Only HTTPS is accepted, and a source that doesn't serve a schema 1 index is refused without changing anything. Switching drops the cached lists. While your source is in use, the review step says where the list came from. The built-in protected list still wins over any list, and **Reset to default** goes back to tellyscope-devices.-## Bundled lists+## Launchers, app names and streaming services-The lists the app ships with live in [`app/src/main/resources/lists/`](app/src/main/resources/lists/). Change one with a pull request, and the change reaches people with the next release. They are never fetched, so a custom debloat list source can't add to them. Each file is JSON on `"schema": 1`, and `LaunchersTest` or `StreamingTest` checks that every entry reads.+These lists live in tellyscope-devices too, next to the debloat lists, and the app downloads them from the same source: change one there with a pull request and it reaches people without an app release. A fork's source supplies them as well. File formats and checks are in that repo's README.-- [`launchers.json`](app/src/main/resources/lists/launchers.json) lists the third-party launchers Tellyscope knows. Set `"accessibility": true` only for a launcher that keeps Home with its own accessibility service: Make Home offers to turn that service on, and an accessibility service can read the screen. Check the APK's manifest for a service with `BIND_ACCESSIBILITY_SERVICE`, and put the version you checked in `"checked"`. `LaunchersTest` names every such launcher on purpose, so add yours there too and a reviewer sees it. A launcher with an `"about"` line is offered in **Install a home screen**, in the file's order; keep that line short and plain.-- [`labels.json`](app/src/main/resources/lists/labels.json) holds the names shown for common TV apps when the TV can't tell us (old Android, or a maker that blocks it). Add a package to the right group with the name its own APK shows.-- [`streaming.json`](app/src/main/resources/lists/streaming.json) lists the streaming services the Remote can have a button for, by group. Each has its `"packages"` (the usual TV app first), a `"color"` as `#RRGGBB` (with `"color2"` for a gradient) and a `"logo"`: a transparent PNG at four times its size in dp, in [`lists/logos/`](app/src/main/resources/lists/logos/), at most 72 × 30 dp. Add `"dark"` only when the colour is under 3:1 against the dark sheet; the pill fills with it in dark mode. `StreamingTest` checks every entry, logo and dark fill. The logos are their owners' trademarks, so add the source of a new one to [NOTICE](NOTICE).+- `lists/launchers.json`: the third-party launchers Tellyscope knows. One with an `"about"` line is offered in **Install a home screen**, in the file's order.+- `lists/labels.json`: names shown for common TV apps when the TV can't tell us.+- `lists/streaming.json` and `logos/`: the streaming services the Remote can have a button for, with their logos.++Which launchers may turn on an accessibility service is not on any list: it's `ACCESSIBILITY_LAUNCHERS` in [`Launchers.kt`](app/src/main/java/app/tellyscope/data/Launchers.kt), because an accessibility service can read the screen. Add one only for a launcher that keeps Home with its own accessibility service: check the APK's manifest for a service with `BIND_ACCESSIBILITY_SERVICE` and put the version you checked next to it. `LaunchersTest` names every such launcher on purpose, so add yours there too and a reviewer sees it.++The tests read a copy of the lists and logos from [`app/src/test/resources/lists/`](app/src/test/resources/lists/); the app itself bundles none.## README screenshotsdiff --git a/NOTICE b/NOTICEindex 2677451..41b5439 100644--- a/NOTICE+++ b/NOTICE@@ -79,7 +79,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.---------------------------------------------------------------------------------Streaming service logos in app/src/main/resources/lists/logos/+Streaming service logos in app/src/test/resources/lists/logos/ (test copies)The names and logos of the services in lists/streaming.json are trademarks oftheir owners. They are not covered by the GNU General Public License: they arenot part of Tellyscope's source, and no licence to them is given. Tellyscopediff --git a/adb/src/main/kotlin/app/tellyscope/adb/HomeServices.kt b/adb/src/main/kotlin/app/tellyscope/adb/HomeServices.ktindex 3b4f45d..938c0a3 100644--- a/adb/src/main/kotlin/app/tellyscope/adb/HomeServices.kt+++ b/adb/src/main/kotlin/app/tellyscope/adb/HomeServices.kt@@ -3,7 +3,7 @@ package app.tellyscope.adb/*** The `enabled_accessibility_services` setting, for launchers that keep Home with their own- * accessibility service. Which launchers those are is the app's `launchers.json`.+ * accessibility service. Which launchers those are is the app's `ACCESSIBILITY_LAUNCHERS`.*/object HomeServices {/** [list] is the `enabled_accessibility_services` setting: colon-separated, "null" when unset. */diff --git a/app/src/main/java/app/tellyscope/data/AdbDeviceSource.kt b/app/src/main/java/app/tellyscope/data/AdbDeviceSource.ktindex ed2e562..37ff15f 100644--- a/app/src/main/java/app/tellyscope/data/AdbDeviceSource.kt+++ b/app/src/main/java/app/tellyscope/data/AdbDeviceSource.kt@@ -85,8 +85,8 @@ class AdbDeviceSource(context: Context) : DeviceSource {@Volatile private var paused = falseprivate val hits = ConcurrentHashMap<String, ScanHit>()private val store = DeviceStore(File(appContext.filesDir, "devices.tsv"))- /** Launchers whose accessibility service a switch may turn on: only those `launchers.json` names. */- private val serviceLaunchers by lazy { BundledLists.launchers.filter { it.accessibility }.map { it.pkg }.toSet() }+ /** Launchers whose accessibility service a switch may turn on: only the built-in ones. */+ private val serviceLaunchers = ACCESSIBILITY_LAUNCHERS.keysprivate val saved = ConcurrentHashMap<String, SavedDevice>()/** Remembered TVs that haven't answered since launch: shown offline, not "connecting". */private val restoring = ConcurrentHashMap.newKeySet<String>()@@ -116,6 +116,7 @@ class AdbDeviceSource(context: Context) : DeviceSource {init {Connector.init(File(appContext.filesDir, "adbkey.pem"))+ scope.launch(Dispatchers.IO) { SharedLists.load(lists) }}/** Remembered TVs reconnect in the background from launch; [known] waits for the file read. */@@ -360,6 +361,8 @@ class AdbDeviceSource(context: Context) : DeviceSource {override fun pause(paused: Boolean) {this.paused = pausedlinks.values.forEach { it.gate.paused.value = paused }+ // Back in front: lists that couldn't be downloaded at launch get another go.+ if (!paused) scope.launch(Dispatchers.IO) { SharedLists.refresh() }}/**@@ -420,7 +423,7 @@ class AdbDeviceSource(context: Context) : DeviceSource {icon = name.icon,removable = p.name in userInstalled,home = p.name == homeOptions?.takeIf { it.default }?.current,- listedLauncher = BundledLists.launchers.any { it.pkg == p.name },+ listedLauncher = SharedLists.launchers.any { it.pkg == p.name },homeInstead = homeOptions?.takeIf { p.name in it.others }?.current,homeFirst = homeOptions?.takeIf { it.current == null && p.name in it.others } != null,answersHome = homeOptions?.let { p.name == it.current || p.name in it.others } == true,@@ -627,8 +630,8 @@ class AdbDeviceSource(context: Context) : DeviceSource {override suspend fun history(deviceId: String): List<HistoryEntry> = book.entries(key(deviceId))override suspend fun openStore(deviceId: String, packageName: String): Boolean {- // Only a launcher the bundled list names: the Store link is the one thing this opens.- if (BundledLists.launchers.none { it.pkg == packageName }) return false+ // Only a launcher the list names: the Store link is the one thing this opens.+ if (SharedLists.launchers.none { it.pkg == packageName }) return falsereturn Actions(session(deviceId)).openStore(packageName)}@@ -826,7 +829,10 @@ class AdbDeviceSource(context: Context) : DeviceSource {override suspend fun setListSource(url: String?) {when (lists.setSource(url)) {- SourceResult.Ok -> keep.clear() // the old source's keep entries+ SourceResult.Ok -> {+ keep.clear() // the old source's keep entries+ scope.launch(Dispatchers.IO) { SharedLists.load(lists, fresh = true) }+ }SourceResult.NotHttps -> throw IllegalStateException("the address has to start with https://")SourceResult.Unreachable -> throw IllegalStateException("couldn't reach that address. Check it and the phone's internet")SourceResult.NotAList -> throw IllegalStateException(NOT_A_LIST)diff --git a/app/src/main/java/app/tellyscope/data/AppNames.kt b/app/src/main/java/app/tellyscope/data/AppNames.ktindex 3b894c4..fa9f122 100644--- a/app/src/main/java/app/tellyscope/data/AppNames.kt+++ b/app/src/main/java/app/tellyscope/data/AppNames.kt@@ -20,7 +20,7 @@ class AppName(val label: String, val icon: ByteArray?, val tileColor: Long? = nu/*** Real app names and icons per TV. The TV's own labels come from `describe` (the label helper) and* are cached in [dir], one file per TV, so the helper only runs again for new or updated apps. When- * the helper can't run, the bundled `labels.json` ([BundledLists.labels]) and then a humanised+ * the helper can't run, `labels.json` ([SharedLists.labels]) and then a humanised* package id stand in, with no icon, and that TV isn't asked again until the app restarts. Each* TV's file is read once per launch, off the main thread, and kept: every list after that gets the* same icon arrays, so the screen doesn't decode them again.@@ -78,10 +78,10 @@ class AppNames(private val dir: File) {companion object {/**- * Bundled table first, then a humanised id that keeps the maker: `com.xgimi.assistant` →+ * `labels.json` first, then a humanised id that keeps the maker: `com.xgimi.assistant` →* "XGIMI Assistant", `com.google.android.youtube.tv` → "Youtube".*/- fun fallback(pkg: String): String = BundledLists.labels[pkg] ?: humanise(pkg)+ fun fallback(pkg: String): String = SharedLists.labels[pkg] ?: humanise(pkg)/** What native daemons and system uids are listed as, in place of an app name. */const val SYSTEM = "Android system"diff --git a/app/src/main/java/app/tellyscope/data/DeviceLists.kt b/app/src/main/java/app/tellyscope/data/DeviceLists.ktindex 5a4045c..19d4257 100644--- a/app/src/main/java/app/tellyscope/data/DeviceLists.kt+++ b/app/src/main/java/app/tellyscope/data/DeviceLists.kt@@ -14,7 +14,10 @@ import java.net.HttpURLConnectionimport java.net.URLimport java.security.MessageDigest-/** Where the per-TV debloat lists live: the tellyscope-devices repo, built from cleanyourtv. */+/**+ * Where the per-TV debloat lists live, with the launcher, app name and streaming lists and the+ * Remote's logos: the tellyscope-devices repo.+ */const val LISTS_BASE = "https://raw.githubusercontent.com/man15h/tellyscope-devices/main/"/** One row of `index.json`. [match] is null for lists nobody has matched to a TV yet. */@@ -95,7 +98,16 @@ fun merge(maker: String, lists: List<DeviceList>): DeviceList = DeviceList(},)-data class ListIndex(val commit: String?, val devices: List<ListEntry>)+/** A file the index names outside `devices/`, checked against [sha256] like a device file. */+data class ListFile(val file: String, val sha256: String)++/** [lists] by name (`launchers`, `labels`, `streaming`) and [logos] by logo name; empty on an index from before they moved here. */+data class ListIndex(+ val commit: String?,+ val devices: List<ListEntry>,+ val lists: Map<String, ListFile> = emptyMap(),+ val logos: Map<String, ListFile> = emptyMap(),+)data class ListPackage(val pkg: String, val note: String?, val optional: Boolean)@@ -141,6 +153,8 @@ sealed interface Suggestions {/** Same rule tellyscope-devices checks; a name goes into a `pm` shell line. */internal val PACKAGE = Regex("[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)+")private val FILE = Regex("devices/[A-Za-z0-9][A-Za-z0-9._-]*\\.json")+private val LIST_FILE = Regex("lists/[a-z]+\\.json")+private val LOGO_FILE = Regex("logos/[a-z0-9]+\\.png")private val SHA256 = Regex("[0-9a-f]{64}")private const val SCHEMA = 1@@ -154,7 +168,10 @@ fun matches(rule: Map<String, List<String>>?, props: Map<String, String?>): Boolvalues.any { it.equals(actual, ignoreCase = true) }}-/** Null unless it is a schema 1 index. Entries with a missing field, bad file name or checksum are dropped. */+/**+ * Null unless it is a schema 1 index. Entries with a missing field, bad file name or checksum are+ * dropped, in `devices`, `lists` and `logos` alike.+ */fun parseIndex(text: String): ListIndex? = try {val o = jsonObject(text)if (o.optInt("schema") != SCHEMA) null else ListIndex(@@ -171,11 +188,23 @@ fun parseIndex(text: String): ListIndex? = try {sha256 = d.getString("sha256"),).takeIf { FILE.matches(it.file) && SHA256.matches(it.sha256) }},+ lists = o.files("lists", LIST_FILE),+ logos = o.files("logos", LOGO_FILE),)} catch (_: org.json.JSONException) {null}+/** The `{name: {file, sha256}}` map under [key], without entries whose file isn't [pattern] or whose checksum can't be one. */+private fun JSONObject.files(key: String, pattern: Regex): Map<String, ListFile> {+ val o = optJSONObject(key) ?: return emptyMap()+ return o.keys().asSequence().mapNotNull { k ->+ val f = o.optJSONObject(k) ?: return@mapNotNull null+ val file = ListFile(f.optString("file"), f.optString("sha256"))+ (k to file).takeIf { pattern.matches(file.file) && SHA256.matches(file.sha256) }+ }.toMap()+}+/*** Null unless it is a schema 1 device file for [id]. Entries that can't be read and names that* aren't package names are dropped.@@ -218,8 +247,8 @@ fun suggest(list: DeviceList, apps: List<AppInfo>, sdk: Int?): List<SuggestedGro}/**- * Fetches and caches the index and device files under [dir]. A failed fetch falls back to the- * cache; a device file is only used (and cached) when its sha256 matches the index. Hand picks+ * Fetches and caches the index, device files, lists and logos under [dir]. A failed fetch falls+ * back to the cache; a file is only used (and cached) when its sha256 matches the index. Hand picks* are remembered per [historyKey].*/class DeviceLists(@@ -254,6 +283,8 @@ class DeviceLists(withContext(Dispatchers.IO) {File(dir, "index.json").delete()File(dir, "devices").deleteRecursively()+ File(dir, "lists").deleteRecursively()+ File(dir, "logos").deleteRecursively()dir.mkdirs()if (text != null) File(dir, "index.json").writeText(text)synchronized(this@DeviceLists) {@@ -279,12 +310,41 @@ class DeviceLists(}/** The device file for [entry], from cache or the network. Null when the bytes don't match its sha256. */- suspend fun list(entry: ListEntry): DeviceList? = withContext(Dispatchers.IO) {- val cache = File(dir, entry.file) // lists/devices/<id>.json, apart from index.json- val bytes = cache.takeIf { it.exists() }?.readBytes()?.takeIf { sha256(it) == entry.sha256 }- ?: attempt { fetch(base + entry.file) }?.takeIf { sha256(it) == entry.sha256 }+ suspend fun list(entry: ListEntry): DeviceList? =+ file(entry.file, entry.sha256)?.let { parseList(it.decodeToString(), entry.id) }++ /**+ * The launcher, app name and streaming lists the index names, each from cache or the network.+ * One that can't be had is null in [SharedFiles], so the caller keeps what it has.+ */+ suspend fun shared(): SharedFiles {+ val lists = index()?.lists.orEmpty()+ suspend fun get(name: String) = lists[name]?.let { file(it.file, it.sha256) }?.decodeToString()+ return SharedFiles(get("launchers"), get("labels"), get("streaming"))+ }++ /** The lists as last cached, without the network, for the moment before [shared] answers. */+ suspend fun cachedShared(): SharedFiles = withContext(Dispatchers.IO) {+ fun read(name: String) = File(dir, "lists/$name.json").takeIf { it.exists() }?.readText()+ SharedFiles(read("launchers"), read("labels"), read("streaming"))+ }++ /**+ * A logo's PNG by the name `streaming.json` gives it; null when the index has none or it can't be+ * had. Uses the index already read, never fetching it: offline, every button on screen asking at+ * once would queue one network timeout each behind [lock].+ */+ suspend fun logo(name: String): ByteArray? {+ val known = index ?: withContext(Dispatchers.IO) { File(dir, "index.json").takeIf { it.exists() }?.readText()?.let(::parseIndex) }+ return known?.logos?.get(name)?.let { file(it.file, it.sha256) }+ }++ /** [path] under [dir] when its bytes match [sha], else fetched from [base] and cached if they do. */+ private suspend fun file(path: String, sha: String): ByteArray? = withContext(Dispatchers.IO) {+ val cache = File(dir, path) // lists/devices/<id>.json and the like, apart from index.json+ cache.takeIf { it.exists() }?.readBytes()?.takeIf { sha256(it) == sha }+ ?: attempt { fetch(base + path) }?.takeIf { sha256(it) == sha }?.also { cache.parentFile?.mkdirs(); cache.writeBytes(it) }- bytes?.let { parseList(it.decodeToString(), entry.id) }}/**@@ -324,6 +384,9 @@ class DeviceLists(}}+/** The raw text of each shared list; null for one not available. */+data class SharedFiles(val launchers: String?, val labels: String?, val streaming: String?)+enum class SourceResult { Ok, NotHttps, Unreachable, NotAList }const val NOT_A_LIST = "this source isn't a Tellyscope list"diff --git a/app/src/main/java/app/tellyscope/data/DeviceSource.kt b/app/src/main/java/app/tellyscope/data/DeviceSource.ktindex f5df9bd..c19c215 100644--- a/app/src/main/java/app/tellyscope/data/DeviceSource.kt+++ b/app/src/main/java/app/tellyscope/data/DeviceSource.kt@@ -88,7 +88,7 @@ interface DeviceSource {/** Puts away the TV page's card about [packageName]'s service being off, until the next switch. */suspend fun dismissServiceNote(deviceId: String, packageName: String) {}- /** Opens the Play Store on the TV at [packageName]'s page, a launcher from the bundled list; false when it didn't open. */+ /** Opens the Play Store on the TV at [packageName]'s page, a launcher from `launchers.json`; false when it didn't open. */suspend fun openStore(deviceId: String, packageName: String): Boolean = false/** Whether [packageName] is installed yet, and if not, whether the Store is still on screen. */diff --git a/app/src/main/java/app/tellyscope/data/Launchers.kt b/app/src/main/java/app/tellyscope/data/Launchers.ktindex a4d14d3..0506c94 100644--- a/app/src/main/java/app/tellyscope/data/Launchers.kt+++ b/app/src/main/java/app/tellyscope/data/Launchers.kt@@ -2,36 +2,44 @@package app.tellyscope.data+import kotlinx.coroutines.flow.MutableStateFlow+import kotlinx.coroutines.flow.StateFlow+import kotlinx.coroutines.flow.asStateFlow+import kotlinx.coroutines.flow.updateimport org.json.JSONObject/**- * A third-party launcher Tellyscope knows, from the bundled `lists/launchers.json`. [accessibility]:- * it keeps Home with its own accessibility service, for TVs whose Home button opens their own- * launcher whatever the default is, so Make Home turns that service on, and Undo or a switch away- * from it turns it off. [checked] is the version whose manifest was read. [about] is the line Install- * a home screen shows; a launcher without one isn't offered there.+ * Launchers that keep Home with their own accessibility service, for TVs whose Home button opens+ * their own launcher whatever the default is, so Make Home turns that service on, and Undo or a+ * switch away from it turns it off. Each with the version whose manifest was read. Built in, never+ * fetched: an accessibility service can read the screen, so only a list reviewed here may turn one on.+ */+val ACCESSIBILITY_LAUNCHERS = mapOf(+ "com.spocky.projengmenu" to "4.72",+ "com.overdevs.at4k" to "1.2",+ "com.spauldhaliwal.dispatch" to "1.0.175",+)++/**+ * A third-party launcher Tellyscope knows, from `launchers.json`. [accessibility] is whether it is+ * one of [ACCESSIBILITY_LAUNCHERS], never what the list says. [about] is the line Install a home+ * screen shows; a launcher without one isn't offered there.*/data class KnownLauncher(val pkg: String,val name: String,- val accessibility: Boolean,- val checked: String?,val about: String? = null,-)+) {+ val accessibility get() = pkg in ACCESSIBILITY_LAUNCHERS+}-/**- * Bundled with the app, never fetched: an accessibility service can read the screen, so only a- * list that went through review may turn one on. Empty unless it is schema 1; entries that can't- * be read or aren't package names are dropped.- */+/** Empty unless it is schema 1; entries that can't be read or aren't package names are dropped. */fun parseLaunchers(text: String): List<KnownLauncher> = try {val o = JSONObject(text)if (o.optInt("schema") != 1) emptyList() else o.getJSONArray("launchers").objectsOrSkip { l ->KnownLauncher(pkg = l.getString("package"),name = l.getString("name"),- accessibility = l.optBoolean("accessibility"),- checked = l.optStringOrNull("checked"),about = l.optStringOrNull("about"),).takeIf { PACKAGE.matches(it.pkg) }}@@ -40,7 +48,7 @@ fun parseLaunchers(text: String): List<KnownLauncher> = try {}/**- * Package to display name, from the bundled `lists/labels.json`; its groups are only there for+ * Package to display name, from `labels.json`; its groups are only there for* people reading the file. Empty unless it is schema 1; names under something that isn't a package* are dropped.*/@@ -58,21 +66,59 @@ fun parseLabels(text: String): Map<String, String> = try {emptyMap()}+/** The launcher, app name and streaming lists, as [SharedLists] holds them. */+data class Shared(+ val launchers: List<KnownLauncher> = emptyList(),+ val labels: Map<String, String> = emptyMap(),+ val streaming: List<StreamingService> = emptyList(),+)+/**- * The lists that ship with the app, from `app/src/main/resources/lists/`. Contributors change them- * by pull request, and a change reaches people with the next release. Java resources rather than- * assets, so they load without a Context, in the app and in tests alike.+ * The lists anyone can change without an app release, from the list source next to the debloat+ * lists ([DeviceLists]): the last cached copy at launch, then the source's. A list the source+ * can't give keeps what was there. The app bundles none, so before the first fetch they are empty;+ * a build with `lists/` among its Java resources (the tests) starts from those instead.*/-object BundledLists {- val launchers: List<KnownLauncher> by lazy { parseLaunchers(read("launchers.json")) }- val labels: Map<String, String> by lazy { parseLabels(read("labels.json")) }- val streaming: List<StreamingService> by lazy { parseStreaming(read("streaming.json")) }+object SharedLists {+ private val _state = MutableStateFlow(seed())+ val state: StateFlow<Shared> = _state.asStateFlow()+ val launchers get() = _state.value.launchers+ val labels get() = _state.value.labels+ val streaming get() = _state.value.streaming++ @Volatile private var source: DeviceLists? = null++ /** The cached lists from [lists], then the source's; [fresh] drops the old ones first, for a new source. */+ suspend fun load(lists: DeviceLists, fresh: Boolean = false) {+ source = lists+ if (fresh) _state.value = seed() else apply(lists.cachedShared())+ apply(lists.shared())+ }++ /** The source's lists again; one already downloaded is read from the cache, so this is cheap once online. */+ suspend fun refresh() {+ source?.let { apply(it.shared()) }+ }++ /** A logo's PNG, at four times its size in dp; null until it can be had. */+ suspend fun logo(name: String): ByteArray? = source?.logo(name) ?: resource("/lists/logos/$name.png")++ private fun apply(f: SharedFiles) {+ _state.update { now ->+ Shared(+ launchers = f.launchers?.let(::parseLaunchers)?.ifEmpty { null } ?: now.launchers,+ labels = f.labels?.let(::parseLabels)?.ifEmpty { null } ?: now.labels,+ streaming = f.streaming?.let(::parseStreaming)?.ifEmpty { null } ?: now.streaming,+ )+ }+ }- /** A service's logo, a PNG at four times its size in dp; null if it isn't bundled. */- fun logo(name: String): ByteArray? =- BundledLists::class.java.getResourceAsStream("/lists/logos/$name.png")?.use { it.readBytes() }+ private fun seed() = Shared(+ launchers = resource("/lists/launchers.json")?.let { parseLaunchers(it.decodeToString()) }.orEmpty(),+ labels = resource("/lists/labels.json")?.let { parseLabels(it.decodeToString()) }.orEmpty(),+ streaming = resource("/lists/streaming.json")?.let { parseStreaming(it.decodeToString()) }.orEmpty(),+ )- private fun read(name: String): String =- checkNotNull(BundledLists::class.java.getResourceAsStream("/lists/$name")) { "lists/$name isn't bundled" }- .bufferedReader().use { it.readText() }+ private fun resource(path: String): ByteArray? =+ SharedLists::class.java.getResourceAsStream(path)?.use { it.readBytes() }}diff --git a/app/src/main/java/app/tellyscope/data/Model.kt b/app/src/main/java/app/tellyscope/data/Model.ktindex b5e0143..0a1f8e2 100644--- a/app/src/main/java/app/tellyscope/data/Model.kt+++ b/app/src/main/java/app/tellyscope/data/Model.kt@@ -126,7 +126,7 @@ data class AppInfo(val removable: Boolean = false,/** The launcher Home opens now. */val home: Boolean = false,- /** On the bundled `launchers.json`: a launcher people add, never a TV's own. */+ /** On `launchers.json`: a launcher people add, never a TV's own. */val listedLauncher: Boolean = false,/** Another launcher that can replace the current home screen, [homeInstead]: Make Home is offered. */val homeInstead: String? = null,diff --git a/app/src/main/java/app/tellyscope/data/Streaming.kt b/app/src/main/java/app/tellyscope/data/Streaming.ktindex 684b4d4..c906e06 100644--- a/app/src/main/java/app/tellyscope/data/Streaming.kt+++ b/app/src/main/java/app/tellyscope/data/Streaming.kt@@ -5,10 +5,10 @@ package app.tellyscope.dataimport org.json.JSONObject/**- * A streaming service the Remote can have a button for, from the bundled `lists/streaming.json`.+ * A streaming service the Remote can have a button for, from `streaming.json`.* [packages] are its TV apps, the usual one first; a button opens the first one the TV has.* [color] is the pill's brand colour in both themes, a gradient towards [color2] when there is one.- * [logo] names `lists/logos/<logo>.png`. [dark] fills the pill instead in dark mode, for a brand+ * [logo] names `logos/<logo>.png` ([SharedLists.logo]). [dark] fills the pill instead in dark mode, for a brand* colour that would sink into the sheet; the logo turns white or black on it.*/data class StreamingService(diff --git a/app/src/main/java/app/tellyscope/ui/Copy.kt b/app/src/main/java/app/tellyscope/ui/Copy.ktindex 15e78ff..7e9400f 100644--- a/app/src/main/java/app/tellyscope/ui/Copy.kt+++ b/app/src/main/java/app/tellyscope/ui/Copy.kt@@ -174,6 +174,7 @@ object Copy {const val CHOOSE_ONE = "Choose one"const val CHOOSE_HOME = "Choose a home screen"const val CHOOSE_HOME_TEXT = "Each one replaces the TV's home screen. Tellyscope opens it in the Play Store on the TV; you install it with the remote."+ const val NO_LAUNCHER_LIST = "Couldn't load the list of home screens. Check the phone's internet and try again."const val RECOMMENDED = "Recommended"/** The picker's section for launchers on the TV that Recommended doesn't list. */const val ON_THIS_TV = "On this TV"diff --git a/app/src/main/java/app/tellyscope/ui/Recommended.kt b/app/src/main/java/app/tellyscope/ui/Recommended.ktindex 4f0cac2..4fbb3e0 100644--- a/app/src/main/java/app/tellyscope/ui/Recommended.kt+++ b/app/src/main/java/app/tellyscope/ui/Recommended.kt@@ -3,17 +3,16 @@package app.tellyscope.uiimport app.tellyscope.data.AppNames-import app.tellyscope.data.BundledLists+import app.tellyscope.data.SharedLists/**- * A launcher Install a home screen offers, from the bundled `launchers.json`: its name and a line+ * A launcher Install a home screen offers, from `launchers.json`: its name and a line* on what it's like.*/data class Recommended(val pkg: String, val name: String, val about: String, val accessibility: Boolean)/** In the picker's order: the launchers on `launchers.json` that have an `about` line, in file order. */-val RECOMMENDED: List<Recommended> by lazy {- BundledLists.launchers.mapNotNull { l -> l.about?.let { Recommended(l.pkg, l.name, it, l.accessibility) } }-}+val RECOMMENDED: List<Recommended> get() =+ SharedLists.launchers.mapNotNull { l -> l.about?.let { Recommended(l.pkg, l.name, it, l.accessibility) } }fun launcherName(pkg: String) = RECOMMENDED.firstOrNull { it.pkg == pkg }?.name ?: AppNames.fallback(pkg)diff --git a/app/src/main/java/app/tellyscope/ui/RemoteScreen.kt b/app/src/main/java/app/tellyscope/ui/RemoteScreen.ktindex d0d8689..e6cc50d 100644--- a/app/src/main/java/app/tellyscope/ui/RemoteScreen.kt+++ b/app/src/main/java/app/tellyscope/ui/RemoteScreen.kt@@ -72,10 +72,12 @@ import androidx.compose.material3.toShapeimport androidx.compose.runtime.Composableimport androidx.compose.runtime.CompositionLocalProviderimport androidx.compose.runtime.LaunchedEffect+import androidx.compose.runtime.collectAsStateimport androidx.compose.runtime.getValueimport androidx.compose.runtime.keyimport androidx.compose.runtime.mutableFloatStateOfimport androidx.compose.runtime.mutableStateOf+import androidx.compose.runtime.produceStateimport androidx.compose.runtime.rememberimport androidx.compose.runtime.rememberCoroutineScopeimport androidx.compose.runtime.saveable.rememberSaveable@@ -130,12 +132,13 @@ import androidx.compose.material3.Checkboximport androidx.compose.material3.HorizontalDividerimport androidx.compose.ui.graphics.Brushimport androidx.compose.ui.graphics.ColorFilter+import androidx.compose.ui.graphics.ImageBitmapimport androidx.compose.ui.graphics.asImageBitmapimport androidx.compose.ui.graphics.luminanceimport androidx.compose.ui.graphics.toArgbimport androidx.compose.ui.platform.LocalDensityimport android.graphics.BitmapFactory-import app.tellyscope.data.BundledLists+import app.tellyscope.data.SharedListsimport app.tellyscope.data.RemoteButtonsimport app.tellyscope.data.StreamingServiceimport app.tellyscope.adb.RemoteKey@@ -339,7 +342,7 @@ fun RemoteScreen(if (!typing) {Spacer(Modifier.height(if (tight) 8.dp else 16.dp))CompositionLocalProvider(LocalKeyHaptics provides state.keyHaptics) {- ButtonsRow(RemoteButtons.shown(state.device.dock, BundledLists.streaming, cap), state.device.apps, live, actions, onEdit = { editing = true })+ ButtonsRow(RemoteButtons.shown(state.device.dock, SharedLists.state.collectAsState().value.streaming, cap), state.device.apps, live, actions, onEdit = { editing = true })}}}@@ -759,7 +762,10 @@ private fun ServicePill(s: StreamingService, modifier: Modifier = Modifier) {val c = MaterialTheme.colorSchemeval dark = c.surface.luminance() < 0.5fval look = RemoteButtons.look(s, c.surfaceContainerLow.toArgb().toLong() and 0xFFFFFFFF, dark)- val logo = remember(s.logo) { BundledLists.logo(s.logo)?.let { BitmapFactory.decodeByteArray(it, 0, it.size) }?.asImageBitmap() }+ // The name stands in until the logo is downloaded, or for good when it can't be.+ val logo = produceState<ImageBitmap?>(null, s.logo) {+ value = SharedLists.logo(s.logo)?.let { BitmapFactory.decodeByteArray(it, 0, it.size) }?.asImageBitmap()+ }.valueval fill = look.fill2?.let { Brush.linearGradient(listOf(Color(look.fill), Color(it))) } ?: SolidColor(Color(look.fill))Box(modifier@@ -788,7 +794,7 @@ private fun ServicePill(s: StreamingService, modifier: Modifier = Modifier) {@OptIn(ExperimentalMaterial3Api::class)@Composableprivate fun ButtonsSheet(dock: List<Docked>, apps: List<AppInfo>, cap: Int, setDock: (List<Docked>) -> Unit, onDismiss: () -> Unit) {- val services = BundledLists.streaming+ val services = SharedLists.state.collectAsState().value.streamingval ticked = dock.mapNotNull { RemoteButtons.serviceOf(it, services) }.distinct()val rest = RemoteButtons.choices(services, apps) - ticked.toSet()val toggle = { s: StreamingService -> setDock(RemoteButtons.toggle(dock, s, services, cap, apps)) }diff --git a/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt b/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.ktindex a92c3fa..88ffd3e 100644--- a/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt+++ b/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt@@ -789,9 +789,13 @@ class TellyscopeViewModel(}}- /** Opens Install a home screen on its picker. */+ /** Opens Install a home screen on its picker; not before the launcher list has been downloaded once. */fun openLauncherFlow() {val id = _state.value.selectedId ?: return+ if (RECOMMENDED.isEmpty()) {+ _notice.value = Copy.NO_LAUNCHER_LIST+ return+ }updateDevice(id) { it.copy(launcher = LauncherFlow()) }}diff --git a/app/src/test/java/app/tellyscope/DeviceListsTest.kt b/app/src/test/java/app/tellyscope/DeviceListsTest.ktindex 1e94f87..94e52d3 100644--- a/app/src/test/java/app/tellyscope/DeviceListsTest.kt+++ b/app/src/test/java/app/tellyscope/DeviceListsTest.kt@@ -261,6 +261,40 @@ class DeviceListsTest {assertEquals(2, depth("""{"a":["[[[{{{\"]"]}"""))}+ private val launchers = """{"schema": 1, "launchers": [{"package": "com.good.launcher", "name": "Good"}]}""".toByteArray()+ private val logo = byteArrayOf(0x89.toByte(), 'P'.code.toByte(), 'N'.code.toByte(), 'G'.code.toByte())++ /** An index with only lists and logos; [bad] adds entries whose file is outside lists/ or logos/. */+ private fun sharedIndex(launchersSha: String = sha256(launchers), bad: Boolean = false) = """+ {"schema": 1, "devices": [],+ "lists": {"launchers": {"file": "lists/launchers.json", "sha256": "$launchersSha"}${if (bad) """, "labels": {"file": "../labels.json", "sha256": "${"0".repeat(64)}"}""" else ""}},+ "logos": {"netflix": {"file": "logos/netflix.png", "sha256": "${sha256(logo)}"}${if (bad) """, "x": {"file": "logos/x.svg", "sha256": "${"0".repeat(64)}"}""" else ""}}}+ """.trimIndent().toByteArray()++ @Test fun theIndexNamesListsAndLogosOnlyInsideTheirFolders() {+ val index = parseIndex(sharedIndex(bad = true).decodeToString())!!+ assertEquals(setOf("launchers"), index.lists.keys)+ assertEquals(setOf("netflix"), index.logos.keys)+ // An index from before they moved here still reads.+ assertTrue(parseIndex(index().decodeToString())!!.lists.isEmpty())+ }++ @Test fun listsAndLogosAreCheckedCachedAndReadOffline() = runTest {+ val lists = DeviceLists(tmp.root, served("index.json" to sharedIndex(), "lists/launchers.json" to launchers, "logos/netflix.png" to logo))+ assertEquals(launchers.decodeToString(), lists.shared().launchers)+ assertNull(lists.shared().streaming) // the index names none+ assertTrue(logo.contentEquals(lists.logo("netflix")))+ assertNull(lists.logo("hulu"))++ val offline = DeviceLists(tmp.root) { throw IOException("offline") }+ assertEquals(launchers.decodeToString(), offline.cachedShared().launchers)+ assertEquals(launchers.decodeToString(), offline.shared().launchers)+ assertTrue(logo.contentEquals(offline.logo("netflix")))++ val wrong = DeviceLists(tmp.newFolder(), served("index.json" to sharedIndex(launchersSha = "f".repeat(64)), "lists/launchers.json" to launchers))+ assertNull(wrong.shared().launchers)+ }+private val fork = "https://raw.githubusercontent.com/someone/my-lists/main/"@Test fun aForkThatServesSchemaOneBecomesTheSourceAndDropsTheOldCache() = runTest {@@ -273,10 +307,13 @@ class DeviceListsTest {val lists = DeviceLists(tmp.root, fetch)assertNotNull(lists.list(lists.index()!!.devices.first()))assertTrue(tmp.root.resolve("devices/acme-55.json").exists())+ tmp.root.resolve("logos").mkdirs()+ tmp.root.resolve("logos/netflix.png").writeBytes(logo)assertEquals(SourceResult.Ok, lists.setSource(fork.removeSuffix("/") + "/index.json"))assertEquals(fork, lists.custom())assertFalse(tmp.root.resolve("devices").exists())+ assertFalse(tmp.root.resolve("logos").exists())// Survives a restart, and every later fetch goes to the fork.val again = DeviceLists(tmp.root, fetch)assertEquals(fork, again.base)diff --git a/app/src/test/java/app/tellyscope/LaunchersTest.kt b/app/src/test/java/app/tellyscope/LaunchersTest.ktindex b43011c..69ac135 100644--- a/app/src/test/java/app/tellyscope/LaunchersTest.kt+++ b/app/src/test/java/app/tellyscope/LaunchersTest.kt@@ -2,8 +2,9 @@package app.tellyscope-import app.tellyscope.data.BundledLists+import app.tellyscope.data.ACCESSIBILITY_LAUNCHERSimport app.tellyscope.data.KnownLauncher+import app.tellyscope.data.SharedListsimport app.tellyscope.data.parseLabelsimport app.tellyscope.data.parseLaunchersimport app.tellyscope.ui.RECOMMENDED@@ -19,30 +20,31 @@ import java.io.File@RunWith(RobolectricTestRunner::class)@Config(sdk = [35])class LaunchersTest {- @Test fun theBundledListReadsWhole() {- val text = File("src/main/resources/lists/launchers.json").readText()+ @Test fun theListReadsWhole() {+ val text = File("src/test/resources/lists/launchers.json").readText()val launchers = parseLaunchers(text)assertEquals(Regex("\"package\"").findAll(text).count(), launchers.size) // nothing droppedassertEquals(launchers.size, launchers.map { it.pkg }.toSet().size)- assertEquals(- setOf("com.spocky.projengmenu", "com.overdevs.at4k", "com.spauldhaliwal.dispatch"),- launchers.filter { it.accessibility }.map { it.pkg }.toSet(),- )+ }++ /** Named here on purpose, so a reviewer sees any launcher that gets to turn on an accessibility service. */+ @Test fun onlyTheBuiltInLaunchersMayTurnOnAnAccessibilityService() {+ assertEquals(setOf("com.spocky.projengmenu", "com.overdevs.at4k", "com.spauldhaliwal.dispatch"), ACCESSIBILITY_LAUNCHERS.keys)}@Test fun theRecommendedOnesAreTheLaunchersWithAnAboutLineInFileOrder() {- assertEquals(BundledLists.launchers.filter { it.about != null }.map { it.pkg }, RECOMMENDED.map { it.pkg })+ assertEquals(SharedLists.launchers.filter { it.about != null }.map { it.pkg }, RECOMMENDED.map { it.pkg })assertTrue(RECOMMENDED.isNotEmpty()) // the picker opens on the first one}- @Test fun theBundledLabelsReadWhole() {- val text = File("src/main/resources/lists/labels.json").readText()+ @Test fun theLabelsReadWhole() {+ val text = File("src/test/resources/lists/labels.json").readText()val labels = parseLabels(text)// Every "key": "text" pair but the group names is a label: none dropped, none listed twice.val pairs = Regex("\"[^\"]+\"\\s*:\\s*\"").findAll(text).count()assertEquals(pairs - Regex("\"name\"\\s*:").findAll(text).count(), labels.size)assertEquals("Android System", labels["android"])- assertEquals("Netflix", BundledLists.labels["com.netflix.ninja"])+ assertEquals("Netflix", SharedLists.labels["com.netflix.ninja"])}@Test fun badLabelsAreDroppedAndOnlySchemaOneCounts() {@@ -56,6 +58,7 @@ class LaunchersTest {assertTrue(parseLabels("{").isEmpty())}+ /** A list from someone's fork can't grant an accessibility service: only [ACCESSIBILITY_LAUNCHERS] can. */@Test fun badEntriesAreDroppedAndOnlySchemaOneCounts() {val text = """{"schema":1,"launchers":[{"package":"com.good.launcher","name":"Good","accessibility":true},@@ -63,7 +66,8 @@ class LaunchersTest {{"name":"No package"},"not an object"]}"""- assertEquals(listOf(KnownLauncher("com.good.launcher", "Good", true, null)), parseLaunchers(text))+ assertEquals(listOf(KnownLauncher("com.good.launcher", "Good")), parseLaunchers(text))+ assertTrue(parseLaunchers(text).none { it.accessibility })assertTrue(parseLaunchers(text.replace("\"schema\":1", "\"schema\":2")).isEmpty())assertTrue(parseLaunchers("{").isEmpty())}diff --git a/app/src/test/java/app/tellyscope/StreamingTest.kt b/app/src/test/java/app/tellyscope/StreamingTest.ktindex 9299a14..7a5b902 100644--- a/app/src/test/java/app/tellyscope/StreamingTest.kt+++ b/app/src/test/java/app/tellyscope/StreamingTest.kt@@ -3,11 +3,12 @@package app.tellyscopeimport app.tellyscope.data.AppInfo-import app.tellyscope.data.BundledListsimport app.tellyscope.data.Dockedimport app.tellyscope.data.RemoteButtons+import app.tellyscope.data.SharedListsimport app.tellyscope.data.StreamingServiceimport app.tellyscope.data.parseStreaming+import kotlinx.coroutines.runBlockingimport org.junit.Assert.assertEqualsimport org.junit.Assert.assertFalseimport org.junit.Assert.assertNull@@ -23,17 +24,17 @@ import javax.imageio.ImageIO@RunWith(RobolectricTestRunner::class)@Config(sdk = [35])class StreamingTest {- private val services = BundledLists.streaming+ private val services = SharedLists.streaming- @Test fun theBundledListReadsWholeAndEveryLogoIsThere() {- val text = File("src/main/resources/lists/streaming.json").readText()+ @Test fun theListReadsWholeAndEveryLogoIsThere() {+ val text = File("src/test/resources/lists/streaming.json").readText()val parsed = parseStreaming(text)assertEquals(Regex("\"packages\"").findAll(text).count(), parsed.size) // nothing droppedassertEquals(parsed.size, parsed.map { it.name }.toSet().size)val pkgs = parsed.flatMap { it.packages }assertEquals(pkgs.size, pkgs.toSet().size) // no package belongs to two servicesparsed.forEach { s ->- val png = ImageIO.read(checkNotNull(BundledLists.logo(s.logo)) { "lists/logos/${s.logo}.png is missing" }.inputStream())+ val png = ImageIO.read(checkNotNull(runBlocking { SharedLists.logo(s.logo) }) { "lists/logos/${s.logo}.png is missing" }.inputStream())// Four times the size in dp, and it has to fit the smallest pill, 80 x 40 dp.assertTrue("${s.logo} is ${png.width}x${png.height}", png.width <= 72 * 4 && png.height <= 30 * 4)}diff --git a/app/src/main/resources/lists/labels.json b/app/src/test/resources/lists/labels.jsonsimilarity index 100%rename from app/src/main/resources/lists/labels.jsonrename to app/src/test/resources/lists/labels.jsondiff --git a/app/src/main/resources/lists/launchers.json b/app/src/test/resources/lists/launchers.jsonsimilarity index 50%rename from app/src/main/resources/lists/launchers.jsonrename to app/src/test/resources/lists/launchers.jsonindex 7dccd22..3f73905 100644--- a/app/src/main/resources/lists/launchers.json+++ b/app/src/test/resources/lists/launchers.json@@ -1,13 +1,13 @@{"schema": 1,"launchers": [- { "package": "com.spocky.projengmenu", "name": "Projectivy Launcher", "about": "The most popular. Rows, wallpapers and icons you can change.", "accessibility": true, "checked": "4.72" },- { "package": "com.overdevs.at4k", "name": "AT4K Launcher", "accessibility": true, "checked": "1.2" },- { "package": "com.spauldhaliwal.dispatch", "name": "Dispatch", "accessibility": true, "checked": "1.0.175" },- { "package": "me.efesser.flauncher", "name": "FLauncher", "about": "Simple: your apps in rows, nothing else.", "accessibility": false, "checked": "0.18.0" },- { "package": "com.wolf.firelauncher", "name": "Wolf Launcher", "accessibility": false, "checked": "0.1.9" },- { "package": "ca.dstudio.atvlauncher.free", "name": "ATV Launcher", "accessibility": false, "checked": "0.0.11" },- { "package": "net.i.akihiro.halauncher", "name": "HALauncher", "accessibility": false, "checked": "2.0.3.0" },- { "package": "eu.chainfire.tv.sideloadlauncher", "name": "Sideload Launcher", "accessibility": false, "checked": "2.0.1" }+ { "package": "com.spocky.projengmenu", "name": "Projectivy Launcher", "about": "The most popular. Rows, wallpapers and icons you can change." },+ { "package": "com.overdevs.at4k", "name": "AT4K Launcher" },+ { "package": "com.spauldhaliwal.dispatch", "name": "Dispatch" },+ { "package": "me.efesser.flauncher", "name": "FLauncher", "about": "Simple: your apps in rows, nothing else." },+ { "package": "com.wolf.firelauncher", "name": "Wolf Launcher" },+ { "package": "ca.dstudio.atvlauncher.free", "name": "ATV Launcher" },+ { "package": "net.i.akihiro.halauncher", "name": "HALauncher" },+ { "package": "eu.chainfire.tv.sideloadlauncher", "name": "Sideload Launcher" }]}diff --git a/app/src/main/resources/lists/logos/appletv.png b/app/src/test/resources/lists/logos/appletv.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/appletv.pngrename to app/src/test/resources/lists/logos/appletv.pngdiff --git a/app/src/main/resources/lists/logos/crunchyroll.png b/app/src/test/resources/lists/logos/crunchyroll.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/crunchyroll.pngrename to app/src/test/resources/lists/logos/crunchyroll.pngdiff --git a/app/src/main/resources/lists/logos/dazn.png b/app/src/test/resources/lists/logos/dazn.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/dazn.pngrename to app/src/test/resources/lists/logos/dazn.pngdiff --git a/app/src/main/resources/lists/logos/disney.png b/app/src/test/resources/lists/logos/disney.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/disney.pngrename to app/src/test/resources/lists/logos/disney.pngdiff --git a/app/src/main/resources/lists/logos/emby.png b/app/src/test/resources/lists/logos/emby.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/emby.pngrename to app/src/test/resources/lists/logos/emby.pngdiff --git a/app/src/main/resources/lists/logos/hbomax.png b/app/src/test/resources/lists/logos/hbomax.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/hbomax.pngrename to app/src/test/resources/lists/logos/hbomax.pngdiff --git a/app/src/main/resources/lists/logos/hulu.png b/app/src/test/resources/lists/logos/hulu.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/hulu.pngrename to app/src/test/resources/lists/logos/hulu.pngdiff --git a/app/src/main/resources/lists/logos/jellyfin.png b/app/src/test/resources/lists/logos/jellyfin.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/jellyfin.pngrename to app/src/test/resources/lists/logos/jellyfin.pngdiff --git a/app/src/main/resources/lists/logos/jiohotstar.png b/app/src/test/resources/lists/logos/jiohotstar.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/jiohotstar.pngrename to app/src/test/resources/lists/logos/jiohotstar.pngdiff --git a/app/src/main/resources/lists/logos/kodi.png b/app/src/test/resources/lists/logos/kodi.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/kodi.pngrename to app/src/test/resources/lists/logos/kodi.pngdiff --git a/app/src/main/resources/lists/logos/netflix.png b/app/src/test/resources/lists/logos/netflix.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/netflix.pngrename to app/src/test/resources/lists/logos/netflix.pngdiff --git a/app/src/main/resources/lists/logos/paramount.png b/app/src/test/resources/lists/logos/paramount.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/paramount.pngrename to app/src/test/resources/lists/logos/paramount.pngdiff --git a/app/src/main/resources/lists/logos/peacock.png b/app/src/test/resources/lists/logos/peacock.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/peacock.pngrename to app/src/test/resources/lists/logos/peacock.pngdiff --git a/app/src/main/resources/lists/logos/plex.png b/app/src/test/resources/lists/logos/plex.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/plex.pngrename to app/src/test/resources/lists/logos/plex.pngdiff --git a/app/src/main/resources/lists/logos/plutotv.png b/app/src/test/resources/lists/logos/plutotv.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/plutotv.pngrename to app/src/test/resources/lists/logos/plutotv.pngdiff --git a/app/src/main/resources/lists/logos/primevideo.png b/app/src/test/resources/lists/logos/primevideo.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/primevideo.pngrename to app/src/test/resources/lists/logos/primevideo.pngdiff --git a/app/src/main/resources/lists/logos/sonyliv.png b/app/src/test/resources/lists/logos/sonyliv.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/sonyliv.pngrename to app/src/test/resources/lists/logos/sonyliv.pngdiff --git a/app/src/main/resources/lists/logos/spotify.png b/app/src/test/resources/lists/logos/spotify.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/spotify.pngrename to app/src/test/resources/lists/logos/spotify.pngdiff --git a/app/src/main/resources/lists/logos/tubi.png b/app/src/test/resources/lists/logos/tubi.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/tubi.pngrename to app/src/test/resources/lists/logos/tubi.pngdiff --git a/app/src/main/resources/lists/logos/twitch.png b/app/src/test/resources/lists/logos/twitch.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/twitch.pngrename to app/src/test/resources/lists/logos/twitch.pngdiff --git a/app/src/main/resources/lists/logos/wholphin.png b/app/src/test/resources/lists/logos/wholphin.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/wholphin.pngrename to app/src/test/resources/lists/logos/wholphin.pngdiff --git a/app/src/main/resources/lists/logos/youtube.png b/app/src/test/resources/lists/logos/youtube.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/youtube.pngrename to app/src/test/resources/lists/logos/youtube.pngdiff --git a/app/src/main/resources/lists/logos/zee5.png b/app/src/test/resources/lists/logos/zee5.pngsimilarity index 100%rename from app/src/main/resources/lists/logos/zee5.pngrename to app/src/test/resources/lists/logos/zee5.pngdiff --git a/app/src/main/resources/lists/streaming.json b/app/src/test/resources/lists/streaming.jsonsimilarity index 100%rename from app/src/main/resources/lists/streaming.jsonrename to app/src/test/resources/lists/streaming.json