diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1f56e9d..f54d057 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -91,6 +91,7 @@ dependencies { implementation(libs.room) kapt(libs.room.compiler) + annotationProcessor(libs.room.compiler) implementation(projects.youtubeMusic) implementation(projects.kugou) diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/AlbumScreen.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/AlbumScreen.kt index 0c9c1bd..cb6859a 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/AlbumScreen.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/AlbumScreen.kt @@ -10,15 +10,12 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.IntrinsicSize import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.WindowInsets -import androidx.compose.foundation.layout.asPaddingValues import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.systemBars import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.itemsIndexed diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/AboutScreen.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/AboutScreen.kt index 60a6c17..b6a39e1 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/AboutScreen.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/AboutScreen.kt @@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.runtime.Composable @@ -18,7 +17,6 @@ import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp -import coil.size.Dimension import it.vfsfitvnm.route.RouteHandler import it.vfsfitvnm.vimusic.BuildConfig import it.vfsfitvnm.vimusic.LocalPlayerAwarePaddingValues @@ -29,7 +27,6 @@ import it.vfsfitvnm.vimusic.ui.screens.SettingsEntry import it.vfsfitvnm.vimusic.ui.screens.SettingsEntryGroupText import it.vfsfitvnm.vimusic.ui.screens.SettingsTitle import it.vfsfitvnm.vimusic.ui.screens.globalRoutes -import it.vfsfitvnm.vimusic.ui.styling.Dimensions import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance @ExperimentalAnimationApi diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/AppearanceSettingsScreen.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/AppearanceSettingsScreen.kt index 6eebf5b..6a9af78 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/AppearanceSettingsScreen.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/AppearanceSettingsScreen.kt @@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.runtime.Composable @@ -31,7 +30,6 @@ import it.vfsfitvnm.vimusic.ui.screens.SettingsEntryGroupText import it.vfsfitvnm.vimusic.ui.screens.SettingsTitle import it.vfsfitvnm.vimusic.ui.screens.SwitchSettingEntry import it.vfsfitvnm.vimusic.ui.screens.globalRoutes -import it.vfsfitvnm.vimusic.ui.styling.Dimensions import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance import it.vfsfitvnm.vimusic.utils.colorPaletteModeKey import it.vfsfitvnm.vimusic.utils.colorPaletteNameKey diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/BackupAndRestoreScreen.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/BackupAndRestoreScreen.kt index b1c6112..ed9938d 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/BackupAndRestoreScreen.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/BackupAndRestoreScreen.kt @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.runtime.Composable @@ -41,7 +40,6 @@ import it.vfsfitvnm.vimusic.ui.screens.SettingsEntryGroupText import it.vfsfitvnm.vimusic.ui.screens.SettingsGroupDescription import it.vfsfitvnm.vimusic.ui.screens.SettingsTitle import it.vfsfitvnm.vimusic.ui.screens.globalRoutes -import it.vfsfitvnm.vimusic.ui.styling.Dimensions import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance import it.vfsfitvnm.vimusic.utils.intent import java.io.FileInputStream diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/CacheSettingsScreen.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/CacheSettingsScreen.kt index dad3e91..0e511e4 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/CacheSettingsScreen.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/settings/CacheSettingsScreen.kt @@ -10,7 +10,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.runtime.Composable @@ -38,7 +37,6 @@ import it.vfsfitvnm.vimusic.ui.screens.SettingsEntryGroupText import it.vfsfitvnm.vimusic.ui.screens.SettingsGroupDescription import it.vfsfitvnm.vimusic.ui.screens.SettingsTitle import it.vfsfitvnm.vimusic.ui.screens.globalRoutes -import it.vfsfitvnm.vimusic.ui.styling.Dimensions import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance import it.vfsfitvnm.vimusic.utils.coilDiskCacheMaxSizeKey import it.vfsfitvnm.vimusic.utils.exoPlayerDiskCacheMaxSizeKey diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml index 18d9456..faf9f02 100644 --- a/app/src/main/res/drawable/ic_launcher_foreground.xml +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -10,10 +10,10 @@ + android:fillColor="@color/ic_launcher_foreground"/> + android:fillColor="@color/ic_launcher_foreground"/> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..cc7e329 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,5 @@ + + + #4046bf + #ffffff + diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml deleted file mode 100644 index ce20861..0000000 --- a/app/src/main/res/values/ic_launcher_background.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #4046BF - \ No newline at end of file diff --git a/ktor-client-brotli/src/main/kotlin/io/ktor/client/plugins/compression/BrotliEncoder.kt b/ktor-client-brotli/src/main/kotlin/io/ktor/client/plugins/compression/BrotliEncoder.kt index 87df655..dca2ad1 100644 --- a/ktor-client-brotli/src/main/kotlin/io/ktor/client/plugins/compression/BrotliEncoder.kt +++ b/ktor-client-brotli/src/main/kotlin/io/ktor/client/plugins/compression/BrotliEncoder.kt @@ -1,7 +1,8 @@ package io.ktor.client.plugins.compression -import io.ktor.utils.io.* -import io.ktor.utils.io.jvm.javaio.* +import io.ktor.utils.io.ByteReadChannel +import io.ktor.utils.io.jvm.javaio.toByteReadChannel +import io.ktor.utils.io.jvm.javaio.toInputStream import kotlinx.coroutines.CoroutineScope import org.brotli.dec.BrotliInputStream diff --git a/ktor-client-brotli/src/main/kotlin/io/ktor/client/plugins/compression/brotli.kt b/ktor-client-brotli/src/main/kotlin/io/ktor/client/plugins/compression/brotli.kt index 4344a5a..558751c 100644 --- a/ktor-client-brotli/src/main/kotlin/io/ktor/client/plugins/compression/brotli.kt +++ b/ktor-client-brotli/src/main/kotlin/io/ktor/client/plugins/compression/brotli.kt @@ -2,4 +2,4 @@ package io.ktor.client.plugins.compression fun ContentEncoding.Config.brotli(quality: Float? = null) { customEncoder(BrotliEncoder, quality) -} \ No newline at end of file +} diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/Result.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/Result.kt index d6a2f06..8524ce7 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/Result.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/Result.kt @@ -1,7 +1,6 @@ package it.vfsfitvnm.youtubemusic -import io.ktor.utils.io.* - +import io.ktor.utils.io.CancellationException internal fun Result.recoverIfCancelled(): Result? { return when (exceptionOrNull()) { diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/YouTube.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/YouTube.kt index 84262f2..c24f77b 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/YouTube.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/YouTube.kt @@ -32,10 +32,10 @@ import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json +@OptIn(ExperimentalSerializationApi::class) object YouTube { private const val Key = "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8" - @OptIn(ExperimentalSerializationApi::class) val client = HttpClient(OkHttp) { BrowserUserAgent() @@ -546,14 +546,14 @@ object YouTube { private suspend fun getQueue(body: GetQueueBody): Result?>? { return runCatching { - val body = client.post("/youtubei/v1/music/get_queue") { + val response = client.post("/youtubei/v1/music/get_queue") { contentType(ContentType.Application.Json) setBody(body) parameter("key", Key) parameter("prettyPrint", false) }.body() - body.queueDatas?.mapNotNull { queueData -> + response.queueDatas?.mapNotNull { queueData -> queueData.content?.playlistPanelVideoRenderer?.let { renderer -> Item.Song( info = Info( diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/BrowseResponse.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/BrowseResponse.kt index 0dfa2bc..a576205 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/BrowseResponse.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/BrowseResponse.kt @@ -1,8 +1,9 @@ package it.vfsfitvnm.youtubemusic.models - +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable +@OptIn(ExperimentalSerializationApi::class) @Serializable data class BrowseResponse( val contents: Contents, diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ButtonRenderer.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ButtonRenderer.kt index 4e0276a..d511804 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ButtonRenderer.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ButtonRenderer.kt @@ -2,7 +2,6 @@ package it.vfsfitvnm.youtubemusic.models import kotlinx.serialization.Serializable - @Serializable data class ButtonRenderer( val navigationEndpoint: NavigationEndpoint diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/Continuation.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/Continuation.kt index 7147102..4dbf917 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/Continuation.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/Continuation.kt @@ -1,8 +1,10 @@ package it.vfsfitvnm.youtubemusic.models +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonNames +@OptIn(ExperimentalSerializationApi::class) @Serializable data class Continuation( @JsonNames("nextContinuationData", "nextRadioContinuationData") diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ContinuationResponse.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ContinuationResponse.kt index ac27911..abc48f8 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ContinuationResponse.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ContinuationResponse.kt @@ -1,8 +1,10 @@ package it.vfsfitvnm.youtubemusic.models +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonNames +@OptIn(ExperimentalSerializationApi::class) @Serializable data class ContinuationResponse( val continuationContents: ContinuationContents, diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/GetQueueResponse.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/GetQueueResponse.kt index e0f19ca..b9a7a44 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/GetQueueResponse.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/GetQueueResponse.kt @@ -1,8 +1,9 @@ package it.vfsfitvnm.youtubemusic.models - +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable +@OptIn(ExperimentalSerializationApi::class) @Serializable data class GetQueueResponse( val queueDatas: List?, diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/GetSearchSuggestionsResponse.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/GetSearchSuggestionsResponse.kt index 2bf3adc..6741633 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/GetSearchSuggestionsResponse.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/GetSearchSuggestionsResponse.kt @@ -1,6 +1,5 @@ package it.vfsfitvnm.youtubemusic.models - import kotlinx.serialization.Serializable @Serializable diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicCarouselShelfRenderer.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicCarouselShelfRenderer.kt index 654a456..995ecc2 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicCarouselShelfRenderer.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicCarouselShelfRenderer.kt @@ -1,7 +1,9 @@ package it.vfsfitvnm.youtubemusic.models +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable +@OptIn(ExperimentalSerializationApi::class) @Serializable data class MusicCarouselShelfRenderer( val header: Header, @@ -31,4 +33,3 @@ data class MusicCarouselShelfRenderer( } } } - diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicResponsiveListItemRenderer.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicResponsiveListItemRenderer.kt index 1e50c07..66016bc 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicResponsiveListItemRenderer.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicResponsiveListItemRenderer.kt @@ -1,8 +1,10 @@ package it.vfsfitvnm.youtubemusic.models +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonNames +@OptIn(ExperimentalSerializationApi::class) @Serializable data class MusicResponsiveListItemRenderer( val fixedColumns: List?, diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicShelfRenderer.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicShelfRenderer.kt index ea6dca6..6bda074 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicShelfRenderer.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicShelfRenderer.kt @@ -1,7 +1,9 @@ package it.vfsfitvnm.youtubemusic.models +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable +@OptIn(ExperimentalSerializationApi::class) @Serializable data class MusicShelfRenderer( val bottomEndpoint: NavigationEndpoint?, diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicTwoRowItemRenderer.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicTwoRowItemRenderer.kt index afb7dd4..f07179b 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicTwoRowItemRenderer.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/MusicTwoRowItemRenderer.kt @@ -1,7 +1,9 @@ package it.vfsfitvnm.youtubemusic.models +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable +@OptIn(ExperimentalSerializationApi::class) @Serializable data class MusicTwoRowItemRenderer( val navigationEndpoint: NavigationEndpoint, diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/NavigationEndpoint.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/NavigationEndpoint.kt index a20fd81..54e115d 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/NavigationEndpoint.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/NavigationEndpoint.kt @@ -90,7 +90,6 @@ data class NavigationEndpoint( val playlistId: String, ) : Endpoint() - @Serializable data class Browse( val params: String?, @@ -114,7 +113,6 @@ data class NavigationEndpoint( } } - @Serializable data class Search( val params: String?, diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/NextResponse.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/NextResponse.kt index d457238..2dcdb28 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/NextResponse.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/NextResponse.kt @@ -1,9 +1,10 @@ package it.vfsfitvnm.youtubemusic.models - +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonNames +@OptIn(ExperimentalSerializationApi::class) @Serializable data class NextResponse( val contents: Contents, @@ -40,6 +41,7 @@ data class NextResponse( val videoId: String, val playlistSetVideoId: String?, ) + @Serializable data class AutomixPreviewVideoRenderer( val content: Content? diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/PlayerResponse.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/PlayerResponse.kt index f877575..fa8e760 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/PlayerResponse.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/PlayerResponse.kt @@ -1,8 +1,9 @@ package it.vfsfitvnm.youtubemusic.models +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable - +@OptIn(ExperimentalSerializationApi::class) @Serializable data class PlayerResponse( val playabilityStatus: PlayabilityStatus, diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/SearchResponse.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/SearchResponse.kt index b0c9ce5..fbd4883 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/SearchResponse.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/SearchResponse.kt @@ -1,7 +1,9 @@ package it.vfsfitvnm.youtubemusic.models +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable +@OptIn(ExperimentalSerializationApi::class) @Serializable data class SearchResponse( val contents: Contents, diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/Tabs.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/Tabs.kt index 90561ca..7fa9c37 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/Tabs.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/Tabs.kt @@ -1,8 +1,10 @@ package it.vfsfitvnm.youtubemusic.models +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonNames +@OptIn(ExperimentalSerializationApi::class) @Serializable data class Tabs( val tabs: List @@ -25,6 +27,7 @@ data class Tabs( } } +@OptIn(ExperimentalSerializationApi::class) @Serializable data class SectionListRenderer( val contents: List, @@ -48,6 +51,7 @@ data class SectionListRenderer( val musicNavigationButtonRenderer: MusicNavigationButtonRenderer ) } + @Serializable data class MusicDescriptionShelfRenderer( val description: Runs, diff --git a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ThumbnailRenderer.kt b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ThumbnailRenderer.kt index 18a1bfe..77e8135 100644 --- a/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ThumbnailRenderer.kt +++ b/youtube-music/src/main/kotlin/it/vfsfitvnm/youtubemusic/models/ThumbnailRenderer.kt @@ -1,9 +1,10 @@ package it.vfsfitvnm.youtubemusic.models - +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonNames +@OptIn(ExperimentalSerializationApi::class) @Serializable data class ThumbnailRenderer( @JsonNames("croppedSquareThumbnailRenderer") @@ -37,4 +38,3 @@ data class ThumbnailRenderer( } } } -