mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
优化订阅和整理对话框,添加剧集组选项和编号,调整布局以提升用户体验
This commit is contained in:
+9
-1
@@ -77,7 +77,11 @@ export interface Subscribe {
|
|||||||
// 过滤规则组
|
// 过滤规则组
|
||||||
filter_groups?: string[]
|
filter_groups?: string[]
|
||||||
// 下载器
|
// 下载器
|
||||||
downloader: string
|
downloader?: string
|
||||||
|
// 可选剧集组
|
||||||
|
episode_groups?: Record<string, any>[]
|
||||||
|
// 自定义剧集组
|
||||||
|
episode_group?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// 订阅分享
|
// 订阅分享
|
||||||
@@ -138,6 +142,8 @@ export interface SubscribeShare {
|
|||||||
media_category?: string
|
media_category?: string
|
||||||
// 复用次数
|
// 复用次数
|
||||||
count?: number
|
count?: number
|
||||||
|
// 自定义剧集组
|
||||||
|
episode_group?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// 历史记录
|
// 历史记录
|
||||||
@@ -1214,6 +1220,8 @@ export interface TransferForm {
|
|||||||
library_type_folder?: boolean
|
library_type_folder?: boolean
|
||||||
// 媒体库类别子目录
|
// 媒体库类别子目录
|
||||||
library_category_folder?: boolean
|
library_category_folder?: boolean
|
||||||
|
// 剧集组编号
|
||||||
|
episode_group?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// 整理队列
|
// 整理队列
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ onUnmounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VDialog scrollable max-width="50rem" :fullscreen="!display.mdAndUp.value">
|
<VDialog scrollable max-width="45rem" :fullscreen="!display.mdAndUp.value">
|
||||||
<VCard :title="dialogTitle" class="rounded-t">
|
<VCard :title="dialogTitle" class="rounded-t">
|
||||||
<DialogCloseBtn @click="emit('close')" />
|
<DialogCloseBtn @click="emit('close')" />
|
||||||
<VDivider />
|
<VDivider />
|
||||||
@@ -263,7 +263,7 @@ onUnmounted(() => {
|
|||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="4">
|
<VCol cols="12" md="6">
|
||||||
<VSelect
|
<VSelect
|
||||||
v-model="transferForm.type_name"
|
v-model="transferForm.type_name"
|
||||||
label="类型"
|
label="类型"
|
||||||
@@ -276,7 +276,7 @@ onUnmounted(() => {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="4">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-if="mediaSource === 'themoviedb'"
|
v-if="mediaSource === 'themoviedb'"
|
||||||
v-model="transferForm.tmdbid"
|
v-model="transferForm.tmdbid"
|
||||||
@@ -302,19 +302,37 @@ onUnmounted(() => {
|
|||||||
@click:append-inner="mediaSelectorDialog = true"
|
@click:append-inner="mediaSelectorDialog = true"
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="4">
|
</VRow>
|
||||||
<VSelect
|
<VRow v-show="transferForm.type_name === '电视剧'">
|
||||||
v-show="transferForm.type_name === '电视剧'"
|
<VCol cols="12" md="6">
|
||||||
v-model.number="transferForm.season"
|
<VTextField
|
||||||
label="季"
|
v-model="transferForm.episode_group"
|
||||||
:items="seasonItems"
|
label="剧集组编号"
|
||||||
hint="指定季数"
|
placeholder="手动查询剧集组"
|
||||||
|
hint="指定剧集组"
|
||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
<VCol cols="12" md="3">
|
||||||
<VRow>
|
<VSelect
|
||||||
<VCol cols="12" md="8">
|
v-model.number="transferForm.season"
|
||||||
|
label="季"
|
||||||
|
:items="seasonItems"
|
||||||
|
hint="第几季"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="3">
|
||||||
|
<VTextField
|
||||||
|
v-model="transferForm.episode_detail"
|
||||||
|
:disabled="disableEpisodeDetail"
|
||||||
|
label="集"
|
||||||
|
placeholder="起始集,终止集"
|
||||||
|
hint="集数或范围,如1或1,2"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="transferForm.episode_format"
|
v-model="transferForm.episode_format"
|
||||||
label="集数定位"
|
label="集数定位"
|
||||||
@@ -323,26 +341,7 @@ onUnmounted(() => {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="4">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
|
||||||
v-model="transferForm.episode_detail"
|
|
||||||
:disabled="disableEpisodeDetail"
|
|
||||||
label="指定集数"
|
|
||||||
placeholder="起始集,终止集,如1或1,2"
|
|
||||||
hint="指定集数或范围,如1或1,2"
|
|
||||||
persistent-hint
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="4">
|
|
||||||
<VTextField
|
|
||||||
v-model="transferForm.episode_part"
|
|
||||||
label="指定Part"
|
|
||||||
placeholder="如part1"
|
|
||||||
hint="指定Part,如part1"
|
|
||||||
persistent-hint
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="4">
|
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="transferForm.episode_offset"
|
v-model="transferForm.episode_offset"
|
||||||
label="集数偏移"
|
label="集数偏移"
|
||||||
@@ -351,7 +350,18 @@ onUnmounted(() => {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="4">
|
</VRow>
|
||||||
|
<VRow>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VTextField
|
||||||
|
v-model="transferForm.episode_part"
|
||||||
|
label="指定Part"
|
||||||
|
placeholder="如part1"
|
||||||
|
hint="指定Part,如part1"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model.number="transferForm.min_filesize"
|
v-model.number="transferForm.min_filesize"
|
||||||
label="最小文件大小(MB)"
|
label="最小文件大小(MB)"
|
||||||
|
|||||||
@@ -61,6 +61,17 @@ const $toast = useToast()
|
|||||||
// 下载器选项
|
// 下载器选项
|
||||||
const downloaderOptions = ref<{ title: string; value: string }[]>([])
|
const downloaderOptions = ref<{ title: string; value: string }[]>([])
|
||||||
|
|
||||||
|
// 剧集组选项
|
||||||
|
const episodeGroupOptions = ref<{ title: string; subtitle: string; value: number }[]>([])
|
||||||
|
|
||||||
|
// 剧集组选项属性
|
||||||
|
function episodeGroupItemProps(item: { title: string; subtitle: string }) {
|
||||||
|
return {
|
||||||
|
title: item.title,
|
||||||
|
subtitle: item.subtitle,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function loadDownloaderSetting() {
|
async function loadDownloaderSetting() {
|
||||||
try {
|
try {
|
||||||
const downloaders: DownloaderConf[] = await api.get('download/clients')
|
const downloaders: DownloaderConf[] = await api.get('download/clients')
|
||||||
@@ -178,6 +189,19 @@ async function getSubscribeInfo() {
|
|||||||
subscribeForm.value = result
|
subscribeForm.value = result
|
||||||
subscribeForm.value.best_version = subscribeForm.value.best_version === 1
|
subscribeForm.value.best_version = subscribeForm.value.best_version === 1
|
||||||
subscribeForm.value.search_imdbid = subscribeForm.value.search_imdbid === 1
|
subscribeForm.value.search_imdbid = subscribeForm.value.search_imdbid === 1
|
||||||
|
|
||||||
|
// 从result.episode_groups中获取剧集组
|
||||||
|
if (result?.episode_groups) {
|
||||||
|
episodeGroupOptions.value = (result?.episode_groups as { id: number; name: string; episode_count: number }[]).map(
|
||||||
|
item => {
|
||||||
|
return {
|
||||||
|
title: item.name,
|
||||||
|
subtitle: `${item.episode_count} 集`,
|
||||||
|
value: item.id,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
@@ -317,7 +341,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VDialog scrollable max-width="50rem" :fullscreen="!display.mdAndUp.value">
|
<VDialog scrollable max-width="45rem" :fullscreen="!display.mdAndUp.value">
|
||||||
<VCard
|
<VCard
|
||||||
:title="`${
|
:title="`${
|
||||||
props.default
|
props.default
|
||||||
@@ -480,7 +504,7 @@ onMounted(() => {
|
|||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12">
|
||||||
<VSelect
|
<VSelect
|
||||||
v-model="subscribeForm.filter_groups"
|
v-model="subscribeForm.filter_groups"
|
||||||
:items="filterRuleGroupOptions"
|
:items="filterRuleGroupOptions"
|
||||||
@@ -492,6 +516,16 @@ onMounted(() => {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
<VCol v-if="!props.default && subscribeForm.type === '电视剧'" cols="12" md="6">
|
||||||
|
<VSelect
|
||||||
|
v-model="subscribeForm.episode_group"
|
||||||
|
:items="episodeGroupOptions"
|
||||||
|
:item-props="episodeGroupItemProps"
|
||||||
|
label="指定剧集组"
|
||||||
|
hint="按特定剧集组识别和刮削"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
<VCol cols="12" md="6" v-if="!props.default">
|
<VCol cols="12" md="6" v-if="!props.default">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="subscribeForm.media_category"
|
v-model="subscribeForm.media_category"
|
||||||
|
|||||||
Reference in New Issue
Block a user