Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
v2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Moriafly committed Jan 31, 2021
1 parent 9c52f3e commit f849686
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 31 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ android {
applicationId "com.dirror.music"
minSdkVersion 21
targetSdkVersion 30
versionCode 307
versionName "2.6.0-beta"
versionCode 310
versionName "2.6.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -110,7 +110,7 @@ dependencies {
implementation 'com.arialyy.aria:core:3.8.12'
annotationProcessor 'com.arialyy.aria:compiler:3.8.12'
// LyricViewX
implementation 'com.github.Moriafly:LyricViewX:1.1.1'
implementation 'com.github.Moriafly:LyricViewX:1.1.2'

implementation 'com.bitvale:switcher:1.1.1'
}
Binary file not shown.
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
{
"type": "SINGLE",
"filters": [],
"versionCode": 306,
"versionName": "2.6.0-beta",
"versionCode": 310,
"versionName": "2.6.0",
"outputFile": "app-release.apk"
}
]
Expand Down
32 changes: 18 additions & 14 deletions app/src/main/java/com/dirror/music/music/qq/PlayUrl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@ object PlayUrl {
val url = """https://u.y.qq.com/cgi-bin/musicu.fcg?g_tk=5381&loginUin=0&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq.json&needNewCode=0&data={"req":{"module":"CDN.SrfCdnDispatchServer","method":"GetCdnDispatch","param":{"guid":"8348972662","calltype":0,"userip":""}},"req_0":{"module":"vkey.GetVkeyServer","method":"CgiGetVkey","param":{"guid":"8348972662","songmid":["${songmid}"],"songtype":[1],"uin":"0","loginflag":1,"platform":"20"}},"comm":{"uin":0,"format":"json","ct":24,"cv":0}}""".trimIndent()
loge("请求地址:${url}")
MagicHttp.OkHttpManager().newGet(url, {
loge("返回的 JSON:${it}")
// 获取 vkeyData
val vkeyData = Gson().fromJson(it, VkeyData::class.java)
// 获取 ip
val ip = vkeyData.req.data.freeflowsip[0]
// 获取 vkey
val purl = vkeyData.req_0.data.midurlinfo[0].purl
try {
loge("返回的 JSON:${it}")
// 获取 vkeyData
val vkeyData = Gson().fromJson(it, VkeyData::class.java)
// 获取 ip
val ip = vkeyData.req.data.freeflowsip[0]
// 获取 vkey
val purl = vkeyData.req_0.data.midurlinfo[0].purl

if (purl != "") {
success.invoke(ip + purl)
loge(ip + purl)
loge("http://dl.stream.qqmusic.qq.com/M800001L6DVu3OB1c9.mp3?vkey=419F0FD2E2552C95C4E76BFDFBF2BC331A2983AAEDC9CF91BBD4195603FE19B6550874248A1A87410D84D0405B2ABBD0F533F192C9B8EB35&guid=YYFM&uin=123456&fromtag=53\n")
} else {
// 获取 Dirror 音乐
success.invoke(SearchSong.getDirrorSongUrl(songmid))
}
} catch (e: Exception) {

if (purl != "") {
success.invoke(ip + purl)
loge(ip + purl)
loge("http://dl.stream.qqmusic.qq.com/M800001L6DVu3OB1c9.mp3?vkey=419F0FD2E2552C95C4E76BFDFBF2BC331A2983AAEDC9CF91BBD4195603FE19B6550874248A1A87410D84D0405B2ABBD0F533F192C9B8EB35&guid=YYFM&uin=123456&fromtag=53\n")
} else {
// 获取 Dirror 音乐
success.invoke(SearchSong.getDirrorSongUrl(songmid))
}
}, {

Expand Down
26 changes: 14 additions & 12 deletions app/src/main/java/com/dirror/music/music/qq/SearchSong.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@ object SearchSong {
}
val qqSearch = Gson().fromJson(response, QQSearch::class.java)
val standardSongList = ArrayList<StandardSongData>()
for (song in qqSearch.data.song.list) {
standardSongList.add(
StandardSongData(
SOURCE_QQ,
song.songmid,
song.songname,
song.albummid, // 歌单 id
song.singer,
null,
null,
null
if (qqSearch.data.song.list.isNotEmpty()) {
for (song in qqSearch.data.song.list) {
standardSongList.add(
StandardSongData(
SOURCE_QQ,
song.songmid,
song.songname,
song.albummid, // 歌单 id
song.singer,
null,
null,
null
)
)
)
}
}
success.invoke(standardSongList)
}, {
Expand Down

0 comments on commit f849686

Please sign in to comment.