diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index ed54b7d6..220e130d 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -32,7 +32,7 @@ jobs: with: draft: true allowUpdates: true - tag: "v3.6.0" + tag: "v3.6.1" artifacts: "desktop/build/compose/jars/*.jar,desktop/build/compose/binaries/main/*/*" token: ${{ secrets.GH_TOKEN }} @@ -81,7 +81,7 @@ jobs: with: draft: true allowUpdates: true - tag: "v3.6.0" + tag: "v3.6.1" artifacts: "desktop/build/compose/jars/*.jar,desktop/build/compose/binaries/main/*/*,android/build/outputs/apk/release/*signed.apk" token: ${{ secrets.GH_TOKEN }} @@ -114,6 +114,6 @@ jobs: with: draft: true allowUpdates: true - tag: "v3.6.0" + tag: "v3.6.1" artifacts: "desktop/build/compose/jars/*.jar,desktop/build/compose/binaries/main/*/*" token: ${{ secrets.GH_TOKEN }} diff --git a/buildSrc/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/buildSrc/src/main/kotlin/Versions.kt index 5fe71196..1ba64afd 100644 --- a/buildSrc/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/buildSrc/src/main/kotlin/Versions.kt @@ -26,9 +26,9 @@ import org.gradle.kotlin.dsl.getByType object Versions { // App's Version (To be bumped at each update) - const val versionName = "3.6.0" + const val versionName = "3.6.1" - const val versionCode = 28 + const val versionCode = 29 // Android const val minSdkVersion = 21 diff --git a/buildSrc/deps.versions.toml b/buildSrc/deps.versions.toml index df5b8449..a9a7c912 100644 --- a/buildSrc/deps.versions.toml +++ b/buildSrc/deps.versions.toml @@ -25,6 +25,7 @@ androidxLifecycle = "2.4.0-alpha03" [libraries] kotlin-kotlinGradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" } kotlin-serialization = { group = "org.jetbrains.kotlin", name = "kotlin-serialization", version.ref = "kotlin" } +kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" } kotlin-kotlinTestCommon = { group = "org.jetbrains.kotlin", name = "kotlin-test-common", version.ref = "kotlin" } kotlin-kotlinTestJs = { group = "org.jetbrains.kotlin", name = "kotlin-test-js", version.ref = "kotlin" } kotlin-kotlinTestJunit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin" } diff --git a/common/core-components/src/commonMain/kotlin/com.shabinder.common.core_components/utils/NetworkingExt.kt b/common/core-components/src/commonMain/kotlin/com.shabinder.common.core_components/utils/NetworkingExt.kt index 4d6c8f67..f6351bf0 100644 --- a/common/core-components/src/commonMain/kotlin/com.shabinder.common.core_components/utils/NetworkingExt.kt +++ b/common/core-components/src/commonMain/kotlin/com.shabinder.common.core_components/utils/NetworkingExt.kt @@ -43,32 +43,30 @@ suspend inline fun HttpClient.getFinalUrl( } } -fun createHttpClient(enableNetworkLogs: Boolean = false) = HttpClient { - buildHttpClient { - // https://github.com/Kotlin/kotlinx.serialization/issues/1450 - install(JsonFeature) { - serializer = KotlinxSerializer(globalJson) - } - install(HttpTimeout) { - socketTimeoutMillis = 520_000 - requestTimeoutMillis = 360_000 - connectTimeoutMillis = 360_000 - } - // WorkAround for Freezing - // Use httpClient.getData / httpClient.postData Extensions - /*install(JsonFeature) { - serializer = KotlinxSerializer( - Json { - isLenient = true - ignoreUnknownKeys = true - } - ) - }*/ - if (enableNetworkLogs) { - install(Logging) { - logger = Logger.DEFAULT - level = LogLevel.INFO +fun createHttpClient(enableNetworkLogs: Boolean = false) = buildHttpClient { + // https://github.com/Kotlin/kotlinx.serialization/issues/1450 + install(JsonFeature) { + serializer = KotlinxSerializer(globalJson) + } + install(HttpTimeout) { + socketTimeoutMillis = 520_000 + requestTimeoutMillis = 360_000 + connectTimeoutMillis = 360_000 + } + // WorkAround for Freezing + // Use httpClient.getData / httpClient.postData Extensions + /*install(JsonFeature) { + serializer = KotlinxSerializer( + Json { + isLenient = true + ignoreUnknownKeys = true } + ) + }*/ + if (enableNetworkLogs) { + install(Logging) { + logger = Logger.DEFAULT + level = LogLevel.INFO } } } @@ -77,4 +75,4 @@ expect fun buildHttpClient(extraConfig: HttpClientConfig<*>.() -> Unit): HttpCli /*Client Active Throughout App's Lifetime*/ @SharedImmutable -val ktorHttpClient = HttpClient {} \ No newline at end of file +private val ktorHttpClient = HttpClient {} \ No newline at end of file diff --git a/common/providers/src/commonMain/kotlin/com.shabinder.common.providers/sound_cloud/requests/SoundCloudRequests.kt b/common/providers/src/commonMain/kotlin/com.shabinder.common.providers/sound_cloud/requests/SoundCloudRequests.kt index 8aa3f160..7e71fee0 100644 --- a/common/providers/src/commonMain/kotlin/com.shabinder.common.providers/sound_cloud/requests/SoundCloudRequests.kt +++ b/common/providers/src/commonMain/kotlin/com.shabinder.common.providers/sound_cloud/requests/SoundCloudRequests.kt @@ -152,17 +152,15 @@ interface SoundCloudRequests { suspend inline fun SoundCloudRequests.doAuthenticatedRequest(url: String): T { var clientID: String = SoundCloudRequests.CLIENT_ID return try { - val data: String = httpClient.get(url) { + httpClient.get(url) { parameter("client_id", clientID) } - globalJson.decodeFromString(data) } catch (e: ClientRequestException) { if (clientID != SoundCloudRequests.ALT_CLIENT_ID) { clientID = SoundCloudRequests.ALT_CLIENT_ID - val data: String = httpClient.get(url) { + return httpClient.get(url) { parameter("client_id", clientID) } - return globalJson.decodeFromString(data) } throw e } diff --git a/common/providers/src/commonMain/kotlin/com.shabinder.common.providers/youtube_music/YoutubeMusic.kt b/common/providers/src/commonMain/kotlin/com.shabinder.common.providers/youtube_music/YoutubeMusic.kt index 44247c97..9e328681 100644 --- a/common/providers/src/commonMain/kotlin/com.shabinder.common.providers/youtube_music/YoutubeMusic.kt +++ b/common/providers/src/commonMain/kotlin/com.shabinder.common.providers/youtube_music/YoutubeMusic.kt @@ -34,9 +34,11 @@ import com.shabinder.common.providers.youtube_to_mp3.requests.YoutubeMp3 import com.shabinder.common.utils.appendPadded import io.github.shabinder.fuzzywuzzy.diffutils.FuzzySearch import io.ktor.client.HttpClient +import io.ktor.client.request.header import io.ktor.client.request.headers import io.ktor.client.request.post import io.ktor.http.ContentType +import io.ktor.http.HttpHeaders import io.ktor.http.contentType import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonArray @@ -357,8 +359,8 @@ class YoutubeMusic constructor( private suspend fun getYoutubeMusicResponse(query: String): SuspendableEvent = SuspendableEvent { httpClient.post("${corsApi}https://music.youtube.com/youtubei/v1/search?alt=json&key=$apiKey") { - contentType(ContentType.Application.Json) headers { + append(HttpHeaders.ContentType, ContentType.Application.Json.toString()) append("referer", "https://music.youtube.com/search") } body = buildJsonObject { diff --git a/fastlane/metadata/android/en-US/changelogs/29.txt b/fastlane/metadata/android/en-US/changelogs/29.txt new file mode 100644 index 00000000..10014279 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/29.txt @@ -0,0 +1 @@ + - Fixed Response Parsing Error which leaded download failure. \ No newline at end of file