Обновление 0.5.4.1

Добавлен прокси,
Перевод оставшихся слов и исправление орфографических ошибок.
Удаление трека из очереди свайпом
This commit is contained in:
2023-08-25 21:50:48 +05:00
parent 013a7127e7
commit 6dc89ff95e
12 changed files with 215 additions and 31 deletions

View File

@@ -15,8 +15,12 @@ import io.ktor.serialization.kotlinx.json.json
import it.hamy.innertube.models.NavigationEndpoint
import it.hamy.innertube.models.Runs
import it.hamy.innertube.models.Thumbnail
import it.hamy.innertube.utils.ProxyPreferences
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.json.Json
import java.net.InetSocketAddress
import java.net.Proxy
object Innertube {
val client = HttpClient(OkHttp) {
@@ -44,6 +48,19 @@ object Innertube {
parameters.append("prettyPrint", "false")
}
}
ProxyPreferences.preference?.let {
engine {
proxy = Proxy(
it.proxyMode,
InetSocketAddress(
it.proxyHost,
it.proxyPort
)
)
}
}
}
internal const val browse = "/youtubei/v1/browse"

View File

@@ -0,0 +1,13 @@
package it.hamy.innertube.utils
import java.net.Proxy
object ProxyPreferences {
var preference: ProxyPreferenceItem? = null
}
data class ProxyPreferenceItem(
var proxyHost: String,
var proxyPort: Int,
var proxyMode: Proxy.Type
)