Skip to content

Commit

Permalink
Merge pull request #145 from wushuo894/test
Browse files Browse the repository at this point in the history
1.1.220
  • Loading branch information
wushuo894 authored Jan 15, 2025
2 parents 319d720 + 0ccd0be commit 737eaae
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
6 changes: 5 additions & 1 deletion UPDATE.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
重命名模版增加 分辨率 ${resolution}
PWA主题色跟随系统主题

close #143

bgm点格子前先判断状态,防止刷屏 #142 @EzraRT
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ani.rss</groupId>
<artifactId>ani-rss</artifactId>
<version>1.1.219</version>
<version>1.1.220</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/ani/rss/util/BgmUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,21 @@ public static String getEpisodeId(String subjectId, Double e) {
public static void collectionsEpisodes(String episodeId, Integer type) {
ThreadUtil.sleep(500);
Objects.requireNonNull(episodeId);

// bgm点格子前先判断状态,防止刷屏 #142
JsonObject jsonObject = HttpReq.get(host + "/v0/users/-/collections/-/episodes/" + episodeId, true)
.header("Authorization", "Bearer " + ConfigUtil.CONFIG.getBgmToken())
.contentType(ContentType.JSON.getValue())
.thenFunction(res -> GsonStatic.fromJson(res.body(), JsonObject.class));

int typeNow = jsonObject.get("type").getAsInt();
if (type == typeNow) {
return;
}

// 间隔 500 毫秒, 防止流控
ThreadUtil.sleep(500);

HttpReq.put(host + "/v0/users/-/collections/-/episodes/" + episodeId, true)
.header("Authorization", "Bearer " + ConfigUtil.CONFIG.getBgmToken())
.contentType(ContentType.JSON.getValue())
Expand Down
2 changes: 2 additions & 0 deletions ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>ANI-RSS</title>
<link rel="manifest" href="/manifest.json"/>
<meta content="#ffffff" media="(prefers-color-scheme: light)" name="theme-color" />
<meta content="#000000" media="(prefers-color-scheme: dark)" name="theme-color" />
</head>
<script>
if (!location.pathname.endsWith('/') && !location.href.endsWith('#')) {
Expand Down
1 change: 0 additions & 1 deletion ui/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

0 comments on commit 737eaae

Please sign in to comment.