From e38d77b2f662fd63d12730bdb5647cd81118d9eb Mon Sep 17 00:00:00 2001 From: acite <1498045907@qq.com> Date: Fri, 26 Sep 2025 03:09:14 +0800 Subject: [PATCH] [feat] Video Group --- .../acitelight/aether/model/VideoResponse.kt | 3 +- .../acitelight/aether/service/MediaManager.kt | 21 +- .../com/acitelight/aether/view/VideoPlayer.kt | 103 +++++--- .../com/acitelight/aether/view/VideoScreen.kt | 73 ++++-- .../aether/viewModel/VideoPlayerViewModel.kt | 230 ++++++++++-------- 5 files changed, 244 insertions(+), 186 deletions(-) diff --git a/app/src/main/java/com/acitelight/aether/model/VideoResponse.kt b/app/src/main/java/com/acitelight/aether/model/VideoResponse.kt index fc7bfec..f7e3ac5 100644 --- a/app/src/main/java/com/acitelight/aether/model/VideoResponse.kt +++ b/app/src/main/java/com/acitelight/aether/model/VideoResponse.kt @@ -10,5 +10,6 @@ data class VideoResponse( val comment: List, val star: Boolean, val like: Int, - val author: String + val author: String, + val group: String? ) 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 57b8117..02f9e04 100644 --- a/app/src/main/java/com/acitelight/aether/service/MediaManager.kt +++ b/app/src/main/java/com/acitelight/aether/service/MediaManager.kt @@ -3,7 +3,6 @@ package com.acitelight.aether.service import android.content.Context import com.acitelight.aether.model.BookMark import com.acitelight.aether.model.Comic -import com.acitelight.aether.model.ComicResponse import com.acitelight.aether.model.Video import com.tonyodev.fetch2.Status import dagger.hilt.android.qualifiers.ApplicationContext @@ -27,7 +26,7 @@ class MediaManager @Inject constructor( { val j = ApiClient.api!!.getVideoClasses(token) return j.toList() - }catch(e: Exception) + }catch(_: Exception) { return listOf() } @@ -39,7 +38,7 @@ class MediaManager @Inject constructor( { val j = ApiClient.api!!.queryVideoClasses(klass, token) return j.toList() - }catch(e: Exception) + }catch(_: Exception) { return listOf() } @@ -65,7 +64,7 @@ class MediaManager @Inject constructor( try { val j = ApiClient.api!!.queryVideo(klass, id, token) return Video(klass = klass, id = id, token=token, isLocal = false, localBase = "", video = j) - }catch (e: Exception) + }catch (_: Exception) { return null } @@ -100,7 +99,7 @@ class MediaManager @Inject constructor( Json.decodeFromString