This commit is contained in:
yutou 2020-12-22 18:08:14 +08:00
parent cc04892205
commit fe2bc8812a

View File

@ -26,6 +26,7 @@ import java.util.Map;
import java.util.Set;
import static com.yutou.nas_music_player.tools.NetworkTool.NetworkAPI.HOME;
import static com.yutou.nas_music_player.tools.NetworkTool.NetworkAPI.HTTP_KEY;
public class NetworkTool {
@ -67,7 +68,7 @@ public class NetworkTool {
@Override
public void httpError(Exception e) {
System.out.println("局域网不在线,走互联网");
httpGet("http://tools.yutou233.cn/nas/music/getlocalhost.do", new JSONObject(), new NetworkInterface() {
httpGet("http://tools.yutou233.cn/nas/music/getlocalhost.do?token="+HTTP_KEY, new JSONObject(), new NetworkInterface() {
@Override
public void httpGetData(Object data, int state) {
try {
@ -228,9 +229,7 @@ public class NetworkTool {
final String finalStr = str.toString();
// Log.i(TAG + "[" + url + "?" + toGetSplice(body) + "]", "body:" + str + " (" + connection.getResponseCode() + ")");
if (map.containsKey(body)) {
map.remove(body);
}
AppData.handler.post(new Runnable() {
@Override
public void run() {