Skip to content

Commit

Permalink
修复 kuwo 和 qq 过滤机制
Browse files Browse the repository at this point in the history
  • Loading branch information
ndroi committed Sep 29, 2020
1 parent b5e27da commit ceb2e1a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Easy163/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "org.ndroi.easy163"
minSdkVersion 24
targetSdkVersion 29
versionCode 21
versionName "1.8.0"
versionCode 22
versionName "1.8.1"
}
buildTypes {
release {
Expand Down
2 changes: 2 additions & 0 deletions Easy163/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<action android:name="android.net.VpnService" />
</intent-filter>
</service>
<service android:name=".ui.EasyTileService" />

<activity
android:name=".ui.MainActivity"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.ndroi.easy163.providers;

import android.util.Log;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

Expand Down Expand Up @@ -46,12 +48,6 @@ public void collectCandidateKeywords()
for (Object obj : candidates)
{
JSONObject songJsonObject = (JSONObject) obj;
// I think it means 'isListenFree'
boolean isListenFree = songJsonObject.getBooleanValue("isListenFee");
if(!isListenFree)
{
continue;
}
Keyword candidateKeyword = new Keyword();
candidateKeyword.songName = songJsonObject.getString("name");
candidateKeyword.singers = Arrays.asList(songJsonObject.getString("artist").split("&"));
Expand Down Expand Up @@ -105,6 +101,7 @@ public Song fetchSongByJson(JSONObject jsonObject)
{
byte[] content = ReadStream.read(connection.getInputStream());
String songUrl = new String(content);
Log.d("Kuwo", songUrl);
if (songUrl.startsWith("http"))
{
song = generateSong(songUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ public static List<Provider> getProviders(Keyword targetKeyword)
List<Provider> providers = Arrays.asList(
new KuwoMusic(targetKeyword),
new MiguMusic(targetKeyword),
new QQMusic(targetKeyword),
new KugouMusic(targetKeyword)
new QQMusic(targetKeyword)
//new KugouMusic(targetKeyword)
);
return providers;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ public void collectCandidateKeywords()
{
continue;
}
int fnote = songJsonObject.getIntValue("fnote");
if (fnote == 4002)
{
continue;
}
JSONObject files = songJsonObject.getJSONObject("file");
if(files.getIntValue("size_128") == 0 && files.getIntValue("size_320") == 0)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.ndroi.easy163.ui;

import android.service.quicksettings.TileService;

public class EasyTileService extends TileService
{

}

0 comments on commit ceb2e1a

Please sign in to comment.