Skip to content

Commit afd7698

Browse files
authored
[release] 🔧 fixes #223
* 🔧 fix synced lyrics and move to jdk 21 * 👷 Bump JDK to 21 in CI workflows
1 parent 1a5a9f5 commit afd7698

File tree

6 files changed

+24
-32
lines changed

6 files changed

+24
-32
lines changed

.github/workflows/beta.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121

22-
- name: Setup JDK 17
22+
- name: Setup JDK 21
2323
uses: actions/setup-java@v4
2424
with:
2525
distribution: 'zulu'
26-
java-version: 17
26+
java-version: 21
2727
cache: 'gradle'
2828

2929
- name: Cook KeyStore

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424

25-
- name: Setup JDK 17
25+
- name: Setup JDK 21
2626
uses: actions/setup-java@v4
2727
with:
2828
distribution: 'zulu'
29-
java-version: 17
29+
java-version: 21
3030
cache: 'gradle'
3131

3232
- name: Extract Version Name from Gradle

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 5.5.2
4+
- Fixed synced lyrics not loading
5+
- Moved to jdk 21 (fdroid builds)
6+
37
## 5.5.1
48
- Fixed text wrap on larger DPI (#220)
59
- Added default font option (#212)

app/build.gradle.kts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ plugins {
1010
}
1111

1212
val appName = "Rush"
13-
val appVersionName = "5.5.1"
14-
val appVersionCode = 5510
13+
val appVersionName = "5.5.2"
14+
val appVersionCode = 5520
1515

1616
val publicGeniusApiToken = "\"qLSDtgIqHgzGNjOFUmdOxJKGJOg5RIAPzOKTfrs7rNxqYXwfdSh9HTHMJUs2X27Y\""
1717

@@ -40,12 +40,6 @@ android {
4040
}
4141
}
4242

43-
kotlin {
44-
compilerOptions {
45-
jvmToolchain(17)
46-
}
47-
}
48-
4943
buildTypes {
5044
release {
5145
resValue("string", "app_name", appName)
@@ -109,9 +103,10 @@ android {
109103
}
110104

111105
compileOptions {
112-
sourceCompatibility = JavaVersion.VERSION_17
113-
targetCompatibility = JavaVersion.VERSION_17
106+
sourceCompatibility = JavaVersion.VERSION_21
107+
targetCompatibility = JavaVersion.VERSION_21
114108
}
109+
115110
packaging {
116111
resources {
117112
excludes += "/META-INF/{AL2.0,LGPL2.1}"

app/src/main/java/com/shub39/rush/data/network/LrcLibApi.kt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,18 @@ class LrcLibApi(
1717
trackName: String,
1818
artistName: String
1919
): LrcGetDto? {
20-
val result = searchLrcLyrics(
21-
trackName = trackName,
22-
artistName = artistName
23-
)
20+
val result = safeCall<LrcGetDto> {
21+
client.get(
22+
urlString = "$LRC_BASE_URL/api/get"
23+
) {
24+
parameter("track_name", trackName)
25+
parameter("artist_name", artistName)
26+
}
27+
}
2428

2529
return when (result) {
30+
is Result.Success -> result.data
2631
is Result.Error -> null
27-
is Result.Success -> {
28-
if (result.data.any { it.syncedLyrics != null }) {
29-
result.data.first { it.syncedLyrics != null }
30-
} else {
31-
result.data.firstOrNull()
32-
}
33-
}
3432
}
3533
}
3634

visualizer-helper/build.gradle.kts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,8 @@ android {
2828
compose = true
2929
}
3030
compileOptions {
31-
sourceCompatibility = JavaVersion.VERSION_17
32-
targetCompatibility = JavaVersion.VERSION_17
33-
}
34-
kotlin {
35-
compilerOptions {
36-
jvmToolchain(17)
37-
}
31+
sourceCompatibility = JavaVersion.VERSION_21
32+
targetCompatibility = JavaVersion.VERSION_21
3833
}
3934
}
4035

0 commit comments

Comments
 (0)