Skip to content

Commit e044962

Browse files
authored
Merge pull request #1180 from maxrave-dev/dev
v0.2.20: New version
2 parents b819d6a + b982c4e commit e044962

File tree

95 files changed

+2431
-3298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2431
-3298
lines changed

MediaServiceCore

Submodule MediaServiceCore updated 120 files

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A FOSS YouTube Music client for Android with many features from<br>Spotify, Spon
1313
<a href="https://www.openapk.net/simpmusic/com.maxrave.simpmusic/"><img src="https://www.openapk.net/images/openapk-badge.png" width="200"></a>
1414
<a href="https://github.com/maxrave-dev/SimpMusic/releases"><img src="https://raw.githubusercontent.com/NeoApplications/Neo-Backup/034b226cea5c1b30eb4f6a6f313e4dadcbb0ece4/badge_github.png" width="200"></a>
1515
<h4>Nightly Build</h4>
16-
<a href="https://nightly.link/maxrave-dev/SimpMusic/workflows/android/dev/app.zip"><img src="https://github.com/maxrave-dev/SimpMusic/actions/workflows/android.yml/badge.svg"></a><br/> <a href="https://nightly.link/maxrave-dev/SimpMusic/workflows/android/dev/app.zip"><img src="https://raw.githubusercontent.com/NeoApplications/Neo-Backup/034b226cea5c1b30eb4f6a6f313e4dadcbb0ece4/badge_github.png" width="200"></a>
16+
<a href="https://simpmusic.org/nightly-download"><img src="https://github.com/maxrave-dev/SimpMusic/actions/workflows/android.yml/badge.svg"></a><br/> <a href="https://simpmusic.org/nightly-download"><img src="https://raw.githubusercontent.com/NeoApplications/Neo-Backup/034b226cea5c1b30eb4f6a6f313e4dadcbb0ece4/badge_github.png" width="200"></a>
1717
</div>
1818

