Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
qidian55 committed Mar 25, 2024
1 parent ddf4041 commit dd5f77d
Show file tree
Hide file tree
Showing 24 changed files with 2,471 additions and 1,091 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
- 修复原版uid过长导致的用户搜索失败问题
- 测试性功能——模拟换台:直播时上下键切换频道
- 视频播放列表调整,合集作为备选
- 优化历史记录管理


## todo list
Expand Down
Binary file modified mybv.apk
Binary file not shown.
59 changes: 59 additions & 0 deletions mybv/java/classes/bl/zp.java
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();
}
}
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);
}
Loading

0 comments on commit dd5f77d

Please sign in to comment.