Skip to content

Commit

Permalink
Merge pull request #150 from wushuo894/test
Browse files Browse the repository at this point in the history
1.1.223
  • Loading branch information
wushuo894 authored Jan 22, 2025
2 parents 6951036 + 6b0c201 commit dfb2081
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion UPDATE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
优化 `仅在主RSS更新后删除备用RSS`
支持设置新订阅获取的封面图片质量
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.222</version>
<version>1.1.223</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/ani/rss/entity/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -467,4 +467,9 @@ public class Config implements Serializable {
* 版本
*/
private String version;

/**
* 获取BGM封面图片质量
*/
private String bgmImage;
}
5 changes: 4 additions & 1 deletion src/main/java/ani/rss/util/BgmUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import ani.rss.entity.Ani;
import ani.rss.entity.BgmInfo;
import ani.rss.entity.Config;
import cn.hutool.cache.Cache;
import cn.hutool.cache.CacheUtil;
import cn.hutool.core.convert.Convert;
Expand Down Expand Up @@ -281,7 +282,9 @@ public static BgmInfo getBgmInfo(String subjectId, Boolean isCache) {

JsonObject images = jsonObject.getAsJsonObject("images");
if (Objects.nonNull(images)) {
bgmInfo.setImage(images.get("common").getAsString());
Config config = ConfigUtil.CONFIG;
String bgmImage = config.getBgmImage();
bgmInfo.setImage(images.get(bgmImage).getAsString());
}

Set<String> tags = jsonObject.getAsJsonArray("tags")
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/ani/rss/util/ConfigUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public class ConfigUtil {
.setAlistPath("/")
.setAlistHost("")
.setAlistToken("")
.setVersion("");
.setVersion("")
.setBgmImage("large");
}

/**
Expand Down
6 changes: 6 additions & 0 deletions ui/src/config/Basic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
<el-form-item label="默认导入全局排除">
<el-switch v-model:model-value="props.config.importExclude" :disabled="props.config.enabledExclude"/>
</el-form-item>
<el-form-item label="封面质量">
<el-select v-model:model-value="props.config['bgmImage']" style="width: 150px;">
<el-option v-for="item in ['small','grid','large','medium','common']" :value="item"
:key="item"></el-option>
</el-select>
</el-form-item>
</el-form>
</el-collapse-item>
<el-collapse-item title="重命名设置" name="3">
Expand Down

0 comments on commit dfb2081

Please sign in to comment.