pull/210/head
FongMi 2 years ago
parent f190b45821
commit 85060d66d9
  1. 4
      app/src/main/java/com/fongmi/android/tv/api/LiveParser.java
  2. 2
      app/src/main/java/com/fongmi/android/tv/bean/ClearKey.java

@ -248,8 +248,8 @@ public class LiveParser {
ClearKey.objectFrom(key);
} catch (Exception e) {
String[] split = key.replace("\"", "").replace("{", "").replace("}", "").split(":");
String kid = Util.base64(Util.hex2byte(split[0])).replace("=", "");
String k = Util.base64(Util.hex2byte(split[1])).replace("=", "");
String kid = Util.base64(Util.hex2byte(split[0].trim())).replace("=", "");
String k = Util.base64(Util.hex2byte(split[1].trim())).replace("=", "");
key = ClearKey.get(kid, k).toString();
}
}

@ -17,7 +17,7 @@ public class ClearKey {
public static ClearKey objectFrom(String str) throws Exception {
ClearKey item = App.gson().fromJson(str, ClearKey.class);
if (item == null || item.keys == null) throw new Exception();
if (item.keys == null) throw new Exception();
return item;
}

Loading…
Cancel
Save