Skip to content

Commit

Permalink
2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbxyyx committed Oct 29, 2024
1 parent a76f96e commit 5ceafe5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ android {
applicationId "com.github.jsbxyyx.xbook"
minSdk 27
targetSdk 33
versionCode 26
versionName "2.6"
versionCode 27
versionName "2.7"
archivesBaseName = "xplay"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.github.jsbxyyx.xbook.common.HttpStatusException;
import com.github.jsbxyyx.xbook.common.JsonUtil;
import com.github.jsbxyyx.xbook.common.LogUtil;
import com.github.jsbxyyx.xbook.common.UiUtils;
import com.github.jsbxyyx.xbook.data.bean.QqVideo;
import com.github.jsbxyyx.xbook.data.bean.QqVideoHotRank;
import com.github.jsbxyyx.xbook.data.bean.QqVideoHotWord;
Expand All @@ -35,6 +36,8 @@ public class VideoNetHelper {

private String userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36";

private String vc = "vc";

private String TAG = getClass().getSimpleName();

public void search(String q, DataCallback dataCallback) {
Expand All @@ -59,6 +62,7 @@ public void search(String q, DataCallback dataCallback) {
LogUtil.d(TAG, "search request: %s : %s", reqUrl, s);
Request request = new Request.Builder()
.url(xburl)
.header(vc, UiUtils.getVersionCode() + "")
.post(RequestBody.create(s, MediaType.parse("application/json")))
.build();
HttpHelper.getClient().newCall(request).enqueue(new Callback() {
Expand Down Expand Up @@ -112,6 +116,7 @@ public void hotRank(DataCallback dataCallback) {
LogUtil.d(TAG, "hotrank request: %s : %s", reqUrl, s);
Request request = new Request.Builder()
.url(xburl)
.header(vc, UiUtils.getVersionCode() + "")
.post(RequestBody.create(s, MediaType.parse("application/json")))
.build();
HttpHelper.getClient().newCall(request).enqueue(new Callback() {
Expand Down Expand Up @@ -165,6 +170,7 @@ public void hotWord(DataCallback dataCallback) {
LogUtil.d(TAG, "hotrank request: %s : %s", reqUrl, s);
Request request = new Request.Builder()
.url(xburl)
.header(vc, UiUtils.getVersionCode() + "")
.post(RequestBody.create(s, MediaType.parse("application/json")))
.build();
HttpHelper.getClient().newCall(request).enqueue(new Callback() {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
android:text="清除设置" />

<LinearLayout
android:layout_marginTop="100dp"
android:layout_marginTop="40dp"
android:orientation="vertical"
android:gravity="center"
android:layout_gravity="center"
Expand All @@ -180,14 +180,14 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="30dp"
android:gravity="center"
android:text="当前版本:" />

<TextView
android:id="@+id/tv_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="30dp"
android:gravity="center"
android:text="0.1" />

Expand Down

0 comments on commit 5ceafe5

Please sign in to comment.