Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
Compatible with v6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bin456789 committed May 19, 2019
1 parent b192352 commit 439def2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
String path = uri.getPath().substring("/eapi/".length());
String modified = null;

if ("song/enhance/player/url".equals(path)) {
if ("song/enhance/player/url".equals(path) || "song/enhance/player/url/v1".equals(path)) {
modified = Handler.modifyPlayerOrDownloadApi(original, eapi, "player");

} else if ("song/enhance/download/url".equals(path)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
boolean hasCopyRight = new CloudMusicPackage.MusicInfo(musicInfo).hasCopyRight();
if (!hasCopyRight) {
SpannableString ssOld = (SpannableString) param.args[1];
SpannableString ssNew = new SpannableString(ssOld.toString().replace("付费独享", "下架歌曲"));
SpannableString ssNew = new SpannableString(ssOld.toString()
.replace("付费独享", "下架歌曲")
.replace("VIP专享", "下架歌曲 "));
Object[] spans = ssOld.getSpans(0, ssOld.length(), Object.class);
for (Object span : spans) {
ssNew.setSpan(span, ssOld.getSpanStart(span), ssOld.getSpanEnd(span), ssOld.getSpanFlags(span));
Expand Down

0 comments on commit 439def2

Please sign in to comment.