Various bug fixes (#2010)
## Description Collecting minor bug fixes in one PR: - If error occurs fetching a series, show the error on the UI instead of loading forever - Use song's artists on Now Playing page - Fixes settings wrap around scrolling when an update is available - Fix backdrop not clearing for items without backdrop - Fix not picking an ABI-specific APK when updating a regular release (maybe related to #1966) - Add "Go To" for album context menus - Fix handling of next/previous media remote button presses during video playback ### Related issues Fixes #1990 Fixes #1965 ### Testing Emulator mostly ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
a38eb3e3d8
commit
b99f21efa8
14 changed files with 453 additions and 27 deletions
|
|
@ -16,12 +16,19 @@ class TestUpdateChecker {
|
|||
lateinit var releaseJson: JsonObject
|
||||
val assetsJson: JsonArray by lazy { releaseJson["assets"]!!.jsonArray }
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
val resource = javaClass.classLoader?.getResource("release_develop.json")
|
||||
lateinit var releaseV108Json: JsonObject
|
||||
val assetsV108Json: JsonArray by lazy { releaseV108Json["assets"]!!.jsonArray }
|
||||
|
||||
private fun read(filename: String): JsonObject {
|
||||
val resource = javaClass.classLoader?.getResource(filename)
|
||||
Assert.assertNotNull(resource)
|
||||
val fileContents = Paths.get(resource!!.toURI()).readText()
|
||||
releaseJson = Json.parseToJsonElement(fileContents).jsonObject
|
||||
return Json.parseToJsonElement(fileContents).jsonObject
|
||||
}
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
releaseJson = read("release_develop.json")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -53,4 +60,30 @@ class TestUpdateChecker {
|
|||
val url = getDownloadUrl(assetsJson, true, listOf("arm64-v8a"))
|
||||
Assert.assertEquals("https://github.com/damontecres/Wholphin/releases/download/develop/Wholphin-debug-arm64-v8a.apk", url)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Test regular release`() {
|
||||
releaseV108Json = read("release_v108.json")
|
||||
getDownloadUrl(assetsV108Json, false, listOf("arm64-v8a")).let { url ->
|
||||
Assert.assertEquals(
|
||||
"https://github.com/damontecres/Wholphin/releases/download/v1.0.8/Wholphin-arm64-v8a.apk",
|
||||
url,
|
||||
)
|
||||
}
|
||||
getDownloadUrl(assetsV108Json, false, listOf("armeabi-v7a")).let { url ->
|
||||
Assert.assertEquals(
|
||||
"https://github.com/damontecres/Wholphin/releases/download/v1.0.8/Wholphin-armeabi-v7a.apk",
|
||||
url,
|
||||
)
|
||||
}
|
||||
getDownloadUrl(assetsV108Json, false, emptyList()).let { url ->
|
||||
Assert.assertEquals(
|
||||
"https://github.com/damontecres/Wholphin/releases/download/v1.0.8/Wholphin.apk",
|
||||
url,
|
||||
)
|
||||
}
|
||||
getDownloadUrl(assetsV108Json, true, listOf("arm64-v8a")).let { url ->
|
||||
Assert.assertNull(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue