This commit is contained in:
sifacaii 2023-05-18 21:19:58 +08:00
parent 2f3b01cafc
commit d053b5a469
2 changed files with 3 additions and 3 deletions

View File

@ -205,8 +205,8 @@ public class DlnaActivity extends BaseActivity {
//Log.d(TAG, "ProgressNOTIFY: " + data);
if(data.startsWith("M-SEARCH")) return;
HashMap<String,String> dh = DlnaDevice.parseNOTIFY(data);
boolean isav = DlnaDevice.isMediaRenderer(dh.get("NT"));
String location = dh.get("Location");
boolean isav = DlnaDevice.isMediaRenderer(dh.get("nt"));
String location = dh.get("location");
if(location == null) location = "";
if (isav && !location.equals("")) {
String finalLocation = location;

View File

@ -28,7 +28,7 @@ public class DlnaDevice {
for (String n:notify) {
String[] ns = n.split(":", 2);
if (ns.length < 2) continue;
hm.put(ns[0],ns[1].trim());
hm.put(ns[0].toLowerCase(),ns[1].trim());
}
return hm;
}