Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support KDE Connect #163

Merged
merged 2 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion app/src/main/assets/app_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,23 @@
"remarks": ""
}
]
},
{
"packageName": "org.kde.kdeconnect_tp",
"name": "KDE Connect",
"rules": [
{
"startVersionCode": 12000,
"endVersionCode": 2147483647,
"excludeVersions": [],
"apiVersion": 0,
"useApi": false,
"getLyricType": 1,
"remarks": ""
}
]
}
],
"appRulesVersion": 8,
"appRulesVersion": 9,
"version": 6
}
4 changes: 3 additions & 1 deletion app/src/main/java/cn/lyric/getter/hook/MainHook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import cn.lyric.getter.hook.app.Bodian
import cn.lyric.getter.hook.app.Flamingo
import cn.lyric.getter.hook.app.Kugou
import cn.lyric.getter.hook.app.Kuwo
import cn.lyric.getter.hook.app.Kde
import cn.lyric.getter.hook.app.LMusic
import cn.lyric.getter.hook.app.Luna
import cn.lyric.getter.hook.app.Meizu
Expand Down Expand Up @@ -60,6 +61,7 @@ class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit {
"fun.upup.musicfree" -> initHooks(MusicFree)
"com.mimicry.mymusic" -> initHooks(Mimicry)
"yos.music.player" -> initHooks(Flamingo)
"org.kde.kdeconnect_tp" -> initHooks(Kde)
else -> initHooks(Api)
}
}
Expand All @@ -81,4 +83,4 @@ class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit {
}
}
}
}
}
14 changes: 14 additions & 0 deletions app/src/main/java/cn/lyric/getter/hook/app/Kde.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package cn.lyric.getter.hook.app

import cn.lyric.getter.hook.BaseHook
import cn.lyric.getter.tool.HookTools
import cn.lyric.getter.tool.HookTools.mediaMetadataCompatLyric

object Kde : BaseHook() {
override fun init() {
super.init()
HookTools.getApplication {
mediaMetadataCompatLyric(it.classLoader)
}
}
}
1 change: 1 addition & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
<item>fun.upup.musicfree</item>
<item>com.mimicry.mymusic</item>
<item>yos.music.player</item>
<item>org.kde.kdeconnect_tp</item>
</array>
</resources>
Loading