Tweak code formatting
This commit is contained in:
parent
891808ed6f
commit
cfff190bc2
29 changed files with 45 additions and 37 deletions
|
@ -91,6 +91,7 @@ dependencies {
|
||||||
|
|
||||||
implementation(libs.room)
|
implementation(libs.room)
|
||||||
kapt(libs.room.compiler)
|
kapt(libs.room.compiler)
|
||||||
|
annotationProcessor(libs.room.compiler)
|
||||||
|
|
||||||
implementation(projects.youtubeMusic)
|
implementation(projects.youtubeMusic)
|
||||||
implementation(projects.kugou)
|
implementation(projects.kugou)
|
||||||
|
|
|
@ -10,15 +10,12 @@ import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.IntrinsicSize
|
import androidx.compose.foundation.layout.IntrinsicSize
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
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.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.systemBars
|
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.itemsIndexed
|
import androidx.compose.foundation.lazy.itemsIndexed
|
||||||
|
|
|
@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.systemBarsPadding
|
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.runtime.Composable
|
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.platform.LocalUriHandler
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import coil.size.Dimension
|
|
||||||
import it.vfsfitvnm.route.RouteHandler
|
import it.vfsfitvnm.route.RouteHandler
|
||||||
import it.vfsfitvnm.vimusic.BuildConfig
|
import it.vfsfitvnm.vimusic.BuildConfig
|
||||||
import it.vfsfitvnm.vimusic.LocalPlayerAwarePaddingValues
|
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.SettingsEntryGroupText
|
||||||
import it.vfsfitvnm.vimusic.ui.screens.SettingsTitle
|
import it.vfsfitvnm.vimusic.ui.screens.SettingsTitle
|
||||||
import it.vfsfitvnm.vimusic.ui.screens.globalRoutes
|
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.ui.styling.LocalAppearance
|
||||||
|
|
||||||
@ExperimentalAnimationApi
|
@ExperimentalAnimationApi
|
||||||
|
|
|
@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.systemBarsPadding
|
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.runtime.Composable
|
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.SettingsTitle
|
||||||
import it.vfsfitvnm.vimusic.ui.screens.SwitchSettingEntry
|
import it.vfsfitvnm.vimusic.ui.screens.SwitchSettingEntry
|
||||||
import it.vfsfitvnm.vimusic.ui.screens.globalRoutes
|
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.ui.styling.LocalAppearance
|
||||||
import it.vfsfitvnm.vimusic.utils.colorPaletteModeKey
|
import it.vfsfitvnm.vimusic.utils.colorPaletteModeKey
|
||||||
import it.vfsfitvnm.vimusic.utils.colorPaletteNameKey
|
import it.vfsfitvnm.vimusic.utils.colorPaletteNameKey
|
||||||
|
|
|
@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.systemBarsPadding
|
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.runtime.Composable
|
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.SettingsGroupDescription
|
||||||
import it.vfsfitvnm.vimusic.ui.screens.SettingsTitle
|
import it.vfsfitvnm.vimusic.ui.screens.SettingsTitle
|
||||||
import it.vfsfitvnm.vimusic.ui.screens.globalRoutes
|
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.ui.styling.LocalAppearance
|
||||||
import it.vfsfitvnm.vimusic.utils.intent
|
import it.vfsfitvnm.vimusic.utils.intent
|
||||||
import java.io.FileInputStream
|
import java.io.FileInputStream
|
||||||
|
|
|
@ -10,7 +10,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.systemBarsPadding
|
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.runtime.Composable
|
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.SettingsGroupDescription
|
||||||
import it.vfsfitvnm.vimusic.ui.screens.SettingsTitle
|
import it.vfsfitvnm.vimusic.ui.screens.SettingsTitle
|
||||||
import it.vfsfitvnm.vimusic.ui.screens.globalRoutes
|
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.ui.styling.LocalAppearance
|
||||||
import it.vfsfitvnm.vimusic.utils.coilDiskCacheMaxSizeKey
|
import it.vfsfitvnm.vimusic.utils.coilDiskCacheMaxSizeKey
|
||||||
import it.vfsfitvnm.vimusic.utils.exoPlayerDiskCacheMaxSizeKey
|
import it.vfsfitvnm.vimusic.utils.exoPlayerDiskCacheMaxSizeKey
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
<path
|
<path
|
||||||
android:pathData="m75.89,0.01c-3.13,0.14 -7,2.17 -7,4.64l1.16,72.06c-9.91,-10.11 -23.45,-11.88 -35.27,-4.1 -11.82,7.78 -16.48,22.84 -11.12,35.94 5.36,13.1 19.23,20.58 33.12,17.84 13.88,-2.74 23.89,-14.92 23.88,-29.07L80.65,36.94c11.72,6.28 24.81,9.57 38.1,9.57 2.34,-0 4.23,-1.9 4.23,-4.23L122.98,16.87c0,-2.34 -1.9,-4.23 -4.23,-4.23 -13.08,0 -25.92,-3.56 -37.14,-10.29L78.6,0.55C77.89,0.12 76.93,-0.04 75.89,0.01ZM32.54,94.08c4.27,-0.08 10.76,3.69 15.83,9.07 7.22,7.65 7.8,14.4 3.38,17.5 -3.88,2.71 -9.57,4.37 -16.79,-3.28 -7.22,-7.65 -8.62,-16.19 -6.37,-20.96 0.74,-1.57 2.15,-2.29 3.95,-2.32z"
|
android:pathData="m75.89,0.01c-3.13,0.14 -7,2.17 -7,4.64l1.16,72.06c-9.91,-10.11 -23.45,-11.88 -35.27,-4.1 -11.82,7.78 -16.48,22.84 -11.12,35.94 5.36,13.1 19.23,20.58 33.12,17.84 13.88,-2.74 23.89,-14.92 23.88,-29.07L80.65,36.94c11.72,6.28 24.81,9.57 38.1,9.57 2.34,-0 4.23,-1.9 4.23,-4.23L122.98,16.87c0,-2.34 -1.9,-4.23 -4.23,-4.23 -13.08,0 -25.92,-3.56 -37.14,-10.29L78.6,0.55C77.89,0.12 76.93,-0.04 75.89,0.01ZM32.54,94.08c4.27,-0.08 10.76,3.69 15.83,9.07 7.22,7.65 7.8,14.4 3.38,17.5 -3.88,2.71 -9.57,4.37 -16.79,-3.28 -7.22,-7.65 -8.62,-16.19 -6.37,-20.96 0.74,-1.57 2.15,-2.29 3.95,-2.32z"
|
||||||
android:strokeWidth="4.23"
|
android:strokeWidth="4.23"
|
||||||
android:fillColor="#ffffff"/>
|
android:fillColor="@color/ic_launcher_foreground"/>
|
||||||
<path
|
<path
|
||||||
android:pathData="M15.11,3.8 L4.29,10.33C-1.54,13.85 -1.3,19.19 4.23,23.15 19.07,33.77 33.15,49.88 48.09,65.99c0.65,0.7 0.4,1.32 -0.55,1.43 -10.69,1.33 -19.82,8.47 -24.07,18.07 -2.73,6.18 -2.75,17.75 -0.04,23.94 3.01,6.88 8.53,12.44 15.39,15.48 6.17,2.74 17.76,2.74 23.93,0 6.86,-3.04 12.38,-8.6 15.4,-15.48 2.71,-6.19 2.54,-14.24 2.09,-16.98C69.9,58.31 51.71,28.16 33.82,6.65 29.47,1.42 20.93,0.28 15.11,3.8ZM32.54,94.08c1.74,-0.03 3.84,0.57 6.06,1.66 6.08,2.98 14.8,11.3 15.83,17.93 0.47,2.98 -0.48,5.41 -2.65,6.95 -0.02,0.01 -0.05,0.04 -0.07,0.05 -1.71,1.19 -3.77,2.17 -6.16,2.24 -6.6,0.19 -14.91,-9.54 -16.99,-15.96 -1.34,-4.14 -1.21,-7.91 0.03,-10.54 0,-0 0,-0.01 0.01,-0.01 0.74,-1.57 2.15,-2.28 3.95,-2.31z"
|
android:pathData="M15.11,3.8 L4.29,10.33C-1.54,13.85 -1.3,19.19 4.23,23.15 19.07,33.77 33.15,49.88 48.09,65.99c0.65,0.7 0.4,1.32 -0.55,1.43 -10.69,1.33 -19.82,8.47 -24.07,18.07 -2.73,6.18 -2.75,17.75 -0.04,23.94 3.01,6.88 8.53,12.44 15.39,15.48 6.17,2.74 17.76,2.74 23.93,0 6.86,-3.04 12.38,-8.6 15.4,-15.48 2.71,-6.19 2.54,-14.24 2.09,-16.98C69.9,58.31 51.71,28.16 33.82,6.65 29.47,1.42 20.93,0.28 15.11,3.8ZM32.54,94.08c1.74,-0.03 3.84,0.57 6.06,1.66 6.08,2.98 14.8,11.3 15.83,17.93 0.47,2.98 -0.48,5.41 -2.65,6.95 -0.02,0.01 -0.05,0.04 -0.07,0.05 -1.71,1.19 -3.77,2.17 -6.16,2.24 -6.6,0.19 -14.91,-9.54 -16.99,-15.96 -1.34,-4.14 -1.21,-7.91 0.03,-10.54 0,-0 0,-0.01 0.01,-0.01 0.74,-1.57 2.15,-2.28 3.95,-2.31z"
|
||||||
android:strokeWidth="7.69"
|
android:strokeWidth="7.69"
|
||||||
android:fillColor="#ffffff"/>
|
android:fillColor="@color/ic_launcher_foreground"/>
|
||||||
</group>
|
</group>
|
||||||
</vector>
|
</vector>
|
||||||
|
|
5
app/src/main/res/values/colors.xml
Normal file
5
app/src/main/res/values/colors.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#4046bf</color>
|
||||||
|
<color name="ic_launcher_foreground">#ffffff</color>
|
||||||
|
</resources>
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="ic_launcher_background">#4046BF</color>
|
|
||||||
</resources>
|
|
|
@ -1,7 +1,8 @@
|
||||||
package io.ktor.client.plugins.compression
|
package io.ktor.client.plugins.compression
|
||||||
|
|
||||||
import io.ktor.utils.io.*
|
import io.ktor.utils.io.ByteReadChannel
|
||||||
import io.ktor.utils.io.jvm.javaio.*
|
import io.ktor.utils.io.jvm.javaio.toByteReadChannel
|
||||||
|
import io.ktor.utils.io.jvm.javaio.toInputStream
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import org.brotli.dec.BrotliInputStream
|
import org.brotli.dec.BrotliInputStream
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package it.vfsfitvnm.youtubemusic
|
package it.vfsfitvnm.youtubemusic
|
||||||
|
|
||||||
import io.ktor.utils.io.*
|
import io.ktor.utils.io.CancellationException
|
||||||
|
|
||||||
|
|
||||||
internal fun <T> Result<T>.recoverIfCancelled(): Result<T>? {
|
internal fun <T> Result<T>.recoverIfCancelled(): Result<T>? {
|
||||||
return when (exceptionOrNull()) {
|
return when (exceptionOrNull()) {
|
||||||
|
|
|
@ -32,10 +32,10 @@ import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
object YouTube {
|
object YouTube {
|
||||||
private const val Key = "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"
|
private const val Key = "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"
|
||||||
|
|
||||||
@OptIn(ExperimentalSerializationApi::class)
|
|
||||||
val client = HttpClient(OkHttp) {
|
val client = HttpClient(OkHttp) {
|
||||||
BrowserUserAgent()
|
BrowserUserAgent()
|
||||||
|
|
||||||
|
@ -546,14 +546,14 @@ object YouTube {
|
||||||
|
|
||||||
private suspend fun getQueue(body: GetQueueBody): Result<List<Item.Song>?>? {
|
private suspend fun getQueue(body: GetQueueBody): Result<List<Item.Song>?>? {
|
||||||
return runCatching {
|
return runCatching {
|
||||||
val body = client.post("/youtubei/v1/music/get_queue") {
|
val response = client.post("/youtubei/v1/music/get_queue") {
|
||||||
contentType(ContentType.Application.Json)
|
contentType(ContentType.Application.Json)
|
||||||
setBody(body)
|
setBody(body)
|
||||||
parameter("key", Key)
|
parameter("key", Key)
|
||||||
parameter("prettyPrint", false)
|
parameter("prettyPrint", false)
|
||||||
}.body<GetQueueResponse>()
|
}.body<GetQueueResponse>()
|
||||||
|
|
||||||
body.queueDatas?.mapNotNull { queueData ->
|
response.queueDatas?.mapNotNull { queueData ->
|
||||||
queueData.content?.playlistPanelVideoRenderer?.let { renderer ->
|
queueData.content?.playlistPanelVideoRenderer?.let { renderer ->
|
||||||
Item.Song(
|
Item.Song(
|
||||||
info = Info(
|
info = Info(
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class BrowseResponse(
|
data class BrowseResponse(
|
||||||
val contents: Contents,
|
val contents: Contents,
|
||||||
|
|
|
@ -2,7 +2,6 @@ package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ButtonRenderer(
|
data class ButtonRenderer(
|
||||||
val navigationEndpoint: NavigationEndpoint
|
val navigationEndpoint: NavigationEndpoint
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.JsonNames
|
import kotlinx.serialization.json.JsonNames
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Continuation(
|
data class Continuation(
|
||||||
@JsonNames("nextContinuationData", "nextRadioContinuationData")
|
@JsonNames("nextContinuationData", "nextRadioContinuationData")
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.JsonNames
|
import kotlinx.serialization.json.JsonNames
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ContinuationResponse(
|
data class ContinuationResponse(
|
||||||
val continuationContents: ContinuationContents,
|
val continuationContents: ContinuationContents,
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class GetQueueResponse(
|
data class GetQueueResponse(
|
||||||
val queueDatas: List<QueueData>?,
|
val queueDatas: List<QueueData>?,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class MusicCarouselShelfRenderer(
|
data class MusicCarouselShelfRenderer(
|
||||||
val header: Header,
|
val header: Header,
|
||||||
|
@ -31,4 +33,3 @@ data class MusicCarouselShelfRenderer(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.JsonNames
|
import kotlinx.serialization.json.JsonNames
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class MusicResponsiveListItemRenderer(
|
data class MusicResponsiveListItemRenderer(
|
||||||
val fixedColumns: List<FlexColumn>?,
|
val fixedColumns: List<FlexColumn>?,
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class MusicShelfRenderer(
|
data class MusicShelfRenderer(
|
||||||
val bottomEndpoint: NavigationEndpoint?,
|
val bottomEndpoint: NavigationEndpoint?,
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class MusicTwoRowItemRenderer(
|
data class MusicTwoRowItemRenderer(
|
||||||
val navigationEndpoint: NavigationEndpoint,
|
val navigationEndpoint: NavigationEndpoint,
|
||||||
|
|
|
@ -90,7 +90,6 @@ data class NavigationEndpoint(
|
||||||
val playlistId: String,
|
val playlistId: String,
|
||||||
) : Endpoint()
|
) : Endpoint()
|
||||||
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Browse(
|
data class Browse(
|
||||||
val params: String?,
|
val params: String?,
|
||||||
|
@ -114,7 +113,6 @@ data class NavigationEndpoint(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Search(
|
data class Search(
|
||||||
val params: String?,
|
val params: String?,
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.JsonNames
|
import kotlinx.serialization.json.JsonNames
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class NextResponse(
|
data class NextResponse(
|
||||||
val contents: Contents,
|
val contents: Contents,
|
||||||
|
@ -40,6 +41,7 @@ data class NextResponse(
|
||||||
val videoId: String,
|
val videoId: String,
|
||||||
val playlistSetVideoId: String?,
|
val playlistSetVideoId: String?,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class AutomixPreviewVideoRenderer(
|
data class AutomixPreviewVideoRenderer(
|
||||||
val content: Content?
|
val content: Content?
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class PlayerResponse(
|
data class PlayerResponse(
|
||||||
val playabilityStatus: PlayabilityStatus,
|
val playabilityStatus: PlayabilityStatus,
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class SearchResponse(
|
data class SearchResponse(
|
||||||
val contents: Contents,
|
val contents: Contents,
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.JsonNames
|
import kotlinx.serialization.json.JsonNames
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Tabs(
|
data class Tabs(
|
||||||
val tabs: List<Tab>
|
val tabs: List<Tab>
|
||||||
|
@ -25,6 +27,7 @@ data class Tabs(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class SectionListRenderer(
|
data class SectionListRenderer(
|
||||||
val contents: List<Content>,
|
val contents: List<Content>,
|
||||||
|
@ -48,6 +51,7 @@ data class SectionListRenderer(
|
||||||
val musicNavigationButtonRenderer: MusicNavigationButtonRenderer
|
val musicNavigationButtonRenderer: MusicNavigationButtonRenderer
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class MusicDescriptionShelfRenderer(
|
data class MusicDescriptionShelfRenderer(
|
||||||
val description: Runs,
|
val description: Runs,
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package it.vfsfitvnm.youtubemusic.models
|
package it.vfsfitvnm.youtubemusic.models
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.JsonNames
|
import kotlinx.serialization.json.JsonNames
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ThumbnailRenderer(
|
data class ThumbnailRenderer(
|
||||||
@JsonNames("croppedSquareThumbnailRenderer")
|
@JsonNames("croppedSquareThumbnailRenderer")
|
||||||
|
@ -37,4 +38,3 @@ data class ThumbnailRenderer(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue