diff --git a/README.md b/README.md index 8e1b474..3ebcfbd 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ _🚀This is the client of the multimedia server Abyss, which can also be extend ### High Priority - [x] Fix tablet full-screen mode bug - [x] Hide private key after user input +- [x] Optimize API call logic, do not create crashes - [ ] Replace Android robot icon with custom design - [ ] Configure server baseURL in client settings - [ ] Implement proper access control for directory queries diff --git a/app/src/main/java/com/acitelight/aether/service/MediaManager.kt b/app/src/main/java/com/acitelight/aether/service/MediaManager.kt index e73a426..2178a42 100644 --- a/app/src/main/java/com/acitelight/aether/service/MediaManager.kt +++ b/app/src/main/java/com/acitelight/aether/service/MediaManager.kt @@ -13,22 +13,38 @@ object MediaManager suspend fun listVideoKlasses(): List { - val j = ApiClient.api.getVideoClasses(token) - return j.toList() + try + { + val j = ApiClient.api.getVideoClasses(token) + return j.toList() + }catch(e: Exception) + { + return listOf() + } } suspend fun listVideos(klass: String): List