Commit 4fd0720d authored by liuyang's avatar liuyang

APK图片抓取识别及轮播流地址抓取,客户端播放地址去重

#BYLSERVER-1438
parent a159a984
...@@ -179,7 +179,7 @@ class Task : IAppBaseCallback { ...@@ -179,7 +179,7 @@ class Task : IAppBaseCallback {
val playUrls = JSONArray() val playUrls = JSONArray()
for (playUrl in playUrlItems) { for (playUrl in playUrlItems) {
playUrls.put(playUrl.url) playUrls.put(playUrl)
} }
channelJson.putOpt("playUrls", playUrls) channelJson.putOpt("playUrls", playUrls)
...@@ -204,8 +204,8 @@ class Task : IAppBaseCallback { ...@@ -204,8 +204,8 @@ class Task : IAppBaseCallback {
} }
// 分析http抓包文件 // 分析http抓包文件
private fun analysisCapture(): ArrayList<PlayInfo> { private fun analysisCapture(): ArrayList<String> {
val playUrlItems = ArrayList<PlayInfo>() val playUrlItems = ArrayList<String>()
val file = File(this.capturePath) val file = File(this.capturePath)
if (!file.exists()) if (!file.exists())
return playUrlItems return playUrlItems
...@@ -250,12 +250,9 @@ class Task : IAppBaseCallback { ...@@ -250,12 +250,9 @@ class Task : IAppBaseCallback {
} }
} }
if (add) { if (add && !playUrlItems.contains(url)) {
val item = PlayInfo()
item.url = url
item.time = timeStr
playUrlItems.add(item) playUrlItems.add(url)
} }
partUrl = "" partUrl = ""
...@@ -374,9 +371,4 @@ class Task : IAppBaseCallback { ...@@ -374,9 +371,4 @@ class Task : IAppBaseCallback {
fun onComplete(result: Boolean) fun onComplete(result: Boolean)
} }
class PlayInfo {
var time = ""
var url = ""
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment