mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-06 08:06:43 +08:00
fix #72
This commit is contained in:
@@ -54,6 +54,9 @@ const filterForm = reactive({
|
|||||||
|
|
||||||
// 质量
|
// 质量
|
||||||
edition: [] as string[],
|
edition: [] as string[],
|
||||||
|
|
||||||
|
// 分辨率
|
||||||
|
resolution: [] as string[],
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取站点过滤选项
|
// 获取站点过滤选项
|
||||||
@@ -134,7 +137,20 @@ const getEditionFilterOptions = computed(() => {
|
|||||||
return options
|
return options
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 获取分辨率过滤选项
|
||||||
|
const getResolutionFilterOptions = computed(() => {
|
||||||
|
const options: string[] = []
|
||||||
|
|
||||||
|
dataList.value.forEach((data) => {
|
||||||
|
if (data.meta_info.resource_pix && !options.includes(data.meta_info.resource_pix))
|
||||||
|
options.push(data.meta_info.resource_pix)
|
||||||
|
})
|
||||||
|
|
||||||
|
return options
|
||||||
|
})
|
||||||
|
|
||||||
// 按过滤项过滤卡片
|
// 按过滤项过滤卡片
|
||||||
|
// eslint-disable-next-line sonarjs/cognitive-complexity
|
||||||
function filterTorrentsCard(data: Context) {
|
function filterTorrentsCard(data: Context) {
|
||||||
// 当前分组的所有数据
|
// 当前分组的所有数据
|
||||||
const items: Context[]
|
const items: Context[]
|
||||||
@@ -183,6 +199,13 @@ function filterTorrentsCard(data: Context) {
|
|||||||
)
|
)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
// 分辨率过滤
|
||||||
|
if (
|
||||||
|
filterForm.resolution.length > 0
|
||||||
|
&& !filterForm.resolution.includes(meta_info.resource_pix || '')
|
||||||
|
)
|
||||||
|
return false
|
||||||
|
|
||||||
// 质量过滤
|
// 质量过滤
|
||||||
return !(filterForm.edition.length > 0 && !filterForm.edition.includes(meta_info.edition))
|
return !(filterForm.edition.length > 0 && !filterForm.edition.includes(meta_info.edition))
|
||||||
}
|
}
|
||||||
@@ -345,6 +368,21 @@ onBeforeMount(fetchData)
|
|||||||
multiple
|
multiple
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
<VCol
|
||||||
|
v-if="getResolutionFilterOptions.length > 0"
|
||||||
|
cols="6"
|
||||||
|
md=""
|
||||||
|
>
|
||||||
|
<VSelect
|
||||||
|
v-model="filterForm.resolution"
|
||||||
|
:items="getResolutionFilterOptions"
|
||||||
|
size="small"
|
||||||
|
density="compact"
|
||||||
|
chips
|
||||||
|
label="分辨率"
|
||||||
|
multiple
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
<VCol
|
<VCol
|
||||||
v-if="getVideoCodeFilterOptions.length > 0"
|
v-if="getVideoCodeFilterOptions.length > 0"
|
||||||
cols="6"
|
cols="6"
|
||||||
|
|||||||
Reference in New Issue
Block a user