[fix] Video Remember id mass
This commit is contained in:
@@ -61,6 +61,7 @@ dependencies {
|
|||||||
implementation(libs.bcprov.jdk15on)
|
implementation(libs.bcprov.jdk15on)
|
||||||
implementation(libs.converter.gson)
|
implementation(libs.converter.gson)
|
||||||
implementation(libs.gson)
|
implementation(libs.gson)
|
||||||
|
|
||||||
implementation(libs.androidx.media3.exoplayer)
|
implementation(libs.androidx.media3.exoplayer)
|
||||||
implementation(libs.androidx.media3.ui)
|
implementation(libs.androidx.media3.ui)
|
||||||
implementation(libs.androidx.media3.common)
|
implementation(libs.androidx.media3.common)
|
||||||
|
|||||||
@@ -22,6 +22,6 @@ interface VideoRecordDao {
|
|||||||
@Delete
|
@Delete
|
||||||
suspend fun delete(rec: VideoRecord)
|
suspend fun delete(rec: VideoRecord)
|
||||||
|
|
||||||
@Query("SELECT * FROM videorecord WHERE id = :id")
|
@Query("SELECT * FROM videorecord WHERE id = :id and name = :klass")
|
||||||
suspend fun getById(id: String): VideoRecord?
|
suspend fun get(id: String, klass: String): VideoRecord?
|
||||||
}
|
}
|
||||||
@@ -130,8 +130,8 @@ fun generateColorScheme(primaryColor: Color, isDarkMode: Boolean): ColorScheme {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val DarkColorScheme = generateColorScheme(Color(0xFF4A6F9F), isDarkMode = true)
|
private val DarkColorScheme = generateColorScheme(Color(0xFF36A0FF), isDarkMode = true)
|
||||||
private val LightColorScheme = generateColorScheme(Color(0xFF4A6F9F), isDarkMode = false)
|
private val LightColorScheme = generateColorScheme(Color(0xFF36A0FF), isDarkMode = false)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun AetherTheme(
|
fun AetherTheme(
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ fun VideoScreen(
|
|||||||
Card(
|
Card(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxHeight()
|
.fillMaxHeight()
|
||||||
.width(200.dp)
|
.width(250.dp)
|
||||||
.align(Alignment.CenterEnd),
|
.align(Alignment.CenterEnd),
|
||||||
shape = RoundedCornerShape(8.dp),
|
shape = RoundedCornerShape(8.dp),
|
||||||
colors = CardDefaults.cardColors(containerColor = colorScheme.surface)
|
colors = CardDefaults.cardColors(containerColor = colorScheme.surface)
|
||||||
@@ -294,13 +294,13 @@ fun CatalogueItemRow(
|
|||||||
.padding(4.dp)
|
.padding(4.dp)
|
||||||
.padding(horizontal = 4.dp)
|
.padding(horizontal = 4.dp)
|
||||||
.heightIn(min = 28.dp)
|
.heightIn(min = 28.dp)
|
||||||
.width(200.dp),
|
.width(250.dp),
|
||||||
shape = RoundedCornerShape(8.dp),
|
shape = RoundedCornerShape(8.dp),
|
||||||
colors = CardDefaults.cardColors(containerColor = colorScheme.primary)
|
colors = CardDefaults.cardColors(containerColor = colorScheme.primary)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = item.second,
|
text = item.second,
|
||||||
fontSize = 18.sp,
|
fontSize = 14.sp,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -408,7 +408,7 @@ fun VideoCard(
|
|||||||
text = video.video.name,
|
text = video.video.name,
|
||||||
fontSize = 12.sp,
|
fontSize = 12.sp,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
maxLines = 2,
|
maxLines = 4,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(8.dp)
|
.padding(8.dp)
|
||||||
.background(Color.Transparent)
|
.background(Color.Transparent)
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class VideoPlayerViewModel @Inject constructor(
|
|||||||
if(!renderedFirst)
|
if(!renderedFirst)
|
||||||
{
|
{
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
val ii = database.userDao().getById(video!!.id)
|
val ii = database.userDao().get(video!!.id, video!!.klass)
|
||||||
if(ii != null)
|
if(ii != null)
|
||||||
{
|
{
|
||||||
_player!!.seekTo(ii.position)
|
_player!!.seekTo(ii.position)
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ activityCompose = "1.11.0"
|
|||||||
composeBom = "2025.09.00"
|
composeBom = "2025.09.00"
|
||||||
media3Common = "1.8.0"
|
media3Common = "1.8.0"
|
||||||
media3Exoplayer = "1.8.0"
|
media3Exoplayer = "1.8.0"
|
||||||
|
media3ExoplayerFfmpeg = "1.8.0"
|
||||||
media3Ui = "1.8.0"
|
media3Ui = "1.8.0"
|
||||||
navigationCompose = "2.9.4"
|
navigationCompose = "2.9.4"
|
||||||
okhttp = "5.1.0"
|
okhttp = "5.1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user