1919
## Features ✨️
@@ -39,6 +39,7 @@ A FOSS YouTube Music client for Android with many features from<br>Spotify, Spon
3939
> **Warning**
4040
> This app is in the beta stage, so it may have many bugs and make it crash. If you find any bugs,
4141
> please create an issue or contact me via email or Discord server.
42+
> Because of depending on YouTube Music, the player error will happen and it's normally, please don't ask me about the stable state of this app.
4243
4344
## Screenshots
4445
<p align="center">
@@ -97,6 +98,7 @@ sometimes, some songs or videos get the wrong lyrics
9798
- [maxrave-dev](https://github.com/maxrave-dev/SimpMusic): Founder/Developer/Designer
9899
- [Owen Connor](https://github.com/owencz1998): Discord Server Admin.
99100
- [ilianoKokoro](https://github.com/ilianoKokoro): Discord Server Admin.
101+
- [CrazyWolf13](https://github.com/CrazyWolf13): Issues organizer/planner.
100102

101103
We're looking for more contributors, all contributions are welcome!
102104
See our [CODE OF CONDUCT](https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/CODE_OF_CONDUCT.md)

aiService/src/main/java/org/simpmusic/aiservice/AiService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class AiService(
3838
ModelId(customModelId)
3939
} else {
4040
when (aiHost) {
41-
AIHost.GEMINI -> ModelId("gemini-2.0-flash-lite")
41+
AIHost.GEMINI -> ModelId("gemini-2.0-flash")
4242
AIHost.OPENAI -> ModelId("gpt-4o")
4343
}
4444
}

app/build.gradle.kts

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ kotlin {
2020
compilerOptions {
2121
freeCompilerArgs.add("-Xwhen-guards")
2222
freeCompilerArgs.add("-Xcontext-receivers")
23+
freeCompilerArgs.add("-Xmulti-dollar-interpolation")
2324
}
2425
}
2526

@@ -45,6 +46,7 @@ android {
4546
libs.versions.version.name
4647
.get()
4748
vectorDrawables.useSupportLibrary = true
49+
multiDexEnabled = true
4850

4951
@Suppress("UnstableApiUsage")
5052
androidResources {
@@ -80,6 +82,12 @@ android {
8082
}
8183
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
8284

85+
ndk {
86+
abiFilters.add("x86_64")
87+
abiFilters.add("armeabi-v7a")
88+
abiFilters.add("arm64-v8a")
89+
}
90+
8391
if (isFullBuild) {
8492
try {
8593
println("Full build detected, enabling Sentry DSN")
@@ -192,6 +200,8 @@ dependencies {
192200
val fullImplementation = "fullImplementation"
193201
val debugImplementation = "debugImplementation"
194202

203+
coreLibraryDesugaring(libs.desugaring)
204+
195205
// Compose
196206
val composeBom = platform(libs.compose.bom)
197207
implementation(composeBom)
@@ -308,9 +318,6 @@ dependencies {
308318
// Custom Activity On Crash
309319
implementation(libs.customactivityoncrash)
310320

311-
implementation(libs.sdp.android)
312-
implementation(libs.ssp.android)
313-
314321
implementation(libs.aboutlibraries)
315322
implementation(libs.aboutlibraries.compose.m3)
316323

@@ -320,8 +327,6 @@ dependencies {
320327
// InsetsX
321328
implementation(libs.insetsx)
322329

323-
coreLibraryDesugaring(libs.desugaring)
324-
325330
// Koin
326331
implementation(platform(libs.koin.bom))
327332
implementation(libs.koin.core)
@@ -342,13 +347,18 @@ dependencies {
342347

343348
// debugImplementation(libs.leak.canary)
344349
}
350+
/**
351+
* Task to generate the aboutlibraries.json file
352+
* Run with:
353+
./gradlew :app:exportLibraryDefinitions --no-daemon --no-configuration-cache --no-build-cache
354+
**/
345355
aboutLibraries {
356+
android.registerAndroidTasks = false
346357
export {
358+
exportVariant = "fullRelease"
347359
prettyPrint = true
348360
excludeFields = listOf("generated")
349-
}
350-
android {
351-
registerAndroidTasks = false
361+
outputPath = File(project.projectDir, "src/main/res/raw/aboutlibraries.json")
352362
}
353363
}
354364
tasks.withType<CompileArtProfileTask> {

app/proguard-rules.pro

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@
150150
-keep interface com.liskovsoft.googleapi.** { *; }
151151
-keep class com.eclipsesource.v8.** { *; }
152152

153-
## Rules for NewPipeExtractor
154-
-keep class org.mozilla.javascript.** { *; }
155-
-keep class org.mozilla.classfile.ClassFileWriter
156-
-dontwarn org.mozilla.javascript.tools.**
157-
158153
-dontwarn javax.script.AbstractScriptEngine
159154
-dontwarn javax.script.Bindings
160155
-dontwarn javax.script.Compilable
@@ -182,4 +177,17 @@
182177
-dontwarn jdk.dynalink.linker.TypeBasedGuardingDynamicLinker
183178
-dontwarn jdk.dynalink.linker.support.CompositeTypeBasedGuardingDynamicLinker
184179
-dontwarn jdk.dynalink.linker.support.Guards
185-
-dontwarn jdk.dynalink.support.ChainedCallSite
180+
-dontwarn jdk.dynalink.support.ChainedCallSite
181+
182+
## Rules for NewPipeExtractor
183+
-keep class org.schabi.newpipe.extractor.timeago.patterns.** { *; }
184+
-keep class org.mozilla.javascript.** { *; }
185+
-keep class org.mozilla.classfile.ClassFileWriter
186+
-dontwarn org.mozilla.javascript.tools.**
187+
# Please add these rules to your existing keep rules in order to suppress warning
188+
# This is generated automatically by the Android Gradle plugin.
189+
-dontwarn java.beans.BeanDescriptor
190+
-dontwarn java.beans.BeanInfo
191+
-dontwarn java.beans.IntrospectionException
192+
-dontwarn java.beans.Introspector
193+
-dontwarn java.beans.PropertyDescriptor

app/src/foss/java/com/maxrave/simpmusic/Crashlytics.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ fun reportCrash(throwable: Throwable) {
99
fun configCrashlytics(applicationContext: Context) {
1010
}
1111

12-
fun pushYouTubeError(error: Throwable) {
12+
fun pushPlayerError(error: Throwable) {
1313
}

app/src/full/java/com/maxrave/simpmusic/Crashlytics.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fun configCrashlytics(applicationContext: Context) {
1818
}
1919
}
2020

21-
fun pushYouTubeError(error: Throwable) {
21+
fun pushPlayerError(error: Throwable) {
2222
Sentry.withScope { scope ->
2323
Sentry.captureException(error)
2424
}

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
android:localeConfig="@xml/locale_config"
5050
android:networkSecurityConfig="@xml/network_security_config"
5151
android:supportsRtl="true"
52-
android:theme="@style/Theme.SimpMusic"
52+
android:theme="@style/Theme.Material3.Light.NoActionBar"
5353
android:enableOnBackInvokedCallback="true"
54+
android:extractNativeLibs="true"
5455
tools:targetApi="tiramisu">
5556
<receiver
5657
android:name=".ui.widget.BasicWidget"
@@ -72,6 +73,7 @@
7273
android:supportsPictureInPicture="true"
7374
android:enableOnBackInvokedCallback="true"
7475
android:launchMode="singleTask"
76+
android:theme="@style/Theme.Material3.Light.NoActionBar"
7577
tools:ignore="DiscouragedApi,LockedOrientationActivity">
7678
<intent-filter>
7779
<action android:name="android.intent.action.MAIN" />
@@ -84,7 +86,7 @@
8486
</intent-filter>
8587

8688
<!-- Youtube filter -->
87-
<intent-filter>
89+
<intent-filter android:autoVerify="true">
8890
<action android:name="android.intent.action.VIEW" />
8991
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
9092
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
@@ -109,7 +111,7 @@
109111
<!-- playlist prefix -->
110112
<data android:pathPrefix="/playlist" />
111113
</intent-filter>
112-
<intent-filter>
114+
<intent-filter android:autoVerify="true">
113115
<action android:name="android.intent.action.VIEW" />
114116
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
115117
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
@@ -176,9 +178,6 @@
176178
android:resource="@xml/provider_paths" />
177179
</provider>
178180

179-
<meta-data
180-
android:name="preloaded_fonts"
181-
android:resource="@array/preloaded_fonts" />
182181
<meta-data
183182
android:name="androidx.car.app.TintableAttributionIcon"
184183
android:resource="@drawable/monochrome" />

app/src/main/java/com/maxrave/simpmusic/data/dataStore/DataStoreManager.kt

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,6 @@ class DataStoreManager(
383383
}
384384
}
385385

386-
387-
388386
val translationLanguage =
389387
settingsDataStore.data.map { preferences ->
390388
val languageValue = language.first()
@@ -404,8 +402,6 @@ class DataStoreManager(
404402
}
405403
}
406404

407-
408-
409405
val maxSongCacheSize =
410406
settingsDataStore.data.map { preferences ->
411407
preferences[MAX_SONG_CACHE_SIZE] ?: -1
@@ -748,6 +744,19 @@ class DataStoreManager(
748744
}
749745
}
750746

747+
val updateChannel =
748+
settingsDataStore.data.map { preferences ->
749+
preferences[UPDATE_CHANNEL] ?: FDROID
750+
}
751+
752+
suspend fun setUpdateChannel(channel: String) {
753+
withContext(Dispatchers.IO) {
754+
settingsDataStore.edit { settings ->
755+
settings[UPDATE_CHANNEL] = channel
756+
}
757+
}
758+
}
759+
751760
val blurFullscreenLyrics =
752761
settingsDataStore.data.map { preferences ->
753762
preferences[BLUR_FULLSCREEN_LYRICS] ?: FALSE
@@ -1093,6 +1102,11 @@ class DataStoreManager(
10931102
val ENDLESS_QUEUE = stringPreferencesKey("endless_queue")
10941103
val SHOULD_SHOW_LOG_IN_REQUIRED_ALERT = stringPreferencesKey("should_show_log_in_required_alert")
10951104
val AUTO_CHECK_FOR_UPDATES = stringPreferencesKey("auto_check_for_updates")
1105+
val UPDATE_CHANNEL = stringPreferencesKey("update_channel")
1106+
const val FDROID = "fdroid"
1107+
1108+
const val GITHUB_FOSS_NIGHTLY = "github_foss_nightly"
1109+
const val GITHUB = "github_release"
10961110
val BLUR_FULLSCREEN_LYRICS = stringPreferencesKey("blur_fullscreen_lyrics")
10971111
val BLUR_PLAYER_BACKGROUND = stringPreferencesKey("blur_player_background")
10981112
val PLAYBACK_SPEED = floatPreferencesKey("playback_speed")
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.maxrave.simpmusic.data.model.update
2+
3+
data class UpdateData(
4+
val tagName: String,
5+
val releaseTime: String?,
6+
val body: String,
7+
)

0 commit comments

Comments
 (0)