diff --git a/app/build.gradle b/app/build.gradle index a0e28109..8fec7be0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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" @@ -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' } \ No newline at end of file diff --git a/app/release/2.6.0-beta2.apk b/app/release/2.6.0.apk similarity index 70% rename from app/release/2.6.0-beta2.apk rename to app/release/2.6.0.apk index 05908b56..e69f97a0 100644 Binary files a/app/release/2.6.0-beta2.apk and b/app/release/2.6.0.apk differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 7f5bab54..7a11fed7 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -10,8 +10,8 @@ { "type": "SINGLE", "filters": [], - "versionCode": 306, - "versionName": "2.6.0-beta", + "versionCode": 310, + "versionName": "2.6.0", "outputFile": "app-release.apk" } ] diff --git a/app/src/main/java/com/dirror/music/music/qq/PlayUrl.kt b/app/src/main/java/com/dirror/music/music/qq/PlayUrl.kt index 3d351020..733ac8b9 100644 --- a/app/src/main/java/com/dirror/music/music/qq/PlayUrl.kt +++ b/app/src/main/java/com/dirror/music/music/qq/PlayUrl.kt @@ -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¬ice=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)) } }, { diff --git a/app/src/main/java/com/dirror/music/music/qq/SearchSong.kt b/app/src/main/java/com/dirror/music/music/qq/SearchSong.kt index d3bf55ce..0e86bb80 100644 --- a/app/src/main/java/com/dirror/music/music/qq/SearchSong.kt +++ b/app/src/main/java/com/dirror/music/music/qq/SearchSong.kt @@ -17,19 +17,21 @@ object SearchSong { } val qqSearch = Gson().fromJson(response, QQSearch::class.java) val standardSongList = ArrayList() - 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) }, {