forked from qidian55/bilibilitv1.6.6-repair
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
qidian55
committed
Mar 25, 2024
1 parent
ddf4041
commit dd5f77d
Showing
24 changed files
with
2,471 additions
and
1,091 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,7 @@ | |
- 修复原版uid过长导致的用户搜索失败问题 | ||
- 测试性功能——模拟换台:直播时上下键切换频道 | ||
- 视频播放列表调整,合集作为备选 | ||
- 优化历史记录管理 | ||
|
||
|
||
## todo list | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package bl; | ||
|
||
import android.content.Context; | ||
import android.database.SQLException; | ||
import android.database.sqlite.SQLiteException; | ||
import android.text.TextUtils; | ||
import com.alibaba.fastjson.JSON; | ||
import com.alibaba.fastjson.JSONObject; | ||
import com.bilibili.tv.api.video.BiliVideoDetail; | ||
import com.bilibili.tv.api.video.BiliVideoHistorylList; | ||
import java.util.ArrayList; | ||
import java.util.Iterator; | ||
|
||
/* compiled from: BL */ | ||
/* loaded from: classes.dex */ | ||
public class zp extends aab { | ||
public zp(Context context) { | ||
super(context, "kvtdb_video_history_db"); | ||
} | ||
|
||
public BiliVideoHistorylList a(int i, int i2) throws SQLiteException { | ||
BiliVideoHistorylList biliVideoHistorylList = new BiliVideoHistorylList(); | ||
aaa b = b((i - 1) * i2, i2); | ||
if (b != null) { | ||
biliVideoHistorylList.mList = new ArrayList(); | ||
Iterator<zz> it = b.a.iterator(); | ||
while (it.hasNext()) { | ||
zz next = it.next(); | ||
if (!TextUtils.isEmpty(next.c)) { | ||
BiliVideoDetail biliVideoDetail = (BiliVideoDetail) JSON.parseObject(next.c, BiliVideoDetail.class); | ||
biliVideoDetail.mViewAt = next.b / 1000; | ||
biliVideoHistorylList.mList.add(biliVideoDetail); | ||
} | ||
} | ||
} | ||
return biliVideoHistorylList; | ||
} | ||
|
||
public BiliVideoHistorylList a() throws SQLiteException { | ||
return a(1, 1024); | ||
} | ||
|
||
public static void a(Context context, BiliVideoDetail biliVideoDetail) { | ||
zp zpVar = new zp(context); | ||
JSONObject jSONObject = new JSONObject(); | ||
jSONObject.put("aid", (Object) Integer.valueOf(biliVideoDetail.mAvid)); | ||
jSONObject.put("title", (Object) biliVideoDetail.mTitle); | ||
jSONObject.put("pic", (Object) biliVideoDetail.mCover); | ||
String jSONString = jSONObject.toJSONString(); | ||
if (TextUtils.isEmpty(jSONString)) { | ||
return; | ||
} | ||
zpVar.a(String.valueOf(biliVideoDetail.mAvid), jSONString); | ||
} | ||
|
||
public static void a(Context context) throws SQLException { | ||
new zp(context).c(); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
mybv/java/classes/com/bilibili/tv/api/history/BiliPlayerHistoryService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.bilibili.tv.api.history; | ||
|
||
import bl.vp; | ||
import com.alibaba.fastjson.JSONObject; | ||
import com.bilibili.okretro.GeneralResponse; | ||
import com.bilibili.tv.api.video.BiliVideoDetail; | ||
import java.util.List; | ||
import retrofit2.http.BaseUrl; | ||
import retrofit2.http.Field; | ||
import retrofit2.http.FormUrlEncoded; | ||
import retrofit2.http.GET; | ||
import retrofit2.http.POST; | ||
import retrofit2.http.Query; | ||
|
||
/* compiled from: BL */ | ||
@BaseUrl(a = "http://api.bilibili.com") | ||
/* loaded from: classes.dex */ | ||
public interface BiliPlayerHistoryService { | ||
@POST(a = "/x/v2/history/clear") | ||
vp<JSONObject> clearVideoHistories(@Query(a = "access_key") String str); | ||
|
||
@POST(a = "/x/v2/history/delete") | ||
vp<JSONObject> clearVideoHistories(@Query(a = "access_key") String access_key, @Query(a = "kid") String kid); | ||
|
||
@GET(a = "/x/v2/history?pn=1&ps=200") | ||
vp<GeneralResponse<List<BiliVideoDetail>>> getVideoHistoryList(@Query(a = "access_key") String str); | ||
|
||
@FormUrlEncoded | ||
@POST(a = "/x/v2/history/report") | ||
vp<GeneralResponse<Void>> reportProgress(@Field(a = "access_key") String str, @Field(a = "cid") long j, @Field(a = "aid") int i, @Field(a = "sid") long j2, @Field(a = "epid") long j3, @Field(a = "progress") long j4, @Field(a = "type") int i2, @Field(a = "realtime") long j5); | ||
} |
Oops, something went wrong.