Skip to content

Commit

Permalink
添加显示评分开关
Browse files Browse the repository at this point in the history
增加排除合集规则
  • Loading branch information
wushuo894 committed Sep 24, 2024
1 parent 1d7cc06 commit be7fc67
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/java/ani/rss/entity/Ani.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static Ani bulidAni() {
.setCurrentEpisodeNumber(0)
.setTotalEpisodeNumber(0)
.setMatch(List.of())
.setExclude(List.of("720"))
.setExclude(List.of("720","\\[\\d+-\\d+([ 合集总集]+)?\\]"))
.setBgmUrl("")
.setSubgroup("");
}
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 @@ -59,6 +59,11 @@ public class Config implements Serializable {
*/
private Boolean watchErrorTorrent;

/**
* 显示评分
*/
private Boolean scoreShow;

/**
* 间隔/分钟
*/
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/ani/rss/util/ConfigUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class ConfigUtil {
.setSslEnable(false)
)
.setLogin(new Login().setUsername("admin").setPassword(password))
.setExclude(List.of("720"))
.setExclude(List.of("720","\\[\\d+-\\d+([ 合集总集]+)?\\]"))
.setImportExclude(false)
.setEnabledExclude(false)
.setTelegram(false)
Expand All @@ -85,7 +85,8 @@ public class ConfigUtil {
.setOmit(false)
.setBgmToken("")
.setApiKey("")
.setWeekShow(true);
.setWeekShow(true)
.setScoreShow(false);
}

private static final Gson GSON = new GsonBuilder()
Expand Down
3 changes: 3 additions & 0 deletions ui/src/config/Basic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<el-form-item label="按星期展示">
<el-switch v-model:model-value="props.config.weekShow"/>
</el-form-item>
<el-form-item label="显示评分">
<el-switch v-model:model-value="props.config.scoreShow"/>
</el-form-item>
<el-form-item label="自动跳过">
<div style="width: 100%">
<el-switch v-model:model-value="props.config.fileExist" :disabled="!config.rename"/>
Expand Down
3 changes: 2 additions & 1 deletion ui/src/home/Config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ const config = ref({
'importExclude': false,
'bgmToken': '',
'apiKey': '',
'weekShow': false
'weekShow': false,
'scoreShow': false
})
const activeName = ref('download')
Expand Down
22 changes: 20 additions & 2 deletions ui/src/home/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,27 @@
letter-spacing: .0125em;">
{{ item.title }}
</div>
<div style="margin-bottom: 8px;">
<div style="margin-bottom: 8px;" v-if="scoreShow">
<h4 style="color: #E800A4;">
{{ item['score']}}
{{ item['score'] }}
</h4>
</div>
<div style="
color: #9e9e9e !important;
font-size: .75rem !important;
font-weight: 300;
line-height: 1.667;
-webkit-line-clamp: 2;
max-width: 220px;
overflow: hidden;
text-overflow: ellipsis;
letter-spacing: .0333333333em !important;
font-family: Roboto, sans-serif;
text-transform: none !important;"
v-else
>
{{ item.url }}
</div>
<div style="
width: 180px;
display: grid;
Expand Down Expand Up @@ -179,6 +195,7 @@ const edit = ref()
const pageSize = ref(40)
const loading = ref(true)
const playList = ref()
const scoreShow = ref(false)
const showPlaylist = ref(false)
const searchList = (week) => {
Expand Down Expand Up @@ -224,6 +241,7 @@ const getList = () => {
.then(res => {
showPlaylist.value = res.data.showPlaylist
weekShow.value = res.data.weekShow
scoreShow.value = res.data.scoreShow
if (!weekShow.value) {
weekList.value = [{
i: 1,
Expand Down
2 changes: 1 addition & 1 deletion ui/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ html, body, #app {

.grid-container {
display: grid;
grid-gap: 5px;
grid-gap: 8px;
width: 100%;
}

Expand Down

0 comments on commit be7fc67

Please sign in to comment.