优化下载
This commit is contained in:
@@ -45,7 +45,7 @@ public class LiveRoomConfig {
|
||||
public static LiveRoomConfig buildConfig(String roomId){
|
||||
BiliLiveConfigDatabase database = new BiliLiveConfigDatabase();
|
||||
LiveConfigDatabaseBean bean = database.getConfig(new String(roomId));
|
||||
|
||||
database.close();
|
||||
LiveRoomConfig config = new LiveRoomConfig();
|
||||
config.setLoginUid(bean.getRecordUid());
|
||||
config.setRoomId(bean.getRoomId());
|
||||
|
||||
@@ -35,6 +35,6 @@ public class LoginCookieDatabaseBean extends AbsDatabasesBean {
|
||||
}
|
||||
|
||||
public String toCookieString() {
|
||||
return "SESSDATA=" + sessdta + "; Path=" + path + "; DedeUserID=" + dedeUserID + "; DedeUserID__ckMd5=" + dedeUserIDCkMd5 + "; bili_jct=" + biliJct + "; Expires=" + expires + "; Domain=" + domain + "; sid=" + sid + "; gourl=" + gourl;
|
||||
return "SESSDATA=" + sessdta + "; Path=" + path + "; DedeUserID=" + dedeUserID + "; DedeUserID__ckMd5=" + dedeUserIDCkMd5 + "; bili_jct=" + biliJct + "; Expires=" + expires + "; Domain=" + domain + "; sid=" + sid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class BiliLiveDatabase extends SQLiteManager {
|
||||
}
|
||||
|
||||
public void addSource(WSData bean) {
|
||||
Log.i("BiliLiveDatabase.addSource", config.getRoomId());
|
||||
// Log.i("BiliLiveDatabase.addSource", config.getRoomId());
|
||||
add(new LiveSourceDatabaseBean(bean));
|
||||
addData(bean);
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public class WebSocketManager {
|
||||
heartbeatTask.setSocket(this);
|
||||
heartbeatTask.sendInitAuthData();
|
||||
new Timer().schedule(heartbeatTask, 1000, 30000);
|
||||
Log.i("WebSocketClientTh.onOpen", roomConfig);
|
||||
Log.i("WebSocketClientTh.onOpen", roomConfig.getRoomId());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -296,7 +296,7 @@ public class WebSocketManager {
|
||||
json.put("key", roomConfig.getLiveInfo().getToken());
|
||||
byte[] bytes = {0, 16, 0, 1, 0, 0, 0, 7, 0, 0, 0, 1};
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
Log.i("bytes.length = " + bytes.length);
|
||||
// Log.i("bytes.length = " + bytes.length);
|
||||
Log.i(json);
|
||||
outputStream.write(BytesUtils.toLH(json.toString().length() + 16));
|
||||
outputStream.write(bytes);
|
||||
|
||||
Reference in New Issue
Block a user