From b0f8385b02df52bfb980a2e70535922b179c69b3 Mon Sep 17 00:00:00 2001 From: Heropowwa Date: Thu, 11 Jun 2026 00:16:20 +0200 Subject: [PATCH 1/6] feat: make colorSchemeForCurrentSong work offline --- .../navic/util/color/toBitmap.android.kt | 12 +++++ .../navic/ui/navigation/NowPlayingScene.kt | 45 ++++++++++++------- .../kotlin/paige/navic/util/color/toBitmap.kt | 7 +++ .../paige/navic/util/color/toBitmap.ios.kt | 11 +++++ 4 files changed, 59 insertions(+), 16 deletions(-) create mode 100644 composeApp/src/androidMain/kotlin/paige/navic/util/color/toBitmap.android.kt create mode 100644 composeApp/src/commonMain/kotlin/paige/navic/util/color/toBitmap.kt create mode 100644 composeApp/src/iosMain/kotlin/paige/navic/util/color/toBitmap.ios.kt diff --git a/composeApp/src/androidMain/kotlin/paige/navic/util/color/toBitmap.android.kt b/composeApp/src/androidMain/kotlin/paige/navic/util/color/toBitmap.android.kt new file mode 100644 index 000000000..16a00fb63 --- /dev/null +++ b/composeApp/src/androidMain/kotlin/paige/navic/util/color/toBitmap.android.kt @@ -0,0 +1,12 @@ +package paige.navic.util.color + +import androidx.compose.ui.graphics.ImageBitmap +import androidx.compose.ui.graphics.asImageBitmap +import androidx.core.graphics.drawable.toBitmap +import coil3.Image +import coil3.PlatformContext +import coil3.asDrawable + +actual fun Image.toComposeImageBitmap(context: PlatformContext): ImageBitmap { + return this.asDrawable(context.resources).toBitmap().asImageBitmap() +} diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt index 4870a9ee0..25e2dca91 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt @@ -14,7 +14,9 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.RectangleShape @@ -24,20 +26,22 @@ import androidx.navigation3.scene.OverlayScene import androidx.navigation3.scene.Scene import androidx.navigation3.scene.SceneStrategy import androidx.navigation3.scene.SceneStrategyScope -import com.kmpalette.loader.rememberNetworkLoader -import com.kmpalette.rememberDominantColorState +import coil3.compose.LocalPlatformContext +import coil3.request.ImageRequest +import coil3.request.SuccessResult +import com.kmpalette.color +import com.kmpalette.palette.graphics.Palette import com.materialkolor.PaletteStyle import com.materialkolor.dynamiccolor.ColorSpec import com.materialkolor.rememberDynamicColorScheme -import io.ktor.client.HttpClient -import io.ktor.client.plugins.HttpTimeout -import io.ktor.http.Url import org.koin.compose.koinInject +import paige.navic.di.getStaticImageLoader import paige.navic.domain.manager.SessionManager import paige.navic.shared.MediaPlayerViewModel import paige.navic.ui.components.sheets.ModalBottomSheet import paige.navic.ui.navigation.NowPlayingSceneStrategy.Companion.bottomSheet import paige.navic.ui.theme.NavicTheme +import paige.navic.util.color.toComposeImageBitmap /** An [OverlayScene] that renders an [entry] within a [ModalBottomSheet]. */ @OptIn(ExperimentalMaterial3Api::class) @@ -146,24 +150,33 @@ private fun colorSchemeForCurrentSong(): ColorScheme { val coverUri = remember(song?.coverArtId) { song?.coverArtId?.let { sessionManager.getCoverArtUrl(it) } } - val networkLoader = rememberNetworkLoader(HttpClient().config { - install(HttpTimeout) { - requestTimeoutMillis = 60_000 - connectTimeoutMillis = 60_000 - socketTimeoutMillis = 60_000 - } - }) - val dominantColorState = rememberDominantColorState(loader = networkLoader) + + val coilContext = LocalPlatformContext.current + val imageLoader = remember(coilContext) { getStaticImageLoader(coilContext) } + + var dominantColor by remember { mutableStateOf(Color.Transparent) } + val scheme = rememberDynamicColorScheme( - seedColor = dominantColorState.color, + seedColor = dominantColor, isDark = true, style = if (coverUri != null) PaletteStyle.Content else PaletteStyle.Monochrome, specVersion = ColorSpec.SpecVersion.SPEC_2021, ) LaunchedEffect(coverUri) { - coverUri?.let { - dominantColorState.updateFrom(Url("$it&size=128")) + if (coverUri != null) { + val request = ImageRequest.Builder(coilContext) + .data("$coverUri&size=128") + .build() + + val result = imageLoader.execute(request) + if (result is SuccessResult) { + val bitmap = result.image.toComposeImageBitmap(coilContext) + val palette = Palette.from(bitmap).generate() + dominantColor = palette.dominantSwatch?.color ?: Color.Transparent + } + } else { + dominantColor = Color.Transparent } } diff --git a/composeApp/src/commonMain/kotlin/paige/navic/util/color/toBitmap.kt b/composeApp/src/commonMain/kotlin/paige/navic/util/color/toBitmap.kt new file mode 100644 index 000000000..67f342e6f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/paige/navic/util/color/toBitmap.kt @@ -0,0 +1,7 @@ +package paige.navic.util.color + +import androidx.compose.ui.graphics.ImageBitmap +import coil3.Image +import coil3.PlatformContext + +expect fun Image.toComposeImageBitmap(context: PlatformContext): ImageBitmap diff --git a/composeApp/src/iosMain/kotlin/paige/navic/util/color/toBitmap.ios.kt b/composeApp/src/iosMain/kotlin/paige/navic/util/color/toBitmap.ios.kt new file mode 100644 index 000000000..4e36d5d9d --- /dev/null +++ b/composeApp/src/iosMain/kotlin/paige/navic/util/color/toBitmap.ios.kt @@ -0,0 +1,11 @@ +package paige.navic.util.color + +import androidx.compose.ui.graphics.ImageBitmap +import androidx.compose.ui.graphics.asComposeImageBitmap +import coil3.Image +import coil3.PlatformContext +import coil3.toBitmap + +actual fun Image.toComposeImageBitmap(context: PlatformContext): ImageBitmap { + return this.toBitmap().asComposeImageBitmap() +} From b48f23a4c5edddab27a78242b3743e10837f0994 Mon Sep 17 00:00:00 2001 From: Heropowwa Date: Thu, 11 Jun 2026 00:47:38 +0200 Subject: [PATCH 2/6] fix: use right caching key --- .../kotlin/paige/navic/ui/navigation/NowPlayingScene.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt index 25e2dca91..9cf884cc2 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt @@ -163,10 +163,12 @@ private fun colorSchemeForCurrentSong(): ColorScheme { specVersion = ColorSpec.SpecVersion.SPEC_2021, ) - LaunchedEffect(coverUri) { - if (coverUri != null) { + LaunchedEffect(coverUri, song?.coverArtId) { + if (coverUri != null && song?.coverArtId != null) { val request = ImageRequest.Builder(coilContext) - .data("$coverUri&size=128") + .data(coverUri) + .diskCacheKey(song.coverArtId) + .size(128) .build() val result = imageLoader.execute(request) From 12afb0ef4301c20482c3564eb5daadd0a29cbd1d Mon Sep 17 00:00:00 2001 From: Heropowwa Date: Sun, 14 Jun 2026 01:10:35 +0200 Subject: [PATCH 3/6] feat: add theming to CollectionScreen + cache colors by coverId --- .../composeResources/values/strings.xml | 1 + .../kotlin/paige/navic/di/ManagerModule.kt | 2 + .../navic/domain/manager/CoverColorManager.kt | 12 + .../navic/domain/manager/PreferenceManager.kt | 1 + .../ui/components/layouts/RootBottomBar.kt | 6 +- .../navic/ui/navigation/NowPlayingScene.kt | 68 +-- .../ui/screens/artist/ArtistDetailScreen.kt | 488 +++++++++--------- .../screens/artist/components/DetailTopBar.kt | 8 +- .../collection/CollectionDetailScreen.kt | 431 ++++++++-------- .../components/HeadingRowButtons.kt | 17 +- .../screens/collection/components/SongRow.kt | 2 +- .../screens/collection/components/TopBar.kt | 8 + .../ui/screens/settings/AppearanceScreen.kt | 7 + .../navic/util/color/CoverColorScheme.kt | 92 ++++ 14 files changed, 623 insertions(+), 520 deletions(-) create mode 100644 composeApp/src/commonMain/kotlin/paige/navic/domain/manager/CoverColorManager.kt create mode 100644 composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt diff --git a/composeApp/src/commonMain/composeResources/values/strings.xml b/composeApp/src/commonMain/composeResources/values/strings.xml index fbac004f7..536d1f4e4 100644 --- a/composeApp/src/commonMain/composeResources/values/strings.xml +++ b/composeApp/src/commonMain/composeResources/values/strings.xml @@ -77,6 +77,7 @@ Max Bitrates Off + Dynamic theming in Albums/Playlists Background style Static Dynamic diff --git a/composeApp/src/commonMain/kotlin/paige/navic/di/ManagerModule.kt b/composeApp/src/commonMain/kotlin/paige/navic/di/ManagerModule.kt index c0b28b415..ab54e5186 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/di/ManagerModule.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/di/ManagerModule.kt @@ -7,6 +7,7 @@ import paige.navic.domain.manager.PreferenceManager import paige.navic.domain.manager.SessionManager import paige.navic.domain.manager.SleepTimerManager import paige.navic.domain.manager.SyncManager +import paige.navic.domain.manager.CoverColorManager val managerModule = module { singleOf(::SleepTimerManager) @@ -18,4 +19,5 @@ val managerModule = module { singleOf(::DownloadManager) singleOf(::SessionManager) singleOf(::PreferenceManager) + singleOf(::CoverColorManager) } diff --git a/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/CoverColorManager.kt b/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/CoverColorManager.kt new file mode 100644 index 000000000..06b2a80c1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/CoverColorManager.kt @@ -0,0 +1,12 @@ +package paige.navic.domain.manager + +import androidx.compose.ui.graphics.Color + +class CoverColorManager { + private val colorCache = mutableMapOf() + + fun getColor(coverArtId: String): Color? = colorCache[coverArtId] + fun putColor(coverArtId: String, color: Color) { + colorCache[coverArtId] = color + } +} diff --git a/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/PreferenceManager.kt b/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/PreferenceManager.kt index d4afa732f..c6a6e14b8 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/PreferenceManager.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/PreferenceManager.kt @@ -30,6 +30,7 @@ class PreferenceManager( var fontPath by preference("") var animationStyle by preference(AnimationStyle.Expressive) var nowPlayingBackgroundStyle by preference(NowPlayingBackgroundStyle.Dynamic) + var dynamicThemes by preference(true) var swipeToSkip by preference(true) var gridSize by preference(GridSize.TwoByTwo) var coverArtShape by preference(CoverArtShape.Soft) diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/components/layouts/RootBottomBar.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/components/layouts/RootBottomBar.kt index 1f9546224..32de36072 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/components/layouts/RootBottomBar.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/components/layouts/RootBottomBar.kt @@ -46,7 +46,7 @@ fun RootBottomBar( modifier = modifier.then( if (preferenceManager.miniPlayerStyle == MiniPlayerStyle.Detached) Modifier.background( - Brush.easedVerticalGradient(color = MaterialTheme.colorScheme.surface.copy(alpha = shadowFadeProgress)) + Brush.easedVerticalGradient(color = MaterialTheme.colorScheme.surfaceContainer.copy(alpha = shadowFadeProgress)) ) else Modifier ) @@ -62,8 +62,8 @@ fun RootBottomBar( ) BottomBar( containerColor = if (preferenceManager.miniPlayerStyle == MiniPlayerStyle.Detached) - NavigationBarDefaults.containerColor.copy(alpha = 0f) - else NavigationBarDefaults.containerColor, + MaterialTheme.colorScheme.surfaceContainer.copy(alpha = 0f) + else MaterialTheme.colorScheme.surfaceContainer, windowInsets = bottomBarWindowInsets, modifier = Modifier.graphicsLayer { alpha = progress.coerceIn(0f..1f) diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt index 9cf884cc2..2a667ccd3 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/navigation/NowPlayingScene.kt @@ -4,19 +4,14 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.BottomSheetDefaults -import androidx.compose.material3.ColorScheme import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme import androidx.compose.material3.ModalBottomSheetProperties import androidx.compose.material3.SheetValue import androidx.compose.material3.rememberModalBottomSheetState import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.RectangleShape @@ -26,22 +21,12 @@ import androidx.navigation3.scene.OverlayScene import androidx.navigation3.scene.Scene import androidx.navigation3.scene.SceneStrategy import androidx.navigation3.scene.SceneStrategyScope -import coil3.compose.LocalPlatformContext -import coil3.request.ImageRequest -import coil3.request.SuccessResult -import com.kmpalette.color -import com.kmpalette.palette.graphics.Palette -import com.materialkolor.PaletteStyle -import com.materialkolor.dynamiccolor.ColorSpec -import com.materialkolor.rememberDynamicColorScheme import org.koin.compose.koinInject -import paige.navic.di.getStaticImageLoader -import paige.navic.domain.manager.SessionManager import paige.navic.shared.MediaPlayerViewModel import paige.navic.ui.components.sheets.ModalBottomSheet import paige.navic.ui.navigation.NowPlayingSceneStrategy.Companion.bottomSheet import paige.navic.ui.theme.NavicTheme -import paige.navic.util.color.toComposeImageBitmap +import paige.navic.util.color.rememberCoverColorScheme /** An [OverlayScene] that renders an [entry] within a [ModalBottomSheet]. */ @OptIn(ExperimentalMaterial3Api::class) @@ -59,7 +44,12 @@ internal class NowPlayingScene( override val entries: List> = listOf(entry) override val content: @Composable (() -> Unit) = { - NavicTheme(colorSchemeForCurrentSong()) { + val player = koinInject() + val playerState by player.uiState.collectAsState() + val song = playerState.currentSong + val colorScheme = rememberCoverColorScheme(song?.coverArtId) + + NavicTheme(colorScheme) { val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true) ModalBottomSheet( @@ -140,47 +130,3 @@ class NowPlayingSceneStrategy : SceneStrategy { internal const val IS_TRANSPARENT_KEY = "is_transparent" } } - -@Composable -private fun colorSchemeForCurrentSong(): ColorScheme { - val player = koinInject() - val sessionManager = koinInject() - val playerState by player.uiState.collectAsState() - val song = playerState.currentSong - val coverUri = remember(song?.coverArtId) { - song?.coverArtId?.let { sessionManager.getCoverArtUrl(it) } - } - - val coilContext = LocalPlatformContext.current - val imageLoader = remember(coilContext) { getStaticImageLoader(coilContext) } - - var dominantColor by remember { mutableStateOf(Color.Transparent) } - - val scheme = rememberDynamicColorScheme( - seedColor = dominantColor, - isDark = true, - style = if (coverUri != null) PaletteStyle.Content else PaletteStyle.Monochrome, - specVersion = ColorSpec.SpecVersion.SPEC_2021, - ) - - LaunchedEffect(coverUri, song?.coverArtId) { - if (coverUri != null && song?.coverArtId != null) { - val request = ImageRequest.Builder(coilContext) - .data(coverUri) - .diskCacheKey(song.coverArtId) - .size(128) - .build() - - val result = imageLoader.execute(request) - if (result is SuccessResult) { - val bitmap = result.image.toComposeImageBitmap(coilContext) - val palette = Palette.from(bitmap).generate() - dominantColor = palette.dominantSwatch?.color ?: Color.Transparent - } - } else { - dominantColor = Color.Transparent - } - } - - return scheme -} diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/artist/ArtistDetailScreen.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/artist/ArtistDetailScreen.kt index 64e359630..a15086d1b 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/artist/ArtistDetailScreen.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/artist/ArtistDetailScreen.kt @@ -88,6 +88,8 @@ import paige.navic.ui.screens.artist.components.ArtistDetailScreenTopBar import paige.navic.ui.screens.artist.viewmodels.ArtistDetailViewModel import paige.navic.ui.screens.playlist.dialogs.PlaylistUpdateDialog import paige.navic.ui.screens.share.dialogs.ShareDialog +import paige.navic.ui.theme.NavicTheme +import paige.navic.util.color.rememberCoverColorScheme import kotlin.time.Duration @OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3ExpressiveApi::class) @@ -118,6 +120,13 @@ fun ArtistDetailScreen( val backStack = LocalNavStack.current val layoutDirection = LocalLayoutDirection.current val artistState by viewModel.artistState.collectAsStateWithLifecycle() + + val colorScheme = if (preferenceManager.dynamicThemes) { + rememberCoverColorScheme(artistState.data?.artist?.coverArtId) + } else { + null + } + val starred by viewModel.starred.collectAsState() val isOnline by viewModel.isOnline.collectAsStateWithLifecycle() val allDownloads by viewModel.allDownloads.collectAsStateWithLifecycle() @@ -144,273 +153,276 @@ fun ArtistDetailScreen( var playlistDialogShown by rememberSaveable { mutableStateOf(false) } - Scaffold( - topBar = { - ArtistDetailScreenTopBar( - scrolled = scrolled, - artistState = artistState, - starred = starred, - onSetStarred = { viewModel.starArtist(it) }, - ) - }, - bottomBar = { - val scrollManager = LocalBottomBarScrollManager.current - if (preferenceManager.bottomBarVisibilityMode == BottomBarVisibilityMode.AllScreens) { - RootBottomBar(scrolled = scrollManager.isTriggered) - } - } - ) { contentPadding -> - AnimatedContent( - targetState = artistState, - transitionSpec = { - (fadeIn( - animationSpec = effectSpec - ) + scaleIn( - initialScale = 0.8f, - animationSpec = spatialSpec - )) togetherWith (fadeOut( - animationSpec = effectSpec - ) + scaleOut( - animationSpec = spatialSpec - )) + NavicTheme(colorScheme) { + Scaffold( + topBar = { + ArtistDetailScreenTopBar( + scrolled = scrolled, + artistState = artistState, + starred = starred, + onSetStarred = { viewModel.starArtist(it) }, + ) }, - modifier = Modifier.fillMaxSize() - ) { artistState -> - when (artistState) { - is UiState.Error -> Box(Modifier.fillMaxSize().padding(contentPadding)) { - ErrorBox(artistState) + bottomBar = { + val scrollManager = LocalBottomBarScrollManager.current + if (preferenceManager.bottomBarVisibilityMode == BottomBarVisibilityMode.AllScreens) { + RootBottomBar(scrolled = scrollManager.isTriggered) } + }, + containerColor = MaterialTheme.colorScheme.surface + ) { contentPadding -> + AnimatedContent( + targetState = artistState, + transitionSpec = { + (fadeIn( + animationSpec = effectSpec + ) + scaleIn( + initialScale = 0.8f, + animationSpec = spatialSpec + )) togetherWith (fadeOut( + animationSpec = effectSpec + ) + scaleOut( + animationSpec = spatialSpec + )) + }, + modifier = Modifier.fillMaxSize() + ) { artistState -> + when (artistState) { + is UiState.Error -> Box(Modifier.fillMaxSize().padding(contentPadding)) { + ErrorBox(artistState) + } - is UiState.Loading -> Box(Modifier.fillMaxSize()) { - ContainedLoadingIndicator(Modifier.size(80.dp).align(Alignment.Center)) - } + is UiState.Loading -> Box(Modifier.fillMaxSize()) { + ContainedLoadingIndicator(Modifier.size(80.dp).align(Alignment.Center)) + } - is UiState.Success -> { - val state = artistState.data - BulkDownloadDialog( - title = stringResource(Res.string.title_bulk_download), - message = stringResource(Res.string.info_bulk_download_warning, state.artist.name), - showDialog = showDownloadDialog, - onDismissRequest = { showDownloadDialog = false }, - onConfirm = { - scope.launch { - state.albums.forEach { album -> - downloadManager.downloadCollection(album) + is UiState.Success -> { + val state = artistState.data + BulkDownloadDialog( + title = stringResource(Res.string.title_bulk_download), + message = stringResource(Res.string.info_bulk_download_warning, state.artist.name), + showDialog = showDownloadDialog, + onDismissRequest = { showDownloadDialog = false }, + onConfirm = { + scope.launch { + state.albums.forEach { album -> + downloadManager.downloadCollection(album) + } } } - } - ) - Column( - modifier = Modifier - .fillMaxSize() - .verticalScroll(viewModel.scrollState), - verticalArrangement = Arrangement.spacedBy(12.dp), - horizontalAlignment = Alignment.CenterHorizontally - ) { - ArtistDetailScreenHeading( - artistName = state.artist.name, - coverArtId = state.artist.coverArtId, - subtitle = state.artist.biography, - lastfm = state.artist.lastFmUrl, - innerPadding = contentPadding, - scrolled = scrolled - ) - ArtistActionButtons( - onPlay = { viewModel.playArtistAlbums(player) }, - onDownload = { - showDownloadDialog = true - }, - onCancelDownload = { - state.albums.forEach { album -> - downloadManager.cancelCollectionDownload(album) - } - }, - onDeleteDownload = { - state.albums.forEach { album -> - downloadManager.deleteDownloadedCollection(album) - } - }, - downloadStatus = downloadStatus, - playEnabled = state.albums.isNotEmpty(), - modifier = Modifier.padding(top = 8.dp) ) Column( modifier = Modifier - .fillMaxWidth() - .padding( - start = contentPadding.calculateStartPadding( - layoutDirection - ) - ) - .padding( - end = contentPadding.calculateEndPadding( - layoutDirection - ) - ), + .fillMaxSize() + .verticalScroll(viewModel.scrollState), verticalArrangement = Arrangement.spacedBy(12.dp), horizontalAlignment = Alignment.CenterHorizontally ) { - state.topSongs.takeIf { state.topSongs.isNotEmpty() } - ?.let { songs -> - Row( - modifier = Modifier - .heightIn(min = 32.dp) - .padding(top = 8.dp) - .padding(horizontal = 16.dp) - .fillMaxWidth(), - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.SpaceBetween - ) { - Text( - stringResource(Res.string.option_sort_frequent), - style = MaterialTheme.typography.titleMediumEmphasized, - fontWeight = FontWeight(600) + ArtistDetailScreenHeading( + artistName = state.artist.name, + coverArtId = state.artist.coverArtId, + subtitle = state.artist.biography, + lastfm = state.artist.lastFmUrl, + innerPadding = contentPadding, + scrolled = scrolled + ) + ArtistActionButtons( + onPlay = { viewModel.playArtistAlbums(player) }, + onDownload = { + showDownloadDialog = true + }, + onCancelDownload = { + state.albums.forEach { album -> + downloadManager.cancelCollectionDownload(album) + } + }, + onDeleteDownload = { + state.albums.forEach { album -> + downloadManager.deleteDownloadedCollection(album) + } + }, + downloadStatus = downloadStatus, + playEnabled = state.albums.isNotEmpty(), + modifier = Modifier.padding(top = 8.dp) + ) + Column( + modifier = Modifier + .fillMaxWidth() + .padding( + start = contentPadding.calculateStartPadding( + layoutDirection ) - Text( - stringResource(Res.string.action_see_all), - style = MaterialTheme.typography.labelLarge, - color = MaterialTheme.colorScheme.primary, - modifier = Modifier.clickable(onClick = dropUnlessResumed { - platformContext.clickSound() - backStack.add( - Screen.SongList( - nested = true, - artistId = state.artist.id, - artistName = state.artist.name + ) + .padding( + end = contentPadding.calculateEndPadding( + layoutDirection + ) + ), + verticalArrangement = Arrangement.spacedBy(12.dp), + horizontalAlignment = Alignment.CenterHorizontally + ) { + state.topSongs.takeIf { state.topSongs.isNotEmpty() } + ?.let { songs -> + Row( + modifier = Modifier + .heightIn(min = 32.dp) + .padding(top = 8.dp) + .padding(horizontal = 16.dp) + .fillMaxWidth(), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween + ) { + Text( + stringResource(Res.string.option_sort_frequent), + style = MaterialTheme.typography.titleMediumEmphasized, + fontWeight = FontWeight(600) + ) + Text( + stringResource(Res.string.action_see_all), + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.primary, + modifier = Modifier.clickable(onClick = dropUnlessResumed { + platformContext.clickSound() + backStack.add( + Screen.SongList( + nested = true, + artistId = state.artist.id, + artistName = state.artist.name + ) ) + }) + ) + } + LazyHorizontalGrid( + rows = GridCells.Fixed(3), + state = gridState, + flingBehavior = rememberSnapFlingBehavior(lazyGridState = gridState), + modifier = Modifier.fillMaxWidth().height(250.dp) + ) { + itemsIndexed(songs) { index, song -> + val download = allDownloads.find { it.songId == song.id } + SongRow( + modifier = Modifier.weight(1f), + song = song, + selected = selection == song, + onClick = { + if (playerState.currentSong?.id != song.id) { + player.clearQueue() + songs.forEach { song -> player.addToQueueSingle(song) } + player.playAt(index) + } else { + player.togglePlay() + } + }, + onLongClick = { + viewModel.selectSong(song) + }, + onDismissRequest = { viewModel.clearSelection() }, + starredState = if (selection == song) selectedSongIsStarred else song.starredAt != null, + onAddStar = { viewModel.starSelectedSong() }, + onRemoveStar = { viewModel.unstarSelectedSong() }, + download = download, + onDownload = { viewModel.downloadSong(song) }, + onCancelDownload = { viewModel.cancelDownload(song.id) }, + onDeleteDownload = { viewModel.deleteDownload(song.id) }, + onPlayNext = { player.playNextSingle(song) }, + onAddToQueue = { player.addToQueueSingle(song) }, + onShare = { shareId = song.id }, + isOnline = isOnline, + rating = selectedSongRating, + onSetRating = { viewModel.rateSelectedSong(it) } ) - }) - ) + } + } } - LazyHorizontalGrid( - rows = GridCells.Fixed(3), - state = gridState, - flingBehavior = rememberSnapFlingBehavior(lazyGridState = gridState), - modifier = Modifier.fillMaxWidth().height(250.dp) - ) { - itemsIndexed(songs) { index, song -> - val download = allDownloads.find { it.songId == song.id } - SongRow( - modifier = Modifier.weight(1f), - song = song, - selected = selection == song, - onClick = { - if (playerState.currentSong?.id != song.id) { - player.clearQueue() - songs.forEach { song -> player.addToQueueSingle(song) } - player.playAt(index) - } else { - player.togglePlay() - } - }, - onLongClick = { - viewModel.selectSong(song) - }, - onDismissRequest = { viewModel.clearSelection() }, - starredState = if (selection == song) selectedSongIsStarred else song.starredAt != null, - onAddStar = { viewModel.starSelectedSong() }, - onRemoveStar = { viewModel.unstarSelectedSong() }, - download = download, - onDownload = { viewModel.downloadSong(song) }, - onCancelDownload = { viewModel.cancelDownload(song.id) }, - onDeleteDownload = { viewModel.deleteDownload(song.id) }, - onPlayNext = { player.playNextSingle(song) }, - onAddToQueue = { player.addToQueueSingle(song) }, - onShare = { shareId = song.id }, - isOnline = isOnline, - rating = selectedSongRating, - onSetRating = { viewModel.rateSelectedSong(it) } - ) + ArtCarousel( + stringResource(Res.string.title_albums), + state.albums.sortedByDescending { album -> album.playCount } + .toImmutableList() + ) { album -> + val albumDownloadStatus by downloadManager + .getCollectionDownloadStatus(album.songs.map { it.id }) + .collectAsState(initial = DownloadStatus.NOT_DOWNLOADED) + ArtCarouselItem( + coverArtId = album.coverArtId, + title = album.name, + contentDescription = null, + onSelect = { viewModel.selectAlbum(album) }, + onClick = dropUnlessResumed { + backStack.add(Screen.CollectionDetail(album.id, "artist")) } + ) + if (selectedAlbum == album) { + CollectionSheet( + onDismissRequest = { viewModel.clearAlbumSelection() }, + collection = album, + starred = selectedAlbumIsStarred, + onShare = { shareId = album.id }, + onPlayNext = { player.playNext(album) }, + onAddToQueue = { player.addToQueue(album) }, + onSetStarred = { viewModel.starAlbum(!selectedAlbumIsStarred) }, + onAddAllToPlaylist = { playlistDialogShown = true }, + downloadStatus = albumDownloadStatus, + onDownloadAll = { + scope.launch { + downloadManager.downloadCollection(album) + } + }, + onCancelDownloadAll = { + scope.launch { + album.songs.forEach { downloadManager.cancelDownload(it.id) } + } + }, + onDeleteDownloadAll = { + scope.launch { + downloadManager.deleteDownloadedCollection(album) + } + }, + rating = selectedAlbumRating, + onSetRating = { viewModel.rateSelectedAlbum(it) } + ) } } - ArtCarousel( - stringResource(Res.string.title_albums), - state.albums.sortedByDescending { album -> album.playCount } - .toImmutableList() - ) { album -> - val albumDownloadStatus by downloadManager - .getCollectionDownloadStatus(album.songs.map { it.id }) - .collectAsState(initial = DownloadStatus.NOT_DOWNLOADED) - ArtCarouselItem( - coverArtId = album.coverArtId, - title = album.name, - contentDescription = null, - onSelect = { viewModel.selectAlbum(album) }, - onClick = dropUnlessResumed { - backStack.add(Screen.CollectionDetail(album.id, "artist")) - } - ) - if (selectedAlbum == album) { - CollectionSheet( - onDismissRequest = { viewModel.clearAlbumSelection() }, - collection = album, - starred = selectedAlbumIsStarred, - onShare = { shareId = album.id }, - onPlayNext = { player.playNext(album) }, - onAddToQueue = { player.addToQueue(album) }, - onSetStarred = { viewModel.starAlbum(!selectedAlbumIsStarred) }, - onAddAllToPlaylist = { playlistDialogShown = true }, - downloadStatus = albumDownloadStatus, - onDownloadAll = { - scope.launch { - downloadManager.downloadCollection(album) - } - }, - onCancelDownloadAll = { - scope.launch { - album.songs.forEach { downloadManager.cancelDownload(it.id) } - } - }, - onDeleteDownloadAll = { - scope.launch { - downloadManager.deleteDownloadedCollection(album) - } - }, - rating = selectedAlbumRating, - onSetRating = { viewModel.rateSelectedAlbum(it) } + if (state.similarArtists.isEmpty()) return@Column + ArtCarousel( + stringResource(Res.string.title_similar_artists), + state.similarArtists.toImmutableList() + ) { artist -> + ArtCarouselItem( + coverArtId = artist.coverArtId, + title = artist.name, + subtitle = pluralStringResource( + Res.plurals.count_albums, + artist.albumCount, + artist.albumCount + ), + contentDescription = null, + onClick = dropUnlessResumed { + backStack.add(Screen.ArtistDetail(artist.id)) + } ) } } - if (state.similarArtists.isEmpty()) return@Column - ArtCarousel( - stringResource(Res.string.title_similar_artists), - state.similarArtists.toImmutableList() - ) { artist -> - ArtCarouselItem( - coverArtId = artist.coverArtId, - title = artist.name, - subtitle = pluralStringResource( - Res.plurals.count_albums, - artist.albumCount, - artist.albumCount - ), - contentDescription = null, - onClick = dropUnlessResumed { - backStack.add(Screen.ArtistDetail(artist.id)) - } - ) - } + Spacer(Modifier.height(contentPadding.calculateBottomPadding())) } - Spacer(Modifier.height(contentPadding.calculateBottomPadding())) } } } } - } - ShareDialog( - id = shareId, - onIdClear = { shareId = null; viewModel.clearSelection() }, - expiry = shareExpiry, - onExpiryChange = { shareExpiry = it } - ) - - if (playlistDialogShown) { - PlaylistUpdateDialog( - songs = selectedAlbum?.songs.orEmpty().toPersistentList(), - onDismissRequest = { playlistDialogShown = false } + ShareDialog( + id = shareId, + onIdClear = { shareId = null; viewModel.clearSelection() }, + expiry = shareExpiry, + onExpiryChange = { shareExpiry = it } ) + + if (playlistDialogShown) { + PlaylistUpdateDialog( + songs = selectedAlbum?.songs.orEmpty().toPersistentList(), + onDismissRequest = { playlistDialogShown = false } + ) + } } } diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/artist/components/DetailTopBar.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/artist/components/DetailTopBar.kt index 8f06e7dba..8980907b0 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/artist/components/DetailTopBar.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/artist/components/DetailTopBar.kt @@ -1,7 +1,6 @@ package paige.navic.ui.screens.artist.components import androidx.compose.animation.AnimatedVisibility -import androidx.compose.animation.core.animateFloatAsState import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut import androidx.compose.animation.scaleIn @@ -17,6 +16,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalUriHandler import kotlinx.collections.immutable.toPersistentList import navic.composeapp.generated.resources.Res @@ -42,9 +42,6 @@ fun ArtistDetailScreenTopBar( ) { val uriHandler = LocalUriHandler.current val state = (artistState as? UiState.Success)?.data - val alpha by animateFloatAsState( - if (scrolled) 1f else 0f - ) val player = koinInject() @@ -53,7 +50,8 @@ fun ArtistDetailScreenTopBar( if (state != null) { NestedTopBar( colors = TopAppBarDefaults.topAppBarColors( - containerColor = MaterialTheme.colorScheme.surface.copy(alpha = alpha) + containerColor = if (scrolled) MaterialTheme.colorScheme.surface else Color.Transparent, + scrolledContainerColor = MaterialTheme.colorScheme.surface ), title = { AnimatedVisibility( diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/CollectionDetailScreen.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/CollectionDetailScreen.kt index 81e5cb218..494fb3759 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/CollectionDetailScreen.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/CollectionDetailScreen.kt @@ -1,6 +1,5 @@ package paige.navic.ui.screens.collection -import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -62,6 +61,8 @@ import paige.navic.ui.screens.collection.components.CollectionDetailScreenTopBar import paige.navic.ui.screens.collection.components.collectionDetailScreenMoreByArtistRow import paige.navic.ui.screens.collection.viewmodels.CollectionDetailViewModel import paige.navic.ui.screens.share.dialogs.ShareDialog +import paige.navic.ui.theme.NavicTheme +import paige.navic.util.color.rememberCoverColorScheme import paige.navic.util.ui.withoutTop import kotlin.time.Duration @@ -83,6 +84,13 @@ fun CollectionDetailScreen( val collectionState by viewModel.collectionState.collectAsState() val collection = collectionState.data + + val colorScheme = if (preferenceManager.dynamicThemes) { + rememberCoverColorScheme(collection?.coverArtId) + } else { + null + } + val selection by viewModel.selectedSong.collectAsState() val selectedAlbum by viewModel.selectedAlbum.collectAsState() val isOnline by viewModel.isOnline.collectAsState() @@ -116,235 +124,240 @@ fun CollectionDetailScreen( } } - Scaffold( - topBar = { - CollectionDetailScreenTopBar( - albumInfoState = albumInfoState, - collection = collection, - titleAlpha = titleAlpha, - onSetShareId = { shareId = it }, - onDownloadAll = { viewModel.downloadAll() }, - onCancelDownloadAll = { viewModel.cancelDownloadAll() }, - onPlayNext = { if (collection != null) player.playNext(collection) }, - onAddToQueue = { if (collection != null) player.addToQueue(collection) }, - downloadStatus = downloadStatus, - rating = if (collection !is DomainPlaylist) rating else null, - onSetRating = if (collection !is DomainPlaylist) { { viewModel.rateAlbum(it) } } else null, - starred = if (collection !is DomainPlaylist) starred else null, - onSetStarred = if (collection !is DomainPlaylist) { { viewModel.starAlbum(it) } } else null, - refreshCollection = { viewModel.refreshCollection(false) } - ) - }, - bottomBar = { - val scrollManager = LocalBottomBarScrollManager.current - if (preferenceManager.bottomBarVisibilityMode == BottomBarVisibilityMode.AllScreens) { - RootBottomBar(scrolled = scrollManager.isTriggered) - } - } - ) { contentPadding -> - PullToRefreshBox( - modifier = Modifier - .padding(top = contentPadding.calculateTopPadding()) - .background(MaterialTheme.colorScheme.surface), - finished = collectionState !is UiState.Loading, - onRefresh = { viewModel.refreshCollection(true) }, - key = collectionState - ) { - LazyColumn( + NavicTheme(colorScheme) { + Scaffold( + topBar = { + CollectionDetailScreenTopBar( + albumInfoState = albumInfoState, + collection = collection, + titleAlpha = titleAlpha, + onSetShareId = { shareId = it }, + onDownloadAll = { viewModel.downloadAll() }, + onCancelDownloadAll = { viewModel.cancelDownloadAll() }, + onPlayNext = { if (collection != null) player.playNext(collection) }, + onAddToQueue = { if (collection != null) player.addToQueue(collection) }, + downloadStatus = downloadStatus, + rating = if (collection !is DomainPlaylist) rating else null, + onSetRating = if (collection !is DomainPlaylist) { { viewModel.rateAlbum(it) } } else null, + starred = if (collection !is DomainPlaylist) starred else null, + onSetStarred = if (collection !is DomainPlaylist) { { viewModel.starAlbum(it) } } else null, + refreshCollection = { viewModel.refreshCollection(false) } + ) + }, + bottomBar = { + val scrollManager = LocalBottomBarScrollManager.current + if (preferenceManager.bottomBarVisibilityMode == BottomBarVisibilityMode.AllScreens) { + RootBottomBar(scrolled = scrollManager.isTriggered) + } + }, + containerColor = MaterialTheme.colorScheme.surface + ) { contentPadding -> + PullToRefreshBox( modifier = Modifier - .background(MaterialTheme.colorScheme.surface) - .fillMaxSize(), - horizontalAlignment = Alignment.CenterHorizontally, - contentPadding = contentPadding.withoutTop(), - state = viewModel.listState + .padding(top = contentPadding.calculateTopPadding()), + finished = collectionState !is UiState.Loading, + onRefresh = { viewModel.refreshCollection(true) }, + key = collectionState ) { - if (collection == null) return@LazyColumn + LazyColumn( + modifier = Modifier + .fillMaxSize(), + horizontalAlignment = Alignment.CenterHorizontally, + contentPadding = contentPadding.withoutTop(), + state = viewModel.listState + ) { + if (collection == null) return@LazyColumn - item { - CollectionDetailScreenHeadingRow( - collection = collection, - tab = tab, - titleAlpha = 1f - titleAlpha - ) - } + item { + CollectionDetailScreenHeadingRow( + collection = collection, + tab = tab, + titleAlpha = 1f - titleAlpha + ) + } - item { - CollectionDetailScreenHeadingRowButtons( - collection = collection - ) - } + item { + CollectionDetailScreenHeadingRowButtons( + collection = collection + ) + } - if (collection is DomainAlbum) { - collection.copy( - songs = collection.songs.sortedWith(compareBy( - { it.discNumber }, - { it.trackNumber } - )) - ).let { album -> - album.songs.groupBy {it.discNumber}.forEach { group -> - val multipleDiscs = album.songs.groupBy { it.discNumber }.size > 1 - if (group.key != null && multipleDiscs) { - item { - Row( - modifier = Modifier - .fillMaxWidth() - .padding(horizontal = 16.dp) - .padding(top = if (group.key == 1) 0.dp else 12.dp, bottom = 4.dp) - .heightIn(min = 32.dp), - verticalAlignment = Alignment.CenterVertically - ) { - Icon( - imageVector = Icons.Outlined.Album, - contentDescription = null, - tint = MaterialTheme.colorScheme.onSurfaceVariant, - modifier = Modifier.size(20.dp) - ) + if (collection is DomainAlbum) { + collection.copy( + songs = collection.songs.sortedWith(compareBy( + { it.discNumber }, + { it.trackNumber } + )) + ).let { album -> + album.songs.groupBy { it.discNumber }.forEach { group -> + val multipleDiscs = album.songs.groupBy { it.discNumber }.size > 1 + if (group.key != null && multipleDiscs) { + item { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp) + .padding(top = if (group.key == 1) 0.dp else 12.dp, bottom = 4.dp) + .heightIn(min = 32.dp), + verticalAlignment = Alignment.CenterVertically + ) { + Icon( + imageVector = Icons.Outlined.Album, + contentDescription = null, + tint = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.size(20.dp) + ) - Spacer(modifier = Modifier.width(8.dp)) + Spacer(modifier = Modifier.width(8.dp)) - Text( - text = stringResource( - Res.string.title_disc_number, - group.key as Int - ), - style = MaterialTheme.typography.titleMediumEmphasized, - fontWeight = FontWeight(600), - color = MaterialTheme.colorScheme.onSurfaceVariant + Text( + text = stringResource( + Res.string.title_disc_number, + group.key as Int + ), + style = MaterialTheme.typography.titleMediumEmphasized, + fontWeight = FontWeight(600), + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } + } + itemsIndexed(group.value) { index, song -> + val download = allDownloads.find { it.songId == song.id } + Box { + CollectionDetailScreenSongRow( + song = song, + index = index, + count = group.value.count(), + isPlaylist = false, + onClick = { + if (playerState.currentSong?.id != song.id) { + player.playCollection(album, song) + } else { + player.togglePlay() + } + }, + onLongClick = { + viewModel.selectSong(song) + }, + onPlayNext = { + player.playNextSingle(song) + }, + onAddToQueue = { + player.addToQueueSingle(song) + }, + isStarred = if (selection == song) selectedSongIsStarred else song.starredAt != null, + download = download, + isOffline = !isOnline + ) + CollectionDetailScreenSongRowDropdown( + expanded = selection == song, + onDismissRequest = { viewModel.clearSelection() }, + onRemoveStar = { viewModel.unstarSelectedSong() }, + onAddStar = { viewModel.starSelectedSong() }, + onShare = { shareId = song.id }, + collection = collection, + song = song, + onRemoveFromPlaylist = { viewModel.removeFromPlaylist() }, + starred = selectedSongIsStarred, + downloadStatus = download?.status, + onDownload = { viewModel.downloadSong(song) }, + onCancelDownload = { viewModel.cancelDownload(song.id) }, + onDeleteDownload = { viewModel.deleteDownload(song.id) }, + onPlayNext = { player.playNextSingle(song) }, + onAddToQueue = { player.addToQueueSingle(song) }, + rating = selectedSongRating, + onSetRating = { viewModel.rateSelectedSong(it) } ) } } } - itemsIndexed(group.value) { index, song -> - val download = allDownloads.find { it.songId == song.id } - Box { - CollectionDetailScreenSongRow( - song = song, - index = index, - count = group.value.count(), - isPlaylist = false, - onClick = { - if (playerState.currentSong?.id != song.id) { - player.playCollection(album, song) - } else { - player.togglePlay() - } - }, - onLongClick = { - viewModel.selectSong(song) - }, - onPlayNext = { - player.playNextSingle(song) - }, - onAddToQueue = { - player.addToQueueSingle(song) - }, - isStarred = if (selection == song) selectedSongIsStarred else song.starredAt != null, - download = download, - isOffline = !isOnline - ) - CollectionDetailScreenSongRowDropdown( - expanded = selection == song, - onDismissRequest = { viewModel.clearSelection() }, - onRemoveStar = { viewModel.unstarSelectedSong() }, - onAddStar = { viewModel.starSelectedSong() }, - onShare = { shareId = song.id }, - collection = collection, - song = song, - onRemoveFromPlaylist = { viewModel.removeFromPlaylist() }, - starred = selectedSongIsStarred, - downloadStatus = download?.status, - onDownload = { viewModel.downloadSong(song) }, - onCancelDownload = { viewModel.cancelDownload(song.id) }, - onDeleteDownload = { viewModel.deleteDownload(song.id) }, - onPlayNext = { player.playNextSingle(song) }, - onAddToQueue = { player.addToQueueSingle(song) }, - rating = selectedSongRating, - onSetRating = { viewModel.rateSelectedSong(it) } - ) - } + } + } else { + itemsIndexed(collection.songs) { index, song -> + val download = allDownloads.find { it.songId == song.id } + Box { + CollectionDetailScreenSongRow( + song = song, + index = index, + count = collection.songs.count(), + isPlaylist = true, + onClick = { + if (playerState.currentSong?.id != song.id) { + player.playCollection(collection, song) + } else { + player.togglePlay() + } + }, + onLongClick = { + viewModel.selectSong(song) + }, + onPlayNext = { + player.playNextSingle(song) + }, + onAddToQueue = { + player.addToQueueSingle(song) + }, + isStarred = if (selection == song) selectedSongIsStarred else song.starredAt != null, + download = download, + isOffline = !isOnline + ) + CollectionDetailScreenSongRowDropdown( + expanded = selection == song, + onDismissRequest = { viewModel.clearSelection() }, + onRemoveStar = { viewModel.unstarSelectedSong() }, + onAddStar = { viewModel.starSelectedSong() }, + onShare = { shareId = song.id }, + collection = collection, + song = song, + onRemoveFromPlaylist = { viewModel.removeFromPlaylist() }, + starred = selectedSongIsStarred, + downloadStatus = download?.status, + onDownload = { viewModel.downloadSong(song) }, + onCancelDownload = { viewModel.cancelDownload(song.id) }, + onDeleteDownload = { viewModel.deleteDownload(song.id) }, + onPlayNext = { player.playNextSingle(song) }, + onAddToQueue = { player.addToQueueSingle(song) }, + rating = selectedSongRating, + onSetRating = { viewModel.rateSelectedSong(it) } + ) } } } - } else { - itemsIndexed(collection.songs) { index, song -> - val download = allDownloads.find { it.songId == song.id } - Box { - CollectionDetailScreenSongRow( - song = song, - index = index, - count = collection.songs.count(), - isPlaylist = true, - onClick = { - if (playerState.currentSong?.id != song.id) { - player.playCollection(collection, song) - } else { - player.togglePlay() - } - }, - onLongClick = { - viewModel.selectSong(song) - }, - onPlayNext = { - player.playNextSingle(song) - }, - onAddToQueue = { - player.addToQueueSingle(song) - }, - isStarred = if (selection == song) selectedSongIsStarred else song.starredAt != null, - download = download, - isOffline = !isOnline - ) - CollectionDetailScreenSongRowDropdown( - expanded = selection == song, - onDismissRequest = { viewModel.clearSelection() }, - onRemoveStar = { viewModel.unstarSelectedSong() }, - onAddStar = { viewModel.starSelectedSong() }, - onShare = { shareId = song.id }, - collection = collection, - song = song, - onRemoveFromPlaylist = { viewModel.removeFromPlaylist() }, - starred = selectedSongIsStarred, - downloadStatus = download?.status, - onDownload = { viewModel.downloadSong(song) }, - onCancelDownload = { viewModel.cancelDownload(song.id) }, - onDeleteDownload = { viewModel.deleteDownload(song.id) }, - onPlayNext = { player.playNextSingle(song) }, - onAddToQueue = { player.addToQueueSingle(song) }, - rating = selectedSongRating, - onSetRating = { viewModel.rateSelectedSong(it) } + + if (collection.songs.isEmpty()) { + item { + ContentUnavailable( + icon = Icons.Outlined.Note, + label = stringResource(Res.string.info_no_songs) ) } } - } - if (collection.songs.isEmpty()) { - item { - ContentUnavailable( - icon = Icons.Outlined.Note, - label = stringResource(Res.string.info_no_songs) + item { CollectionDetailScreenFooterRow(collection) } + + (collection as? DomainAlbum)?.artistName?.let { artistName -> + collectionDetailScreenMoreByArtistRow( + artistName = artistName, + artistAlbums = otherAlbums, + selectedAlbum = selectedAlbum, + onSetShareId = { shareId = it }, + onPlayNext = if (selectedAlbum != null) { + { player.playNext(selectedAlbum as DomainSongCollection) } + } else null, + onAddToQueue = if (selectedAlbum != null) { + { player.addToQueue(selectedAlbum as DomainSongCollection) } + } else null, + selectedAlbumRating = selectedAlbumRating, + selectedAlbumStarred = selectedAlbumIsStarred, + onSetAlbumRating = { viewModel.rateSelectedAlbum(it) }, + onSetAlbumStarred = { viewModel.starSelectedAlbum(it) }, + onSelect = { viewModel.selectAlbum(it) }, + onDeselect = { viewModel.clearSelection() }, + tab = tab ) } } - - item { CollectionDetailScreenFooterRow(collection) } - - (collection as? DomainAlbum)?.artistName?.let { artistName -> - collectionDetailScreenMoreByArtistRow( - artistName = artistName, - artistAlbums = otherAlbums, - selectedAlbum = selectedAlbum, - onSetShareId = { shareId = it }, - onPlayNext = if (selectedAlbum != null) { { player.playNext(selectedAlbum as DomainSongCollection) } } else null, - onAddToQueue = if (selectedAlbum != null) { { player.addToQueue(selectedAlbum as DomainSongCollection) } } else null, - selectedAlbumRating = selectedAlbumRating, - selectedAlbumStarred = selectedAlbumIsStarred, - onSetAlbumRating = { viewModel.rateSelectedAlbum(it) }, - onSetAlbumStarred = { viewModel.starSelectedAlbum(it) }, - onSelect = { viewModel.selectAlbum(it) }, - onDeselect = { viewModel.clearSelection() }, - tab = tab - ) - } } } } diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/HeadingRowButtons.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/HeadingRowButtons.kt index 1d50a94e9..6e07a4739 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/HeadingRowButtons.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/HeadingRowButtons.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.text.TextAutoSize import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -77,7 +78,10 @@ fun CollectionDetailScreenHeadingRowButtons( }, shape = buttonShape, contentPadding = PaddingValues(0.dp), - enabled = collection.songs.isNotEmpty() + enabled = collection.songs.isNotEmpty(), + colors = ButtonDefaults.outlinedButtonColors( + contentColor = MaterialTheme.colorScheme.primary + ) ) { Icon( Icons.Outlined.Shuffle, @@ -94,7 +98,11 @@ fun CollectionDetailScreenHeadingRowButtons( player.playAt(0) }, shape = buttonShape, - enabled = collection.songs.isNotEmpty() + enabled = collection.songs.isNotEmpty(), + colors = ButtonDefaults.buttonColors( + containerColor = MaterialTheme.colorScheme.primary, + contentColor = MaterialTheme.colorScheme.onPrimary + ) ) { Icon( Icons.Filled.Play, @@ -133,7 +141,10 @@ fun CollectionDetailScreenHeadingRowButtons( shape = buttonShape, enabled = collection.songs.isNotEmpty() || (downloadStatus == DownloadStatus.DOWNLOADED || downloadStatus == DownloadStatus.DOWNLOADING), - contentPadding = PaddingValues(0.dp) + contentPadding = PaddingValues(0.dp), + colors = ButtonDefaults.outlinedButtonColors( + contentColor = MaterialTheme.colorScheme.primary + ) ) { when (downloadStatus) { DownloadStatus.DOWNLOADING -> { diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/SongRow.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/SongRow.kt index fe07baee6..5dc3d1440 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/SongRow.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/SongRow.kt @@ -138,7 +138,7 @@ fun CollectionDetailScreenSongRow( onLongClick = onLongClick, shapes = itemShape, colors = ListItemDefaults.segmentedColors( - containerColor = MaterialTheme.colorScheme.surfaceContainer + containerColor = MaterialTheme.colorScheme.surfaceContainerHigh ), leadingContent = { if (isPlaylist) diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/TopBar.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/TopBar.kt index f0fd260d6..1e86db493 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/TopBar.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/collection/components/TopBar.kt @@ -1,8 +1,10 @@ package paige.navic.ui.screens.collection.components import androidx.compose.foundation.layout.Box +import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.Text +import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -11,6 +13,7 @@ import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha +import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.text.style.TextOverflow import androidx.lifecycle.compose.dropUnlessResumed @@ -32,6 +35,7 @@ import paige.navic.ui.components.sheets.CollectionSheet import paige.navic.ui.screens.playlist.dialogs.PlaylistUpdateDialog import paige.navic.ui.core.UiState +@OptIn(ExperimentalMaterial3Api::class) @Composable fun CollectionDetailScreenTopBar( collection: DomainSongCollection?, @@ -62,6 +66,10 @@ fun CollectionDetailScreenTopBar( modifier = Modifier.alpha(titleAlpha) ) }, + colors = TopAppBarDefaults.topAppBarColors( + containerColor = Color.Transparent, + scrolledContainerColor = Color.Transparent + ), actions = { Box { var expanded by remember { mutableStateOf(false) } diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/settings/AppearanceScreen.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/settings/AppearanceScreen.kt index c6145b632..a61fd4124 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/settings/AppearanceScreen.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/screens/settings/AppearanceScreen.kt @@ -45,6 +45,7 @@ import navic.composeapp.generated.resources.option_animation_style import navic.composeapp.generated.resources.option_artwork_shape import navic.composeapp.generated.resources.option_choose_theme import navic.composeapp.generated.resources.option_cover_art_size +import navic.composeapp.generated.resources.option_dynamic_themes import navic.composeapp.generated.resources.option_grid_items_per_row import navic.composeapp.generated.resources.option_use_marquee_text import navic.composeapp.generated.resources.title_appearance @@ -265,6 +266,12 @@ fun SettingsAppearanceScreen() { FormTitle(stringResource(Res.string.title_miscellaneous)) Form { + SettingSwitchRow( + title = { Text(stringResource(Res.string.option_dynamic_themes)) }, + value = preferenceManager.dynamicThemes, + onSetValue = { preferenceManager.dynamicThemes = it } + ) + SettingSelectionRow( title = { Text(stringResource(Res.string.option_use_marquee_text)) }, items = MarqueeSpeed.entries.toImmutableList(), diff --git a/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt b/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt new file mode 100644 index 000000000..187bafaca --- /dev/null +++ b/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt @@ -0,0 +1,92 @@ +package paige.navic.util.color + +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.ColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.graphics.Color +import coil3.compose.LocalPlatformContext +import coil3.request.ImageRequest +import coil3.request.SuccessResult +import com.kmpalette.color +import com.kmpalette.palette.graphics.Palette +import com.materialkolor.PaletteStyle +import com.materialkolor.dynamiccolor.ColorSpec +import com.materialkolor.rememberDynamicColorScheme +import org.koin.compose.koinInject +import paige.navic.di.getStaticImageLoader +import paige.navic.domain.manager.PreferenceManager +import paige.navic.domain.manager.SessionManager +import paige.navic.domain.models.settings.ThemeMode +import paige.navic.domain.manager.CoverColorManager + +@Composable +fun rememberCoverColorScheme(coverArtId: String?): ColorScheme { + val sessionManager = koinInject() + val colorManager = koinInject() + val preferenceManager = koinInject() + val inDarkTheme = isSystemInDarkTheme() + + val isDark = remember(preferenceManager.themeMode, inDarkTheme) { + when (preferenceManager.themeMode) { + ThemeMode.System -> inDarkTheme + ThemeMode.Dark -> true + ThemeMode.Light -> false + } + } + + val coverUri = remember(coverArtId) { + coverArtId?.let { sessionManager.getCoverArtUrl(it) } + } + + val coilContext = LocalPlatformContext.current + val imageLoader = remember(coilContext) { getStaticImageLoader(coilContext) } + + var dominantColor by remember(coverArtId) { + mutableStateOf(coverArtId?.let { colorManager.getColor(it) } ?: Color.Transparent) + } + + val scheme = rememberDynamicColorScheme( + seedColor = dominantColor, + isDark = isDark, + style = if (coverUri != null) PaletteStyle.Content else PaletteStyle.Monochrome, + specVersion = ColorSpec.SpecVersion.SPEC_2021, + modifyColorScheme = { baseScheme -> + if (dominantColor != Color.Transparent) { + baseScheme.copy( + surface = baseScheme.surfaceContainer, + background = baseScheme.surfaceContainer, + ) + } else { + baseScheme + } + } + ) + + LaunchedEffect(coverUri, coverArtId) { + if (coverUri != null && coverArtId != null && dominantColor == Color.Transparent) { + val request = ImageRequest.Builder(coilContext) + .data(coverUri) + .diskCacheKey(coverArtId) + .size(128) + .build() + + val result = imageLoader.execute(request) + if (result is SuccessResult) { + val bitmap = result.image.toComposeImageBitmap(coilContext) + val palette = Palette.from(bitmap).generate() + val color = palette.dominantSwatch?.color ?: Color.Transparent + dominantColor = color + colorManager.putColor(coverArtId, color) + } + } else if (coverArtId == null) { + dominantColor = Color.Transparent + } + } + + return scheme +} From 8c75222178115ea11365d3066e263577ea12a7b6 Mon Sep 17 00:00:00 2001 From: Heropowwa Date: Sun, 14 Jun 2026 11:58:23 +0200 Subject: [PATCH 4/6] feat: cache cover Color by id in Database --- .../16.json | 733 ++++++++++++++++++ .../navic/data/database/CacheDatabase.kt | 8 +- .../navic/data/database/dao/CoverColorDao.kt | 16 + .../database/entities/CoverColorEntity.kt | 10 + .../kotlin/paige/navic/di/DatabaseModule.kt | 1 + .../navic/domain/manager/CoverColorManager.kt | 21 +- .../navic/util/color/CoverColorScheme.kt | 15 +- 7 files changed, 796 insertions(+), 8 deletions(-) create mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/16.json create mode 100644 composeApp/src/commonMain/kotlin/paige/navic/data/database/dao/CoverColorDao.kt create mode 100644 composeApp/src/commonMain/kotlin/paige/navic/data/database/entities/CoverColorEntity.kt diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/16.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/16.json new file mode 100644 index 000000000..b4f66ae3f --- /dev/null +++ b/composeApp/schemas/paige.navic.data.database.CacheDatabase/16.json @@ -0,0 +1,733 @@ +{ + "formatVersion": 1, + "database": { + "version": 16, + "identityHash": "fcce187fc9829230412dfbbc0b96dbe3", + "entities": [ + { + "tableName": "AlbumEntity", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", + "fields": [ + { + "fieldPath": "albumId", + "columnName": "albumId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "artistName", + "columnName": "artistName", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "artistId", + "columnName": "artistId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "year", + "columnName": "year", + "affinity": "INTEGER" + }, + { + "fieldPath": "coverArtId", + "columnName": "coverArtId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "genre", + "columnName": "genre", + "affinity": "TEXT" + }, + { + "fieldPath": "genres", + "columnName": "genres", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "songCount", + "columnName": "songCount", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "duration", + "columnName": "duration", + "affinity": "INTEGER" + }, + { + "fieldPath": "createdAt", + "columnName": "createdAt", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "starredAt", + "columnName": "starredAt", + "affinity": "INTEGER" + }, + { + "fieldPath": "lastPlayedAt", + "columnName": "lastPlayedAt", + "affinity": "INTEGER" + }, + { + "fieldPath": "playCount", + "columnName": "playCount", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "userRating", + "columnName": "userRating", + "affinity": "INTEGER" + }, + { + "fieldPath": "version", + "columnName": "version", + "affinity": "TEXT" + }, + { + "fieldPath": "musicBrainzId", + "columnName": "musicBrainzId", + "affinity": "TEXT" + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "albumId" + ] + } + }, + { + "tableName": "GenreEntity", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", + "fields": [ + { + "fieldPath": "genreName", + "columnName": "genreName", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "albumCount", + "columnName": "albumCount", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "songCount", + "columnName": "songCount", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "genreName" + ] + } + }, + { + "tableName": "PlaylistEntity", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", + "fields": [ + { + "fieldPath": "playlistId", + "columnName": "playlistId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "comment", + "columnName": "comment", + "affinity": "TEXT" + }, + { + "fieldPath": "owner", + "columnName": "owner", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "coverArtId", + "columnName": "coverArtId", + "affinity": "TEXT" + }, + { + "fieldPath": "songCount", + "columnName": "songCount", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "duration", + "columnName": "duration", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "public", + "columnName": "public", + "affinity": "INTEGER" + }, + { + "fieldPath": "readOnly", + "columnName": "readOnly", + "affinity": "INTEGER" + }, + { + "fieldPath": "createdAt", + "columnName": "createdAt", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "modifiedAt", + "columnName": "modifiedAt", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "validUntil", + "columnName": "validUntil", + "affinity": "INTEGER" + }, + { + "fieldPath": "allowedUsers", + "columnName": "allowedUsers", + "affinity": "TEXT", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "playlistId" + ] + } + }, + { + "tableName": "PlaylistSongCrossRef", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlistId`, `songId`, `position`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", + "fields": [ + { + "fieldPath": "playlistId", + "columnName": "playlistId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "songId", + "columnName": "songId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "position", + "columnName": "position", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "playlistId", + "songId", + "position" + ] + }, + "indices": [ + { + "name": "index_PlaylistSongCrossRef_songId", + "unique": false, + "columnNames": [ + "songId" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `index_PlaylistSongCrossRef_songId` ON `${TABLE_NAME}` (`songId`)" + } + ], + "foreignKeys": [ + { + "table": "PlaylistEntity", + "onDelete": "CASCADE", + "onUpdate": "NO ACTION", + "columns": [ + "playlistId" + ], + "referencedColumns": [ + "playlistId" + ] + }, + { + "table": "SongEntity", + "onDelete": "CASCADE", + "onUpdate": "NO ACTION", + "columns": [ + "songId" + ], + "referencedColumns": [ + "songId" + ] + } + ] + }, + { + "tableName": "SongEntity", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, `explicitStatus` INTEGER NOT NULL, PRIMARY KEY(`songId`))", + "fields": [ + { + "fieldPath": "songId", + "columnName": "songId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "artistName", + "columnName": "artistName", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "artistId", + "columnName": "artistId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "albumTitle", + "columnName": "albumTitle", + "affinity": "TEXT" + }, + { + "fieldPath": "belongsToAlbumId", + "columnName": "belongsToAlbumId", + "affinity": "TEXT" + }, + { + "fieldPath": "parentId", + "columnName": "parentId", + "affinity": "TEXT" + }, + { + "fieldPath": "comment", + "columnName": "comment", + "affinity": "TEXT" + }, + { + "fieldPath": "trackNumber", + "columnName": "trackNumber", + "affinity": "INTEGER" + }, + { + "fieldPath": "discNumber", + "columnName": "discNumber", + "affinity": "INTEGER" + }, + { + "fieldPath": "isrc", + "columnName": "isrc", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "year", + "columnName": "year", + "affinity": "INTEGER" + }, + { + "fieldPath": "genre", + "columnName": "genre", + "affinity": "TEXT" + }, + { + "fieldPath": "genres", + "columnName": "genres", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "moods", + "columnName": "moods", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "duration", + "columnName": "duration", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "bpm", + "columnName": "bpm", + "affinity": "INTEGER" + }, + { + "fieldPath": "contributors", + "columnName": "contributors", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "playCount", + "columnName": "playCount", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "userRating", + "columnName": "userRating", + "affinity": "INTEGER" + }, + { + "fieldPath": "averageRating", + "columnName": "averageRating", + "affinity": "REAL" + }, + { + "fieldPath": "bitRate", + "columnName": "bitRate", + "affinity": "INTEGER" + }, + { + "fieldPath": "bitDepth", + "columnName": "bitDepth", + "affinity": "INTEGER" + }, + { + "fieldPath": "sampleRate", + "columnName": "sampleRate", + "affinity": "INTEGER" + }, + { + "fieldPath": "audioChannelCount", + "columnName": "audioChannelCount", + "affinity": "INTEGER" + }, + { + "fieldPath": "replayGain", + "columnName": "replayGain", + "affinity": "TEXT" + }, + { + "fieldPath": "fileSize", + "columnName": "fileSize", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "fileExtension", + "columnName": "fileExtension", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "mimeType", + "columnName": "mimeType", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "filePath", + "columnName": "filePath", + "affinity": "TEXT" + }, + { + "fieldPath": "starredAt", + "columnName": "starredAt", + "affinity": "INTEGER" + }, + { + "fieldPath": "coverArtId", + "columnName": "coverArtId", + "affinity": "TEXT" + }, + { + "fieldPath": "musicBrainzId", + "columnName": "musicBrainzId", + "affinity": "TEXT" + }, + { + "fieldPath": "explicitStatus", + "columnName": "explicitStatus", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "songId" + ] + } + }, + { + "tableName": "ArtistEntity", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", + "fields": [ + { + "fieldPath": "artistId", + "columnName": "artistId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "albumCount", + "columnName": "albumCount", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "coverArtId", + "columnName": "coverArtId", + "affinity": "TEXT" + }, + { + "fieldPath": "artistImageUrl", + "columnName": "artistImageUrl", + "affinity": "TEXT" + }, + { + "fieldPath": "starredAt", + "columnName": "starredAt", + "affinity": "INTEGER" + }, + { + "fieldPath": "userRating", + "columnName": "userRating", + "affinity": "INTEGER" + }, + { + "fieldPath": "sortName", + "columnName": "sortName", + "affinity": "TEXT" + }, + { + "fieldPath": "musicBrainzId", + "columnName": "musicBrainzId", + "affinity": "TEXT" + }, + { + "fieldPath": "lastFmUrl", + "columnName": "lastFmUrl", + "affinity": "TEXT" + }, + { + "fieldPath": "roles", + "columnName": "roles", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "biography", + "columnName": "biography", + "affinity": "TEXT" + }, + { + "fieldPath": "similarArtistIds", + "columnName": "similarArtistIds", + "affinity": "TEXT", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "artistId" + ] + } + }, + { + "tableName": "RadioEntity", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`radioId` TEXT NOT NULL, `name` TEXT NOT NULL, `streamUrl` TEXT NOT NULL, `homepageUrl` TEXT, PRIMARY KEY(`radioId`))", + "fields": [ + { + "fieldPath": "radioId", + "columnName": "radioId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "streamUrl", + "columnName": "streamUrl", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "homepageUrl", + "columnName": "homepageUrl", + "affinity": "TEXT" + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "radioId" + ] + } + }, + { + "tableName": "LyricEntity", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", + "fields": [ + { + "fieldPath": "songId", + "columnName": "songId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "rawContent", + "columnName": "rawContent", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "provider", + "columnName": "provider", + "affinity": "TEXT", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "songId" + ] + } + }, + { + "tableName": "SyncActionEntity", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "actionType", + "columnName": "actionType", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "itemId", + "columnName": "itemId", + "affinity": "TEXT", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "id" + ] + } + }, + { + "tableName": "DownloadEntity", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `status` TEXT NOT NULL, `progress` REAL NOT NULL, `filePath` TEXT, PRIMARY KEY(`songId`))", + "fields": [ + { + "fieldPath": "songId", + "columnName": "songId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "status", + "columnName": "status", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "progress", + "columnName": "progress", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "filePath", + "columnName": "filePath", + "affinity": "TEXT" + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "songId" + ] + } + }, + { + "tableName": "cover_colors", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`coverArtId` TEXT NOT NULL, `color` INTEGER NOT NULL, PRIMARY KEY(`coverArtId`))", + "fields": [ + { + "fieldPath": "coverArtId", + "columnName": "coverArtId", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "color", + "columnName": "color", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "coverArtId" + ] + } + } + ], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'fcce187fc9829230412dfbbc0b96dbe3')" + ] + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/paige/navic/data/database/CacheDatabase.kt b/composeApp/src/commonMain/kotlin/paige/navic/data/database/CacheDatabase.kt index e3b6489ca..eee7acda6 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/data/database/CacheDatabase.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/data/database/CacheDatabase.kt @@ -7,6 +7,7 @@ import androidx.room3.RoomDatabaseConstructor import androidx.room3.TypeConverters import paige.navic.data.database.dao.AlbumDao import paige.navic.data.database.dao.ArtistDao +import paige.navic.data.database.dao.CoverColorDao import paige.navic.data.database.dao.DownloadDao import paige.navic.data.database.dao.GenreDao import paige.navic.data.database.dao.LyricDao @@ -16,6 +17,7 @@ import paige.navic.data.database.dao.SongDao import paige.navic.data.database.dao.SyncActionDao import paige.navic.data.database.entities.AlbumEntity import paige.navic.data.database.entities.ArtistEntity +import paige.navic.data.database.entities.CoverColorEntity import paige.navic.data.database.entities.DownloadEntity import paige.navic.data.database.entities.GenreEntity import paige.navic.data.database.entities.LyricEntity @@ -26,7 +28,7 @@ import paige.navic.data.database.entities.SongEntity import paige.navic.data.database.entities.SyncActionEntity @Database( - version = 15, + version = 16, entities = [ AlbumEntity::class, GenreEntity::class, @@ -37,7 +39,8 @@ import paige.navic.data.database.entities.SyncActionEntity RadioEntity::class, LyricEntity::class, SyncActionEntity::class, - DownloadEntity::class + DownloadEntity::class, + CoverColorEntity::class ] ) @TypeConverters(Converters::class) @@ -52,6 +55,7 @@ abstract class CacheDatabase : RoomDatabase() { abstract fun radioDao(): RadioDao abstract fun lyricDao(): LyricDao abstract fun syncActionDao(): SyncActionDao + abstract fun coverColorDao(): CoverColorDao } @Suppress("KotlinNoActualForExpect") diff --git a/composeApp/src/commonMain/kotlin/paige/navic/data/database/dao/CoverColorDao.kt b/composeApp/src/commonMain/kotlin/paige/navic/data/database/dao/CoverColorDao.kt new file mode 100644 index 000000000..631e88018 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/paige/navic/data/database/dao/CoverColorDao.kt @@ -0,0 +1,16 @@ +package paige.navic.data.database.dao + +import androidx.room3.Dao +import androidx.room3.Insert +import androidx.room3.OnConflictStrategy +import androidx.room3.Query +import paige.navic.data.database.entities.CoverColorEntity + +@Dao +interface CoverColorDao { + @Query("SELECT * FROM cover_colors WHERE coverArtId = :coverArtId") + suspend fun getColor(coverArtId: String): CoverColorEntity? + + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertColor(color: CoverColorEntity) +} diff --git a/composeApp/src/commonMain/kotlin/paige/navic/data/database/entities/CoverColorEntity.kt b/composeApp/src/commonMain/kotlin/paige/navic/data/database/entities/CoverColorEntity.kt new file mode 100644 index 000000000..0cea4a7e5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/paige/navic/data/database/entities/CoverColorEntity.kt @@ -0,0 +1,10 @@ +package paige.navic.data.database.entities + +import androidx.room3.Entity +import androidx.room3.PrimaryKey + +@Entity(tableName = "cover_colors") +data class CoverColorEntity( + @PrimaryKey val coverArtId: String, + val color: Int +) diff --git a/composeApp/src/commonMain/kotlin/paige/navic/di/DatabaseModule.kt b/composeApp/src/commonMain/kotlin/paige/navic/di/DatabaseModule.kt index e3ba01777..e10de04bb 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/di/DatabaseModule.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/di/DatabaseModule.kt @@ -16,4 +16,5 @@ val databaseModule = module { single { get().lyricDao() } single { get().syncActionDao() } single { get().downloadDao() } + single { get().coverColorDao() } } diff --git a/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/CoverColorManager.kt b/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/CoverColorManager.kt index 06b2a80c1..4ee43d603 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/CoverColorManager.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/domain/manager/CoverColorManager.kt @@ -1,12 +1,27 @@ package paige.navic.domain.manager import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.toArgb +import paige.navic.data.database.dao.CoverColorDao +import paige.navic.data.database.entities.CoverColorEntity -class CoverColorManager { +class CoverColorManager( + private val coverColorDao: CoverColorDao +) { private val colorCache = mutableMapOf() - fun getColor(coverArtId: String): Color? = colorCache[coverArtId] - fun putColor(coverArtId: String, color: Color) { + suspend fun getColor(coverArtId: String): Color? { + colorCache[coverArtId]?.let { return it } + + return coverColorDao.getColor(coverArtId)?.let { + val color = Color(it.color) + colorCache[coverArtId] = color + color + } + } + + suspend fun putColor(coverArtId: String, color: Color) { colorCache[coverArtId] = color + coverColorDao.insertColor(CoverColorEntity(coverArtId, color.toArgb())) } } diff --git a/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt b/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt index 187bafaca..50f1f1fec 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt @@ -47,7 +47,18 @@ fun rememberCoverColorScheme(coverArtId: String?): ColorScheme { val imageLoader = remember(coilContext) { getStaticImageLoader(coilContext) } var dominantColor by remember(coverArtId) { - mutableStateOf(coverArtId?.let { colorManager.getColor(it) } ?: Color.Transparent) + mutableStateOf(Color.Transparent) + } + + LaunchedEffect(coverArtId) { + if (coverArtId != null) { + val cachedColor = colorManager.getColor(coverArtId) + if (cachedColor != null) { + dominantColor = cachedColor + } + } else { + dominantColor = Color.Transparent + } } val scheme = rememberDynamicColorScheme( @@ -83,8 +94,6 @@ fun rememberCoverColorScheme(coverArtId: String?): ColorScheme { dominantColor = color colorManager.putColor(coverArtId, color) } - } else if (coverArtId == null) { - dominantColor = Color.Transparent } } From 402c5b6946148070408f28742d5a1d11c47fa4be Mon Sep 17 00:00:00 2001 From: Heropowwa Date: Sun, 14 Jun 2026 11:58:37 +0200 Subject: [PATCH 5/6] chore: clear old db jsons --- .../1.json | 650 ---------------- .../12.json | 709 ------------------ .../13.json | 709 ------------------ .../15.json | 709 ------------------ .../2.json | 650 ---------------- .../3.json | 657 ---------------- .../4.json | 622 --------------- .../5.json | 668 ----------------- .../6.json | 668 ----------------- .../7.json | 703 ----------------- .../8.json | 709 ------------------ 11 files changed, 7454 deletions(-) delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/1.json delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/12.json delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/13.json delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/15.json delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/2.json delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/3.json delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/4.json delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/5.json delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/6.json delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/7.json delete mode 100644 composeApp/schemas/paige.navic.data.database.CacheDatabase/8.json diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/1.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/1.json deleted file mode 100644 index cc15084e0..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/1.json +++ /dev/null @@ -1,650 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 1, - "identityHash": "8ae8f82be963c91262ce33576a4a9fd4", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, PRIMARY KEY(`playlistId`, `songId`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId" - ] - }, - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - }, - { - "tableName": "DownloadEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `status` TEXT NOT NULL, `progress` REAL NOT NULL, `filePath` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "status", - "columnName": "status", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '8ae8f82be963c91262ce33576a4a9fd4')" - ] - } -} diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/12.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/12.json deleted file mode 100644 index 4f588b8c4..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/12.json +++ /dev/null @@ -1,709 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 12, - "identityHash": "a5633d3b6a05443bd78e74863bdf920e", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlistId`, `songId`, `position`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "position", - "columnName": "position", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId", - "position" - ] - }, - "indices": [ - { - "name": "index_PlaylistSongCrossRef_songId", - "unique": false, - "columnNames": [ - "songId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_PlaylistSongCrossRef_songId` ON `${TABLE_NAME}` (`songId`)" - } - ], - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, `explicitStatus` INTEGER NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "explicitStatus", - "columnName": "explicitStatus", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "RadioEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`radioId` TEXT NOT NULL, `name` TEXT NOT NULL, `streamUrl` TEXT NOT NULL, `homepageUrl` TEXT, PRIMARY KEY(`radioId`))", - "fields": [ - { - "fieldPath": "radioId", - "columnName": "radioId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "streamUrl", - "columnName": "streamUrl", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "homepageUrl", - "columnName": "homepageUrl", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "radioId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - }, - { - "tableName": "DownloadEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `status` TEXT NOT NULL, `progress` REAL NOT NULL, `filePath` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "status", - "columnName": "status", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a5633d3b6a05443bd78e74863bdf920e')" - ] - } -} \ No newline at end of file diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/13.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/13.json deleted file mode 100644 index 7c54d8515..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/13.json +++ /dev/null @@ -1,709 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 13, - "identityHash": "a5633d3b6a05443bd78e74863bdf920e", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlistId`, `songId`, `position`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "position", - "columnName": "position", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId", - "position" - ] - }, - "indices": [ - { - "name": "index_PlaylistSongCrossRef_songId", - "unique": false, - "columnNames": [ - "songId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_PlaylistSongCrossRef_songId` ON `${TABLE_NAME}` (`songId`)" - } - ], - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, `explicitStatus` INTEGER NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "explicitStatus", - "columnName": "explicitStatus", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "RadioEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`radioId` TEXT NOT NULL, `name` TEXT NOT NULL, `streamUrl` TEXT NOT NULL, `homepageUrl` TEXT, PRIMARY KEY(`radioId`))", - "fields": [ - { - "fieldPath": "radioId", - "columnName": "radioId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "streamUrl", - "columnName": "streamUrl", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "homepageUrl", - "columnName": "homepageUrl", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "radioId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - }, - { - "tableName": "DownloadEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `status` TEXT NOT NULL, `progress` REAL NOT NULL, `filePath` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "status", - "columnName": "status", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a5633d3b6a05443bd78e74863bdf920e')" - ] - } -} \ No newline at end of file diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/15.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/15.json deleted file mode 100644 index 2357a2d29..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/15.json +++ /dev/null @@ -1,709 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 15, - "identityHash": "a5633d3b6a05443bd78e74863bdf920e", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlistId`, `songId`, `position`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "position", - "columnName": "position", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId", - "position" - ] - }, - "indices": [ - { - "name": "index_PlaylistSongCrossRef_songId", - "unique": false, - "columnNames": [ - "songId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_PlaylistSongCrossRef_songId` ON `${TABLE_NAME}` (`songId`)" - } - ], - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, `explicitStatus` INTEGER NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "explicitStatus", - "columnName": "explicitStatus", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "RadioEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`radioId` TEXT NOT NULL, `name` TEXT NOT NULL, `streamUrl` TEXT NOT NULL, `homepageUrl` TEXT, PRIMARY KEY(`radioId`))", - "fields": [ - { - "fieldPath": "radioId", - "columnName": "radioId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "streamUrl", - "columnName": "streamUrl", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "homepageUrl", - "columnName": "homepageUrl", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "radioId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - }, - { - "tableName": "DownloadEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `status` TEXT NOT NULL, `progress` REAL NOT NULL, `filePath` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "status", - "columnName": "status", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a5633d3b6a05443bd78e74863bdf920e')" - ] - } -} \ No newline at end of file diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/2.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/2.json deleted file mode 100644 index 268ee3c64..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/2.json +++ /dev/null @@ -1,650 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 2, - "identityHash": "07af20883f1fea32c4cca27d19214808", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, PRIMARY KEY(`playlistId`, `songId`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId" - ] - }, - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - }, - { - "tableName": "DownloadEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `status` TEXT NOT NULL, `progress` REAL NOT NULL, `filePath` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "status", - "columnName": "status", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '07af20883f1fea32c4cca27d19214808')" - ] - } -} \ No newline at end of file diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/3.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/3.json deleted file mode 100644 index f234a793e..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/3.json +++ /dev/null @@ -1,657 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 3, - "identityHash": "a57f2b57aa6ff1c401f94513dfd6492d", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlistId`, `songId`, `position`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "position", - "columnName": "position", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId", - "position" - ] - }, - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - }, - { - "tableName": "DownloadEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `status` TEXT NOT NULL, `progress` REAL NOT NULL, `filePath` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "status", - "columnName": "status", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a57f2b57aa6ff1c401f94513dfd6492d')" - ] - } -} \ No newline at end of file diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/4.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/4.json deleted file mode 100644 index a53634776..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/4.json +++ /dev/null @@ -1,622 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 4, - "identityHash": "b655b2cf1cf7c2fee316a2744649db1f", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlistId`, `songId`, `position`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "position", - "columnName": "position", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId", - "position" - ] - }, - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'b655b2cf1cf7c2fee316a2744649db1f')" - ] - } -} diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/5.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/5.json deleted file mode 100644 index 2cf89a4d9..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/5.json +++ /dev/null @@ -1,668 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 5, - "identityHash": "6dba8c36f4e3b37c513ad73352c26ec6", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlistId`, `songId`, `position`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "position", - "columnName": "position", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId", - "position" - ] - }, - "indices": [ - { - "name": "index_PlaylistSongCrossRef_songId", - "unique": false, - "columnNames": [ - "songId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_PlaylistSongCrossRef_songId` ON `${TABLE_NAME}` (`songId`)" - } - ], - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "RadioEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`radioId` TEXT NOT NULL, `name` TEXT NOT NULL, `streamUrl` TEXT NOT NULL, `homepageUrl` TEXT, PRIMARY KEY(`radioId`))", - "fields": [ - { - "fieldPath": "radioId", - "columnName": "radioId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "streamUrl", - "columnName": "streamUrl", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "homepageUrl", - "columnName": "homepageUrl", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "radioId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '6dba8c36f4e3b37c513ad73352c26ec6')" - ] - } -} \ No newline at end of file diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/6.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/6.json deleted file mode 100644 index 5b64abd1f..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/6.json +++ /dev/null @@ -1,668 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 6, - "identityHash": "6dba8c36f4e3b37c513ad73352c26ec6", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlistId`, `songId`, `position`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "position", - "columnName": "position", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId", - "position" - ] - }, - "indices": [ - { - "name": "index_PlaylistSongCrossRef_songId", - "unique": false, - "columnNames": [ - "songId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_PlaylistSongCrossRef_songId` ON `${TABLE_NAME}` (`songId`)" - } - ], - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "RadioEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`radioId` TEXT NOT NULL, `name` TEXT NOT NULL, `streamUrl` TEXT NOT NULL, `homepageUrl` TEXT, PRIMARY KEY(`radioId`))", - "fields": [ - { - "fieldPath": "radioId", - "columnName": "radioId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "streamUrl", - "columnName": "streamUrl", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "homepageUrl", - "columnName": "homepageUrl", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "radioId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '6dba8c36f4e3b37c513ad73352c26ec6')" - ] - } -} \ No newline at end of file diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/7.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/7.json deleted file mode 100644 index 43fa9ec5b..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/7.json +++ /dev/null @@ -1,703 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 7, - "identityHash": "626e63a4bc6eeff94a0f432894f14f00", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlistId`, `songId`, `position`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "position", - "columnName": "position", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId", - "position" - ] - }, - "indices": [ - { - "name": "index_PlaylistSongCrossRef_songId", - "unique": false, - "columnNames": [ - "songId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_PlaylistSongCrossRef_songId` ON `${TABLE_NAME}` (`songId`)" - } - ], - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "RadioEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`radioId` TEXT NOT NULL, `name` TEXT NOT NULL, `streamUrl` TEXT NOT NULL, `homepageUrl` TEXT, PRIMARY KEY(`radioId`))", - "fields": [ - { - "fieldPath": "radioId", - "columnName": "radioId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "streamUrl", - "columnName": "streamUrl", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "homepageUrl", - "columnName": "homepageUrl", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "radioId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - }, - { - "tableName": "DownloadEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `status` TEXT NOT NULL, `progress` REAL NOT NULL, `filePath` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "status", - "columnName": "status", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '626e63a4bc6eeff94a0f432894f14f00')" - ] - } -} \ No newline at end of file diff --git a/composeApp/schemas/paige.navic.data.database.CacheDatabase/8.json b/composeApp/schemas/paige.navic.data.database.CacheDatabase/8.json deleted file mode 100644 index 1e657cafe..000000000 --- a/composeApp/schemas/paige.navic.data.database.CacheDatabase/8.json +++ /dev/null @@ -1,709 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 8, - "identityHash": "a5633d3b6a05443bd78e74863bdf920e", - "entities": [ - { - "tableName": "AlbumEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` TEXT NOT NULL, `name` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `year` INTEGER, `coverArtId` TEXT NOT NULL, `genre` TEXT, `genres` TEXT NOT NULL, `songCount` INTEGER NOT NULL, `duration` INTEGER, `createdAt` INTEGER NOT NULL, `starredAt` INTEGER, `lastPlayedAt` INTEGER, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `version` TEXT, `musicBrainzId` TEXT, PRIMARY KEY(`albumId`))", - "fields": [ - { - "fieldPath": "albumId", - "columnName": "albumId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "lastPlayedAt", - "columnName": "lastPlayedAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "albumId" - ] - } - }, - { - "tableName": "GenreEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`genreName` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `songCount` INTEGER NOT NULL, PRIMARY KEY(`genreName`))", - "fields": [ - { - "fieldPath": "genreName", - "columnName": "genreName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "genreName" - ] - } - }, - { - "tableName": "PlaylistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT NOT NULL, `coverArtId` TEXT, `songCount` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER, `readOnly` INTEGER, `createdAt` INTEGER NOT NULL, `modifiedAt` INTEGER NOT NULL, `validUntil` INTEGER, `allowedUsers` TEXT NOT NULL, PRIMARY KEY(`playlistId`))", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "owner", - "columnName": "owner", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "songCount", - "columnName": "songCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "public", - "columnName": "public", - "affinity": "INTEGER" - }, - { - "fieldPath": "readOnly", - "columnName": "readOnly", - "affinity": "INTEGER" - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "modifiedAt", - "columnName": "modifiedAt", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "validUntil", - "columnName": "validUntil", - "affinity": "INTEGER" - }, - { - "fieldPath": "allowedUsers", - "columnName": "allowedUsers", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId" - ] - } - }, - { - "tableName": "PlaylistSongCrossRef", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlistId` TEXT NOT NULL, `songId` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlistId`, `songId`, `position`), FOREIGN KEY(`playlistId`) REFERENCES `PlaylistEntity`(`playlistId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`songId`) REFERENCES `SongEntity`(`songId`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "playlistId", - "columnName": "playlistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "position", - "columnName": "position", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "playlistId", - "songId", - "position" - ] - }, - "indices": [ - { - "name": "index_PlaylistSongCrossRef_songId", - "unique": false, - "columnNames": [ - "songId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_PlaylistSongCrossRef_songId` ON `${TABLE_NAME}` (`songId`)" - } - ], - "foreignKeys": [ - { - "table": "PlaylistEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "playlistId" - ], - "referencedColumns": [ - "playlistId" - ] - }, - { - "table": "SongEntity", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "songId" - ], - "referencedColumns": [ - "songId" - ] - } - ] - }, - { - "tableName": "SongEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `title` TEXT NOT NULL, `artistName` TEXT NOT NULL, `artistId` TEXT NOT NULL, `albumTitle` TEXT, `belongsToAlbumId` TEXT, `parentId` TEXT, `comment` TEXT, `trackNumber` INTEGER, `discNumber` INTEGER, `isrc` TEXT NOT NULL, `year` INTEGER, `genre` TEXT, `genres` TEXT NOT NULL, `moods` TEXT NOT NULL, `duration` INTEGER NOT NULL, `bpm` INTEGER, `contributors` TEXT NOT NULL, `playCount` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `bitRate` INTEGER, `bitDepth` INTEGER, `sampleRate` INTEGER, `audioChannelCount` INTEGER, `replayGain` TEXT, `fileSize` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, `mimeType` TEXT NOT NULL, `filePath` TEXT, `starredAt` INTEGER, `coverArtId` TEXT, `musicBrainzId` TEXT, `explicitStatus` INTEGER NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "title", - "columnName": "title", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistName", - "columnName": "artistName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumTitle", - "columnName": "albumTitle", - "affinity": "TEXT" - }, - { - "fieldPath": "belongsToAlbumId", - "columnName": "belongsToAlbumId", - "affinity": "TEXT" - }, - { - "fieldPath": "parentId", - "columnName": "parentId", - "affinity": "TEXT" - }, - { - "fieldPath": "comment", - "columnName": "comment", - "affinity": "TEXT" - }, - { - "fieldPath": "trackNumber", - "columnName": "trackNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "discNumber", - "columnName": "discNumber", - "affinity": "INTEGER" - }, - { - "fieldPath": "isrc", - "columnName": "isrc", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "year", - "columnName": "year", - "affinity": "INTEGER" - }, - { - "fieldPath": "genre", - "columnName": "genre", - "affinity": "TEXT" - }, - { - "fieldPath": "genres", - "columnName": "genres", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "moods", - "columnName": "moods", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "bpm", - "columnName": "bpm", - "affinity": "INTEGER" - }, - { - "fieldPath": "contributors", - "columnName": "contributors", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "playCount", - "columnName": "playCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "averageRating", - "columnName": "averageRating", - "affinity": "REAL" - }, - { - "fieldPath": "bitRate", - "columnName": "bitRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "bitDepth", - "columnName": "bitDepth", - "affinity": "INTEGER" - }, - { - "fieldPath": "sampleRate", - "columnName": "sampleRate", - "affinity": "INTEGER" - }, - { - "fieldPath": "audioChannelCount", - "columnName": "audioChannelCount", - "affinity": "INTEGER" - }, - { - "fieldPath": "replayGain", - "columnName": "replayGain", - "affinity": "TEXT" - }, - { - "fieldPath": "fileSize", - "columnName": "fileSize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fileExtension", - "columnName": "fileExtension", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "mimeType", - "columnName": "mimeType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "explicitStatus", - "columnName": "explicitStatus", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "ArtistEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`artistId` TEXT NOT NULL, `name` TEXT NOT NULL, `albumCount` INTEGER NOT NULL, `coverArtId` TEXT, `artistImageUrl` TEXT, `starredAt` INTEGER, `userRating` INTEGER, `sortName` TEXT, `musicBrainzId` TEXT, `lastFmUrl` TEXT, `roles` TEXT NOT NULL, `biography` TEXT, `similarArtistIds` TEXT NOT NULL, PRIMARY KEY(`artistId`))", - "fields": [ - { - "fieldPath": "artistId", - "columnName": "artistId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "albumCount", - "columnName": "albumCount", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "coverArtId", - "columnName": "coverArtId", - "affinity": "TEXT" - }, - { - "fieldPath": "artistImageUrl", - "columnName": "artistImageUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "starredAt", - "columnName": "starredAt", - "affinity": "INTEGER" - }, - { - "fieldPath": "userRating", - "columnName": "userRating", - "affinity": "INTEGER" - }, - { - "fieldPath": "sortName", - "columnName": "sortName", - "affinity": "TEXT" - }, - { - "fieldPath": "musicBrainzId", - "columnName": "musicBrainzId", - "affinity": "TEXT" - }, - { - "fieldPath": "lastFmUrl", - "columnName": "lastFmUrl", - "affinity": "TEXT" - }, - { - "fieldPath": "roles", - "columnName": "roles", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "biography", - "columnName": "biography", - "affinity": "TEXT" - }, - { - "fieldPath": "similarArtistIds", - "columnName": "similarArtistIds", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "artistId" - ] - } - }, - { - "tableName": "RadioEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`radioId` TEXT NOT NULL, `name` TEXT NOT NULL, `streamUrl` TEXT NOT NULL, `homepageUrl` TEXT, PRIMARY KEY(`radioId`))", - "fields": [ - { - "fieldPath": "radioId", - "columnName": "radioId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "streamUrl", - "columnName": "streamUrl", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "homepageUrl", - "columnName": "homepageUrl", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "radioId" - ] - } - }, - { - "tableName": "LyricEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `rawContent` TEXT NOT NULL, `provider` TEXT NOT NULL, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "rawContent", - "columnName": "rawContent", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "provider", - "columnName": "provider", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - }, - { - "tableName": "SyncActionEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `actionType` TEXT NOT NULL, `itemId` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "actionType", - "columnName": "actionType", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "itemId", - "columnName": "itemId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - } - }, - { - "tableName": "DownloadEntity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` TEXT NOT NULL, `status` TEXT NOT NULL, `progress` REAL NOT NULL, `filePath` TEXT, PRIMARY KEY(`songId`))", - "fields": [ - { - "fieldPath": "songId", - "columnName": "songId", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "status", - "columnName": "status", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "filePath", - "columnName": "filePath", - "affinity": "TEXT" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "songId" - ] - } - } - ], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a5633d3b6a05443bd78e74863bdf920e')" - ] - } -} \ No newline at end of file From 929e650190c463d42c4c62bd558601d948c230e0 Mon Sep 17 00:00:00 2001 From: Heropowwa Date: Sun, 14 Jun 2026 19:35:16 +0200 Subject: [PATCH 6/6] feat: try to make white theming better --- .../navic/ui/components/common/BlendBackground.kt | 13 +++++++++++-- .../paige/navic/util/color/CoverColorScheme.kt | 10 ---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/paige/navic/ui/components/common/BlendBackground.kt b/composeApp/src/commonMain/kotlin/paige/navic/ui/components/common/BlendBackground.kt index 9b3447951..828ef3088 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/ui/components/common/BlendBackground.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/ui/components/common/BlendBackground.kt @@ -22,16 +22,17 @@ import androidx.compose.ui.draw.rotate import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.graphics.ColorMatrix +import androidx.compose.ui.graphics.luminance import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.unit.dp import coil3.compose.AsyncImage +import coil3.compose.LocalPlatformContext as LocalCoilPlatformContext import coil3.request.CachePolicy import coil3.request.ImageRequest import org.koin.compose.koinInject import paige.navic.di.getStaticImageLoader import paige.navic.domain.manager.SessionManager import kotlin.time.TimeSource -import coil3.compose.LocalPlatformContext as LocalCoilPlatformContext @Composable fun BlendBackground( @@ -85,6 +86,8 @@ fun BlendBackground( } } + val isLight = MaterialTheme.colorScheme.surface.luminance() > 0.5f + Box( modifier = modifier .fillMaxSize() @@ -146,7 +149,13 @@ fun BlendBackground( .fillMaxSize() .drawWithContent { drawContent() - drawRect(color = Color.Black.copy(alpha = 0.4f)) + drawRect( + color = if (isLight) { + Color.White.copy(alpha = 0.5f) + } else { + Color.Black.copy(alpha = 0.5f) + } + ) } ) } diff --git a/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt b/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt index 50f1f1fec..0e2538ec8 100644 --- a/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt +++ b/composeApp/src/commonMain/kotlin/paige/navic/util/color/CoverColorScheme.kt @@ -66,16 +66,6 @@ fun rememberCoverColorScheme(coverArtId: String?): ColorScheme { isDark = isDark, style = if (coverUri != null) PaletteStyle.Content else PaletteStyle.Monochrome, specVersion = ColorSpec.SpecVersion.SPEC_2021, - modifyColorScheme = { baseScheme -> - if (dominantColor != Color.Transparent) { - baseScheme.copy( - surface = baseScheme.surfaceContainer, - background = baseScheme.surfaceContainer, - ) - } else { - baseScheme - } - } ) LaunchedEffect(coverUri, coverArtId) {