mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-12-27 14:37:54 +01:00
Yt1s Link Extraction Fixes
This commit is contained in:
parent
86e6a9f3a8
commit
ab2fea910a
@ -23,7 +23,7 @@ import org.gradle.kotlin.dsl.accessors.runtime.addDependencyTo
|
||||
|
||||
object Versions {
|
||||
// App's Version (To be bumped at each update)
|
||||
const val versionName = "3.3"
|
||||
const val versionName = "3.2.5"
|
||||
|
||||
const val versionCode = 24
|
||||
|
||||
|
@ -67,12 +67,15 @@ interface Yt1sMp3 {
|
||||
val mp3Keys = response.getJsonObject("links")
|
||||
.getJsonObject("mp3")
|
||||
|
||||
// This Site now only gives 128kbps mp3 which is reasonable
|
||||
val requestedKBPS = when (quality) {
|
||||
AudioQuality.KBPS128 -> "mp3128"
|
||||
else -> quality.kbps
|
||||
else -> "mp3128"//quality.kbps
|
||||
}
|
||||
|
||||
val specificQualityKey = mp3Keys.getJsonObject(requestedKBPS) ?: mp3Keys.getJsonObject("192")
|
||||
val specificQualityKey = mp3Keys.getJsonObject(requestedKBPS)
|
||||
?: // Try M4a Link
|
||||
response.getJsonObject("links").getJsonObject("m4a").getJsonObject("140")
|
||||
|
||||
specificQualityKey?.get("k").requireNotNull().jsonPrimitive.content
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class TestSpotifyTrackMatching {
|
||||
}
|
||||
|
||||
private val spotifyToken: String?
|
||||
// get() = null
|
||||
get() = "BQB41HqrLcrh5eRYaL97GvaH6tRe-1EktQ8VGTWUQuFnYVWBEoTcF7T_8ogqVn1GHl9HCcMiQ0HBT-ybC74"
|
||||
get() = null
|
||||
// get() = "BQB41HqrLcrh5eRYaL97GvaH6tRe-1EktQ8VGTWUQuFnYVWBEoTcF7T_8ogqVn1GHl9HCcMiQ0HBT-ybC74"
|
||||
|
||||
@Test
|
||||
fun matchVideo() = runBlocking {
|
||||
|
Loading…
Reference in New Issue
Block a user