mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-04 23:18:44 +08:00
Merge branch 'v2' of https://github.com/jxxghp/MoviePilot-Frontend into v2
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "moviepilot",
|
"name": "moviepilot",
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"bin": "dist/service.js",
|
"bin": "dist/service.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+40
-1
@@ -1051,7 +1051,7 @@ export interface TransferDirectoryConf {
|
|||||||
// 监控模式 fast/compatibility
|
// 监控模式 fast/compatibility
|
||||||
monitor_mode?: string
|
monitor_mode?: string
|
||||||
// 整理方式 move/copy/link/softlink
|
// 整理方式 move/copy/link/softlink
|
||||||
transfer_type?: string
|
transfer_type: string
|
||||||
// 文件覆盖模式 always/size/never/latest
|
// 文件覆盖模式 always/size/never/latest
|
||||||
overwrite_mode?: string
|
overwrite_mode?: string
|
||||||
// 整理到媒体库目录
|
// 整理到媒体库目录
|
||||||
@@ -1139,3 +1139,42 @@ export interface SubscrbieInfo {
|
|||||||
// 集信息 {集号: {download: 文件路径,library: 文件路径, backdrop: url, title: 标题, description: 描述}}
|
// 集信息 {集号: {download: 文件路径,library: 文件路径, backdrop: url, title: 标题, description: 描述}}
|
||||||
episodes: Record<number, SubscribeEpisodeInfo>
|
episodes: Record<number, SubscribeEpisodeInfo>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface TransferForm {
|
||||||
|
// 文件项
|
||||||
|
fileitem: FileItem
|
||||||
|
// 历史ID
|
||||||
|
logid: number
|
||||||
|
// 目标存储
|
||||||
|
target_storage: string
|
||||||
|
// 目标路径
|
||||||
|
target_path: string
|
||||||
|
// TMDB ID
|
||||||
|
tmdbid?: number
|
||||||
|
// 豆瓣 ID
|
||||||
|
doubanid?: string
|
||||||
|
// 季号
|
||||||
|
season?: number
|
||||||
|
// 类型
|
||||||
|
type_name?: string
|
||||||
|
// 整理方式
|
||||||
|
transfer_type: string
|
||||||
|
// 自定义格式
|
||||||
|
episode_format?: string
|
||||||
|
// 指定集数
|
||||||
|
episode_detail?: string
|
||||||
|
// 指定PART
|
||||||
|
episode_part?: string
|
||||||
|
// 集数偏移
|
||||||
|
episode_offset?: string
|
||||||
|
// 最小文件大小
|
||||||
|
min_filesize: number
|
||||||
|
// 刮削
|
||||||
|
scrape: boolean
|
||||||
|
// 复用历史识别信息
|
||||||
|
from_history: boolean
|
||||||
|
// 媒体库类型子目录
|
||||||
|
library_type_folder?: boolean
|
||||||
|
// 媒体库类别子目录
|
||||||
|
library_category_folder?: boolean
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ import { storageOptions, transferTypeOptions } from '@/api/constants'
|
|||||||
import { numberValidator } from '@/@validators'
|
import { numberValidator } from '@/@validators'
|
||||||
import { useDisplay } from 'vuetify'
|
import { useDisplay } from 'vuetify'
|
||||||
import ProgressDialog from './ProgressDialog.vue'
|
import ProgressDialog from './ProgressDialog.vue'
|
||||||
import { FileItem, TransferDirectoryConf } from '@/api/types'
|
import { FileItem, TransferDirectoryConf, TransferForm } from '@/api/types'
|
||||||
|
|
||||||
// 显示器宽度
|
// 显示器宽度
|
||||||
const display = useDisplay()
|
const display = useDisplay()
|
||||||
@@ -66,30 +66,19 @@ const dialogTitle = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 表单
|
// 表单
|
||||||
const transferForm = reactive({
|
const transferForm = reactive<TransferForm>({
|
||||||
fileitem: {},
|
fileitem: {} as FileItem,
|
||||||
logid: 0,
|
logid: 0,
|
||||||
target_storage: props.target_storage ?? 'local',
|
target_storage: props.target_storage ?? 'local',
|
||||||
target_path: props.target_path ?? null,
|
|
||||||
tmdbid: null,
|
|
||||||
doubanid: null,
|
|
||||||
season: null,
|
|
||||||
type_name: '',
|
|
||||||
transfer_type: '',
|
transfer_type: '',
|
||||||
episode_format: '',
|
target_path: '',
|
||||||
episode_detail: '',
|
|
||||||
episode_part: '',
|
|
||||||
episode_offset: null,
|
|
||||||
min_filesize: 0,
|
min_filesize: 0,
|
||||||
scrape: false,
|
scrape: false,
|
||||||
from_history: false,
|
from_history: false,
|
||||||
library_type_folder: false,
|
|
||||||
library_category_folder: false,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 所有媒体库目录
|
// 所有媒体库目录
|
||||||
const directories = ref<TransferDirectoryConf[]>([])
|
const directories = ref<TransferDirectoryConf[]>([])
|
||||||
|
|
||||||
// 查询目录
|
// 查询目录
|
||||||
async function loadDirectories() {
|
async function loadDirectories() {
|
||||||
try {
|
try {
|
||||||
@@ -125,8 +114,10 @@ watch(
|
|||||||
transferForm.library_type_folder = false
|
transferForm.library_type_folder = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 路径为空时, 整理方式留空(自动)
|
// 路径为空时, 恢复到`自动`条件
|
||||||
transferForm.transfer_type = ''
|
transferForm.transfer_type = ''
|
||||||
|
transferForm.library_type_folder = undefined
|
||||||
|
transferForm.library_category_folder = undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -195,7 +186,7 @@ async function handleTransfer(item: FileItem) {
|
|||||||
// 整理日志
|
// 整理日志
|
||||||
async function handleTransferLog(logid: number) {
|
async function handleTransferLog(logid: number) {
|
||||||
transferForm.logid = logid
|
transferForm.logid = logid
|
||||||
transferForm.fileitem = {}
|
transferForm.fileitem = {} as FileItem
|
||||||
try {
|
try {
|
||||||
const result: { [key: string]: any } = await api.post('transfer/manual', transferForm)
|
const result: { [key: string]: any } = await api.post('transfer/manual', transferForm)
|
||||||
if (!result.success) $toast.error(`历史记录 ${logid} 重新整理失败:${result.message}!`)
|
if (!result.success) $toast.error(`历史记录 ${logid} 重新整理失败:${result.message}!`)
|
||||||
@@ -350,7 +341,7 @@ onMounted(() => {
|
|||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6" v-if="transferForm.target_path">
|
||||||
<VSwitch
|
<VSwitch
|
||||||
v-model="transferForm.library_type_folder"
|
v-model="transferForm.library_type_folder"
|
||||||
label="按类型分类"
|
label="按类型分类"
|
||||||
@@ -358,7 +349,7 @@ onMounted(() => {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6" v-if="transferForm.target_path">
|
||||||
<VSwitch
|
<VSwitch
|
||||||
v-model="transferForm.library_category_folder"
|
v-model="transferForm.library_category_folder"
|
||||||
label="按类别分类"
|
label="按类别分类"
|
||||||
|
|||||||
Reference in New Issue
Block a user