mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36:41 +08:00
feat: 支持多数据源识别缓存管理
This commit is contained in:
+10
-6
@@ -1723,12 +1723,16 @@ export interface TorrentCacheData {
|
|||||||
data: TorrentCacheItem[]
|
data: TorrentCacheItem[]
|
||||||
}
|
}
|
||||||
|
|
||||||
// TheMovieDb 识别缓存项
|
// 媒体识别缓存项
|
||||||
export interface TmdbRecognitionCacheItem {
|
export interface RecognitionCacheItem {
|
||||||
// 缓存键
|
// 缓存键
|
||||||
key: string
|
key: string
|
||||||
// TMDB ID,0 表示未识别
|
// TMDB ID,0 表示未识别
|
||||||
tmdb_id: number
|
tmdb_id?: number
|
||||||
|
// 豆瓣 ID,0 表示未识别
|
||||||
|
douban_id?: string | number
|
||||||
|
// 当前识别数据源对应的统一 ID
|
||||||
|
recognition_id?: string
|
||||||
// 识别后的标题
|
// 识别后的标题
|
||||||
title: string
|
title: string
|
||||||
// 识别后的年份
|
// 识别后的年份
|
||||||
@@ -1741,8 +1745,8 @@ export interface TmdbRecognitionCacheItem {
|
|||||||
backdrop_path?: string
|
backdrop_path?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// TheMovieDb 识别缓存数据
|
// 媒体识别缓存数据
|
||||||
export interface TmdbRecognitionCacheData {
|
export interface RecognitionCacheData {
|
||||||
// 缓存总数
|
// 缓存总数
|
||||||
count: number
|
count: number
|
||||||
// 已识别数量
|
// 已识别数量
|
||||||
@@ -1750,7 +1754,7 @@ export interface TmdbRecognitionCacheData {
|
|||||||
// 未识别数量
|
// 未识别数量
|
||||||
unrecognized: number
|
unrecognized: number
|
||||||
// 缓存数据
|
// 缓存数据
|
||||||
data: TmdbRecognitionCacheItem[]
|
data: RecognitionCacheItem[]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 订阅分享统计
|
// 订阅分享统计
|
||||||
|
|||||||
Vendored
+110
-68
@@ -3,13 +3,14 @@ import { useToast } from 'vue-toastification'
|
|||||||
import { useDisplay } from 'vuetify'
|
import { useDisplay } from 'vuetify'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import api from '@/api'
|
import api from '@/api'
|
||||||
import type { ApiResponse, TmdbRecognitionCacheData, TmdbRecognitionCacheItem } from '@/api/types'
|
import type { ApiResponse, RecognitionCacheData, RecognitionCacheItem } from '@/api/types'
|
||||||
import { useConfirm } from '@/composables/useConfirm'
|
import { useConfirm } from '@/composables/useConfirm'
|
||||||
import { useGlobalSettingsStore } from '@/stores'
|
import { useGlobalSettingsStore } from '@/stores'
|
||||||
import { getDisplayImageUrl } from '@/utils/imageUtils'
|
import { getDisplayImageUrl } from '@/utils/imageUtils'
|
||||||
|
|
||||||
type RecognitionStatusFilter = 'all' | 'recognized' | 'unrecognized'
|
type RecognitionStatusFilter = 'all' | 'recognized' | 'unrecognized'
|
||||||
type InfiniteScrollStatus = 'ok' | 'empty' | 'loading' | 'error'
|
type InfiniteScrollStatus = 'ok' | 'empty' | 'loading' | 'error'
|
||||||
|
type RecognitionCacheSource = 'tmdb' | 'douban'
|
||||||
|
|
||||||
const MOBILE_CACHE_PAGE_SIZE = 20
|
const MOBILE_CACHE_PAGE_SIZE = 20
|
||||||
const MOBILE_CACHE_ITEM_HEIGHT = 144
|
const MOBILE_CACHE_ITEM_HEIGHT = 144
|
||||||
@@ -19,14 +20,28 @@ const display = useDisplay()
|
|||||||
const createConfirm = useConfirm()
|
const createConfirm = useConfirm()
|
||||||
const $toast = useToast()
|
const $toast = useToast()
|
||||||
const globalSettingsStore = useGlobalSettingsStore()
|
const globalSettingsStore = useGlobalSettingsStore()
|
||||||
const globalSettings = globalSettingsStore.globalSettings
|
|
||||||
|
|
||||||
const isMobile = computed(() => display.smAndDown.value)
|
const isMobile = computed(() => display.smAndDown.value)
|
||||||
|
const recognitionSource = computed<RecognitionCacheSource>(() =>
|
||||||
|
globalSettingsStore.globalSettings.RECOGNIZE_SOURCE === 'douban' ? 'douban' : 'tmdb',
|
||||||
|
)
|
||||||
|
const recognitionSourceName = computed(() =>
|
||||||
|
recognitionSource.value === 'douban'
|
||||||
|
? t('setting.cache.recognitionSource.douban')
|
||||||
|
: t('setting.cache.recognitionSource.themoviedb'),
|
||||||
|
)
|
||||||
|
const recognitionIdLabel = computed(() =>
|
||||||
|
recognitionSource.value === 'douban' ? t('setting.cache.doubanId') : t('setting.cache.tmdbId'),
|
||||||
|
)
|
||||||
|
const recognitionCacheEndpoint = computed(() => `${recognitionSource.value}/cache`)
|
||||||
|
const recognitionFilterPlaceholder = computed(() =>
|
||||||
|
t('setting.cache.filterRecognitionCache', { source: recognitionSourceName.value }),
|
||||||
|
)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const searchFilter = ref('')
|
const searchFilter = ref('')
|
||||||
const statusFilter = ref<RecognitionStatusFilter>('all')
|
const statusFilter = ref<RecognitionStatusFilter>('all')
|
||||||
const selectedItems = ref<string[]>([])
|
const selectedItems = ref<string[]>([])
|
||||||
const cacheData = ref<TmdbRecognitionCacheData>({
|
const cacheData = ref<RecognitionCacheData>({
|
||||||
count: 0,
|
count: 0,
|
||||||
recognized: 0,
|
recognized: 0,
|
||||||
unrecognized: 0,
|
unrecognized: 0,
|
||||||
@@ -34,6 +49,7 @@ const cacheData = ref<TmdbRecognitionCacheData>({
|
|||||||
})
|
})
|
||||||
const mobileVisibleCount = ref(MOBILE_CACHE_PAGE_SIZE)
|
const mobileVisibleCount = ref(MOBILE_CACHE_PAGE_SIZE)
|
||||||
const mobileInfiniteKey = ref(0)
|
const mobileInfiniteKey = ref(0)
|
||||||
|
let cacheLoadRequestId = 0
|
||||||
|
|
||||||
const statusOptions = computed(() => [
|
const statusOptions = computed(() => [
|
||||||
{ title: t('setting.cache.allStatuses'), value: 'all' },
|
{ title: t('setting.cache.allStatuses'), value: 'all' },
|
||||||
@@ -46,7 +62,7 @@ const tableHeaders = computed(() => [
|
|||||||
{ title: t('setting.cache.poster'), key: 'poster', sortable: false, width: '76px' },
|
{ title: t('setting.cache.poster'), key: 'poster', sortable: false, width: '76px' },
|
||||||
{ title: t('setting.cache.cacheKey'), key: 'key', sortable: true },
|
{ title: t('setting.cache.cacheKey'), key: 'key', sortable: true },
|
||||||
{ title: t('setting.cache.recognitionResult'), key: 'result', sortable: false, width: '220px' },
|
{ title: t('setting.cache.recognitionResult'), key: 'result', sortable: false, width: '220px' },
|
||||||
{ title: t('setting.cache.tmdbId'), key: 'tmdb_id', sortable: true, width: '110px' },
|
{ title: recognitionIdLabel.value, key: 'recognition_id', sortable: true, width: '120px' },
|
||||||
{ title: t('setting.cache.recognitionStatus'), key: 'status', sortable: true, width: '120px' },
|
{ title: t('setting.cache.recognitionStatus'), key: 'status', sortable: true, width: '120px' },
|
||||||
{ title: t('setting.cache.actions'), key: 'actions', sortable: false, width: '72px' },
|
{ title: t('setting.cache.actions'), key: 'actions', sortable: false, width: '72px' },
|
||||||
])
|
])
|
||||||
@@ -56,10 +72,10 @@ const filteredData = computed(() => {
|
|||||||
return cacheData.value.data.filter(item => {
|
return cacheData.value.data.filter(item => {
|
||||||
const matchesKeyword =
|
const matchesKeyword =
|
||||||
!keyword ||
|
!keyword ||
|
||||||
[item.key, item.title, item.year, String(item.tmdb_id)].some(value => value.toLowerCase().includes(keyword))
|
[item.key, item.title, item.year, getRecognitionId(item)].some(value => value.toLowerCase().includes(keyword))
|
||||||
const matchesStatus =
|
const matchesStatus =
|
||||||
statusFilter.value === 'all' ||
|
statusFilter.value === 'all' ||
|
||||||
(statusFilter.value === 'recognized' ? item.tmdb_id > 0 : item.tmdb_id === 0)
|
(statusFilter.value === 'recognized' ? isRecognized(item) : !isRecognized(item))
|
||||||
return matchesKeyword && matchesStatus
|
return matchesKeyword && matchesStatus
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -89,35 +105,42 @@ function loadMoreMobileCache({ done }: { done: (status: InfiniteScrollStatus) =>
|
|||||||
done(mobileHasMore.value ? 'ok' : 'empty')
|
done(mobileHasMore.value ? 'ok' : 'empty')
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 加载 TheMovieDb 识别缓存列表。 */
|
/** 加载当前识别数据源对应的缓存列表。 */
|
||||||
async function loadCacheData(showSuccess = false) {
|
async function loadCacheData(showSuccess = false) {
|
||||||
|
const requestId = ++cacheLoadRequestId
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const response = (await api.get('tmdb/cache')) as unknown as ApiResponse<TmdbRecognitionCacheData>
|
const response = (await api.get(recognitionCacheEndpoint.value)) as unknown as ApiResponse<RecognitionCacheData>
|
||||||
cacheData.value = response.data ?? { count: 0, recognized: 0, unrecognized: 0, data: [] }
|
if (requestId !== cacheLoadRequestId) return
|
||||||
|
const responseData = response.data ?? { count: 0, recognized: 0, unrecognized: 0, data: [] }
|
||||||
|
cacheData.value = {
|
||||||
|
...responseData,
|
||||||
|
data: responseData.data.map(item => ({ ...item, recognition_id: getRecognitionId(item) })),
|
||||||
|
}
|
||||||
selectedItems.value = selectedItems.value.filter(key => cacheData.value.data.some(item => item.key === key))
|
selectedItems.value = selectedItems.value.filter(key => cacheData.value.data.some(item => item.key === key))
|
||||||
resetMobilePagination()
|
resetMobilePagination()
|
||||||
if (showSuccess) $toast.success(t('setting.cache.listRefreshSuccess'))
|
if (showSuccess) $toast.success(t('setting.cache.listRefreshSuccess'))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (requestId !== cacheLoadRequestId) return
|
||||||
console.error(error)
|
console.error(error)
|
||||||
$toast.error(t('setting.cache.loadFailed'))
|
$toast.error(t('setting.cache.loadFailed'))
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
if (requestId === cacheLoadRequestId) loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 清空全部 TheMovieDb 识别缓存。 */
|
/** 清空当前识别数据源的全部识别缓存。 */
|
||||||
async function clearAllCache() {
|
async function clearAllCache() {
|
||||||
const confirmed = await createConfirm({
|
const confirmed = await createConfirm({
|
||||||
type: 'warn',
|
type: 'warn',
|
||||||
title: t('common.confirm'),
|
title: t('common.confirm'),
|
||||||
content: t('setting.cache.tmdbClearConfirm'),
|
content: t('setting.cache.recognitionClearConfirm', { source: recognitionSourceName.value }),
|
||||||
})
|
})
|
||||||
if (!confirmed) return
|
if (!confirmed) return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const response = (await api.delete('tmdb/cache')) as unknown as ApiResponse
|
const response = (await api.delete(recognitionCacheEndpoint.value)) as unknown as ApiResponse
|
||||||
if (!response.success) throw new Error(response.message)
|
if (!response.success) throw new Error(response.message)
|
||||||
$toast.success(response.message || t('setting.cache.clearSuccess'))
|
$toast.success(response.message || t('setting.cache.clearSuccess'))
|
||||||
await loadCacheData()
|
await loadCacheData()
|
||||||
@@ -130,13 +153,13 @@ async function clearAllCache() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 请求后端删除指定 TheMovieDb 识别缓存。 */
|
/** 请求当前识别数据源接口删除指定识别缓存。 */
|
||||||
async function deleteCacheItem(key: string) {
|
async function deleteCacheItem(key: string) {
|
||||||
const response = (await api.delete(`tmdb/cache/${encodeURIComponent(key)}`)) as unknown as ApiResponse
|
const response = (await api.delete(`${recognitionCacheEndpoint.value}/${encodeURIComponent(key)}`)) as unknown as ApiResponse
|
||||||
if (!response.success) throw new Error(response.message)
|
if (!response.success) throw new Error(response.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除桌面端表格中选中的 TheMovieDb 识别缓存。 */
|
/** 删除桌面端表格中选中的识别缓存。 */
|
||||||
async function deleteSelectedItems() {
|
async function deleteSelectedItems() {
|
||||||
if (selectedItems.value.length === 0) {
|
if (selectedItems.value.length === 0) {
|
||||||
$toast.warning(t('setting.cache.selectDeleteWarning'))
|
$toast.warning(t('setting.cache.selectDeleteWarning'))
|
||||||
@@ -158,8 +181,8 @@ async function deleteSelectedItems() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除单条 TheMovieDb 识别缓存。 */
|
/** 删除单条识别缓存。 */
|
||||||
async function deleteSingleItem(item: TmdbRecognitionCacheItem) {
|
async function deleteSingleItem(item: RecognitionCacheItem) {
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
await deleteCacheItem(item.key)
|
await deleteCacheItem(item.key)
|
||||||
@@ -173,13 +196,25 @@ async function deleteSingleItem(item: TmdbRecognitionCacheItem) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取 TheMovieDb 缓存海报的可展示地址。 */
|
/** 获取识别缓存海报的可展示地址。 */
|
||||||
function getPosterUrl(item: TmdbRecognitionCacheItem): string {
|
function getPosterUrl(item: RecognitionCacheItem): string {
|
||||||
if (!item.poster_path) return ''
|
if (!item.poster_path) return ''
|
||||||
const sourceUrl = item.poster_path.startsWith('/')
|
const sourceUrl = item.poster_path.startsWith('/')
|
||||||
? `https://${globalSettings.TMDB_IMAGE_DOMAIN}/t/p/w300${item.poster_path}`
|
? `https://${globalSettingsStore.globalSettings.TMDB_IMAGE_DOMAIN}/t/p/w300${item.poster_path}`
|
||||||
: item.poster_path
|
: item.poster_path
|
||||||
return getDisplayImageUrl(sourceUrl, globalSettings.GLOBAL_IMAGE_CACHE)
|
return getDisplayImageUrl(sourceUrl, globalSettingsStore.globalSettings.GLOBAL_IMAGE_CACHE)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取当前识别数据源对应的媒体 ID。 */
|
||||||
|
function getRecognitionId(item: RecognitionCacheItem): string {
|
||||||
|
const recognitionId = recognitionSource.value === 'douban' ? item.douban_id : item.tmdb_id
|
||||||
|
return recognitionId ? String(recognitionId) : ''
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 判断识别缓存条目是否包含有效媒体 ID。 */
|
||||||
|
function isRecognized(item: RecognitionCacheItem): boolean {
|
||||||
|
const recognitionId = getRecognitionId(item)
|
||||||
|
return Boolean(recognitionId && recognitionId !== '0')
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取本地化的媒体类型名称。 */
|
/** 获取本地化的媒体类型名称。 */
|
||||||
@@ -197,8 +232,8 @@ function getMediaTypeColor(mediaType: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取识别状态的本地化名称。 */
|
/** 获取识别状态的本地化名称。 */
|
||||||
function getRecognitionStatusLabel(item: TmdbRecognitionCacheItem): string {
|
function getRecognitionStatusLabel(item: RecognitionCacheItem): string {
|
||||||
return item.tmdb_id > 0 ? t('setting.cache.recognized') : t('setting.cache.unrecognized')
|
return isRecognized(item) ? t('setting.cache.recognized') : t('setting.cache.unrecognized')
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -208,10 +243,17 @@ onMounted(() => {
|
|||||||
watch([searchFilter, statusFilter], () => {
|
watch([searchFilter, statusFilter], () => {
|
||||||
resetMobilePagination()
|
resetMobilePagination()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(recognitionSource, () => {
|
||||||
|
searchFilter.value = ''
|
||||||
|
statusFilter.value = 'all'
|
||||||
|
selectedItems.value = []
|
||||||
|
void loadCacheData()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<section class="tmdb-cache-panel">
|
<section class="recognition-cache-panel">
|
||||||
<div class="cache-panel-toolbar">
|
<div class="cache-panel-toolbar">
|
||||||
<div class="cache-panel-stats">
|
<div class="cache-panel-stats">
|
||||||
<div class="cache-panel-stat cache-panel-stat--primary">
|
<div class="cache-panel-stat cache-panel-stat--primary">
|
||||||
@@ -266,8 +308,8 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
<VTextField
|
<VTextField
|
||||||
v-model="searchFilter"
|
v-model="searchFilter"
|
||||||
class="cache-panel-filter"
|
class="cache-panel-filter"
|
||||||
:label="isMobile ? undefined : t('setting.cache.filterRecognitionCache')"
|
:label="isMobile ? undefined : recognitionFilterPlaceholder"
|
||||||
:placeholder="isMobile ? t('setting.cache.filterRecognitionCache') : undefined"
|
:placeholder="isMobile ? recognitionFilterPlaceholder : undefined"
|
||||||
prepend-inner-icon="mdi-magnify"
|
prepend-inner-icon="mdi-magnify"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
:density="isMobile ? 'comfortable' : 'compact'"
|
:density="isMobile ? 'comfortable' : 'compact'"
|
||||||
@@ -305,7 +347,7 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
mode="intersect"
|
mode="intersect"
|
||||||
side="end"
|
side="end"
|
||||||
:items="mobileVisibleData"
|
:items="mobileVisibleData"
|
||||||
class="tmdb-cache-mobile-scroll"
|
class="recognition-cache-mobile-scroll"
|
||||||
@load="loadMoreMobileCache"
|
@load="loadMoreMobileCache"
|
||||||
>
|
>
|
||||||
<template #loading>
|
<template #loading>
|
||||||
@@ -324,24 +366,24 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
:item-height="MOBILE_CACHE_ITEM_HEIGHT"
|
:item-height="MOBILE_CACHE_ITEM_HEIGHT"
|
||||||
>
|
>
|
||||||
<template #default="{ item, itemRef }">
|
<template #default="{ item, itemRef }">
|
||||||
<article :ref="itemRef" :key="item.key" class="tmdb-cache-mobile-item">
|
<article :ref="itemRef" :key="item.key" class="recognition-cache-mobile-item">
|
||||||
<div class="tmdb-cache-poster">
|
<div class="recognition-cache-poster">
|
||||||
<VImg v-if="getPosterUrl(item)" :src="getPosterUrl(item)" :alt="item.title || item.key" cover />
|
<VImg v-if="getPosterUrl(item)" :src="getPosterUrl(item)" :alt="item.title || item.key" cover />
|
||||||
<VIcon v-else icon="mdi-image-off-outline" size="28" />
|
<VIcon v-else icon="mdi-image-off-outline" size="28" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tmdb-cache-mobile-item__content">
|
<div class="recognition-cache-mobile-item__content">
|
||||||
<div class="tmdb-cache-mobile-item__title">
|
<div class="recognition-cache-mobile-item__title">
|
||||||
{{ item.title || t('setting.cache.unrecognized') }}
|
{{ item.title || t('setting.cache.unrecognized') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="tmdb-cache-mobile-item__meta">
|
<div class="recognition-cache-mobile-item__meta">
|
||||||
<VChip size="x-small" variant="tonal" :color="getMediaTypeColor(item.media_type)">
|
<VChip size="x-small" variant="tonal" :color="getMediaTypeColor(item.media_type)">
|
||||||
{{ getMediaTypeLabel(item.media_type) }}
|
{{ getMediaTypeLabel(item.media_type) }}
|
||||||
</VChip>
|
</VChip>
|
||||||
<span v-if="item.year">{{ item.year }}</span>
|
<span v-if="item.year">{{ item.year }}</span>
|
||||||
<span v-if="item.tmdb_id">TMDB #{{ item.tmdb_id }}</span>
|
<span v-if="isRecognized(item)">{{ recognitionIdLabel }} #{{ getRecognitionId(item) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tmdb-cache-mobile-item__key">{{ item.key }}</div>
|
<div class="recognition-cache-mobile-item__key">{{ item.key }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<VBtn
|
<VBtn
|
||||||
@@ -361,7 +403,7 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
|
|
||||||
<div v-else class="cache-panel-empty">
|
<div v-else class="cache-panel-empty">
|
||||||
<VIcon icon="mdi-database-search-outline" size="42" />
|
<VIcon icon="mdi-database-search-outline" size="42" />
|
||||||
<strong>{{ t('setting.cache.noRecognitionCache') }}</strong>
|
<strong>{{ t('setting.cache.noRecognitionCache', { source: recognitionSourceName }) }}</strong>
|
||||||
<span>{{ t('setting.cache.noRecognitionCacheHint') }}</span>
|
<span>{{ t('setting.cache.noRecognitionCacheHint') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -369,7 +411,7 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
<VDataTable
|
<VDataTable
|
||||||
v-else
|
v-else
|
||||||
v-model="selectedItems"
|
v-model="selectedItems"
|
||||||
class="tmdb-cache-table"
|
class="recognition-cache-table"
|
||||||
:headers="tableHeaders"
|
:headers="tableHeaders"
|
||||||
:items="filteredData"
|
:items="filteredData"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@@ -382,18 +424,18 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
:loading-text="t('common.loadingText')"
|
:loading-text="t('common.loadingText')"
|
||||||
>
|
>
|
||||||
<template #item.poster="{ item }">
|
<template #item.poster="{ item }">
|
||||||
<div class="tmdb-cache-table__poster">
|
<div class="recognition-cache-table__poster">
|
||||||
<VImg v-if="getPosterUrl(item)" :src="getPosterUrl(item)" :alt="item.title || item.key" cover />
|
<VImg v-if="getPosterUrl(item)" :src="getPosterUrl(item)" :alt="item.title || item.key" cover />
|
||||||
<VIcon v-else icon="mdi-image-off-outline" />
|
<VIcon v-else icon="mdi-image-off-outline" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #item.key="{ item }">
|
<template #item.key="{ item }">
|
||||||
<div class="tmdb-cache-table__key">{{ item.key }}</div>
|
<div class="recognition-cache-table__key">{{ item.key }}</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #item.result="{ item }">
|
<template #item.result="{ item }">
|
||||||
<div class="tmdb-cache-result">
|
<div class="recognition-cache-result">
|
||||||
<strong>{{ item.title || t('setting.cache.unrecognized') }}</strong>
|
<strong>{{ item.title || t('setting.cache.unrecognized') }}</strong>
|
||||||
<span v-if="item.year">{{ item.year }}</span>
|
<span v-if="item.year">{{ item.year }}</span>
|
||||||
<VChip size="x-small" variant="tonal" :color="getMediaTypeColor(item.media_type)">
|
<VChip size="x-small" variant="tonal" :color="getMediaTypeColor(item.media_type)">
|
||||||
@@ -402,13 +444,13 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #item.tmdb_id="{ item }">
|
<template #item.recognition_id="{ item }">
|
||||||
<span v-if="item.tmdb_id" class="font-weight-medium">#{{ item.tmdb_id }}</span>
|
<span v-if="isRecognized(item)" class="font-weight-medium">#{{ getRecognitionId(item) }}</span>
|
||||||
<span v-else class="text-medium-emphasis">-</span>
|
<span v-else class="text-medium-emphasis">-</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #item.status="{ item }">
|
<template #item.status="{ item }">
|
||||||
<VChip size="small" variant="tonal" :color="item.tmdb_id > 0 ? 'success' : 'warning'">
|
<VChip size="small" variant="tonal" :color="isRecognized(item) ? 'success' : 'warning'">
|
||||||
{{ getRecognitionStatusLabel(item) }}
|
{{ getRecognitionStatusLabel(item) }}
|
||||||
</VChip>
|
</VChip>
|
||||||
</template>
|
</template>
|
||||||
@@ -423,7 +465,7 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
<template #no-data>
|
<template #no-data>
|
||||||
<div class="cache-panel-empty">
|
<div class="cache-panel-empty">
|
||||||
<VIcon icon="mdi-database-search-outline" size="42" />
|
<VIcon icon="mdi-database-search-outline" size="42" />
|
||||||
<strong>{{ t('setting.cache.noRecognitionCache') }}</strong>
|
<strong>{{ t('setting.cache.noRecognitionCache', { source: recognitionSourceName }) }}</strong>
|
||||||
<span>{{ t('setting.cache.noRecognitionCacheHint') }}</span>
|
<span>{{ t('setting.cache.noRecognitionCacheHint') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -432,7 +474,7 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.tmdb-cache-panel {
|
.recognition-cache-panel {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -523,7 +565,7 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
min-block-size: 44px;
|
min-block-size: 44px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-table {
|
.recognition-cache-table {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: var(--app-surface-border);
|
border: var(--app-surface-border);
|
||||||
border-radius: var(--app-surface-radius);
|
border-radius: var(--app-surface-radius);
|
||||||
@@ -531,8 +573,8 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
max-block-size: calc(100dvh - 23rem);
|
max-block-size: calc(100dvh - 23rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-table__poster,
|
.recognition-cache-table__poster,
|
||||||
.tmdb-cache-poster {
|
.recognition-cache-poster {
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -542,19 +584,19 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
color: rgba(var(--v-theme-on-surface), 0.36);
|
color: rgba(var(--v-theme-on-surface), 0.36);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-table__poster {
|
.recognition-cache-table__poster {
|
||||||
block-size: 62px;
|
block-size: 62px;
|
||||||
inline-size: 44px;
|
inline-size: 44px;
|
||||||
margin-block: 4px;
|
margin-block: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-table__poster :deep(.v-img),
|
.recognition-cache-table__poster :deep(.v-img),
|
||||||
.tmdb-cache-poster :deep(.v-img) {
|
.recognition-cache-poster :deep(.v-img) {
|
||||||
block-size: 100%;
|
block-size: 100%;
|
||||||
inline-size: 100%;
|
inline-size: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-table__key {
|
.recognition-cache-table__key {
|
||||||
max-inline-size: 36rem;
|
max-inline-size: 36rem;
|
||||||
color: rgba(var(--v-theme-on-surface), 0.68);
|
color: rgba(var(--v-theme-on-surface), 0.68);
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
@@ -562,19 +604,19 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-result {
|
.recognition-cache-result {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-result strong {
|
.recognition-cache-result strong {
|
||||||
inline-size: 100%;
|
inline-size: 100%;
|
||||||
color: rgba(var(--v-theme-on-surface), 0.88);
|
color: rgba(var(--v-theme-on-surface), 0.88);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-result span {
|
.recognition-cache-result span {
|
||||||
color: rgba(var(--v-theme-on-surface), 0.56);
|
color: rgba(var(--v-theme-on-surface), 0.56);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
@@ -602,7 +644,7 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 959.98px) {
|
@media (max-width: 959.98px) {
|
||||||
.tmdb-cache-panel {
|
.recognition-cache-panel {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
block-size: 100%;
|
block-size: 100%;
|
||||||
padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
|
padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
|
||||||
@@ -656,18 +698,18 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-mobile-scroll {
|
.recognition-cache-mobile-scroll {
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
min-block-size: 20rem;
|
min-block-size: 20rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-mobile-scroll :deep(.v-infinite-scroll__container),
|
.recognition-cache-mobile-scroll :deep(.v-infinite-scroll__container),
|
||||||
.tmdb-cache-mobile-scroll :deep(.v-virtual-scroll),
|
.recognition-cache-mobile-scroll :deep(.v-virtual-scroll),
|
||||||
.tmdb-cache-mobile-scroll :deep(.v-virtual-scroll__container) {
|
.recognition-cache-mobile-scroll :deep(.v-virtual-scroll__container) {
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-mobile-scroll :deep(.v-infinite-scroll__side) {
|
.recognition-cache-mobile-scroll :deep(.v-infinite-scroll__side) {
|
||||||
padding-block: 14px 2px;
|
padding-block: 14px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -683,7 +725,7 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-mobile-item {
|
.recognition-cache-mobile-item {
|
||||||
display: grid;
|
display: grid;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
border: var(--app-surface-border);
|
border: var(--app-surface-border);
|
||||||
@@ -697,23 +739,23 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-poster {
|
.recognition-cache-poster {
|
||||||
block-size: 78px;
|
block-size: 78px;
|
||||||
inline-size: 54px;
|
inline-size: 54px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-mobile-item__content {
|
.recognition-cache-mobile-item__content {
|
||||||
min-inline-size: 0;
|
min-inline-size: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-mobile-item__title {
|
.recognition-cache-mobile-item__title {
|
||||||
color: rgba(var(--v-theme-on-surface), 0.9);
|
color: rgba(var(--v-theme-on-surface), 0.9);
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-mobile-item__meta {
|
.recognition-cache-mobile-item__meta {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@@ -723,7 +765,7 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
gap: 7px;
|
gap: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmdb-cache-mobile-item__key {
|
.recognition-cache-mobile-item__key {
|
||||||
margin-block-start: 8px;
|
margin-block-start: 8px;
|
||||||
color: rgba(var(--v-theme-on-surface), 0.48);
|
color: rgba(var(--v-theme-on-surface), 0.48);
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
@@ -734,7 +776,7 @@ watch([searchFilter, statusFilter], () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 374.98px) {
|
@media (max-width: 374.98px) {
|
||||||
.tmdb-cache-panel {
|
.recognition-cache-panel {
|
||||||
padding-inline: 12px;
|
padding-inline: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2389,7 +2389,7 @@ export default {
|
|||||||
subtitle: 'Manage system caches',
|
subtitle: 'Manage system caches',
|
||||||
cacheType: 'Cache Type',
|
cacheType: 'Cache Type',
|
||||||
torrentCache: 'Resource Cache',
|
torrentCache: 'Resource Cache',
|
||||||
tmdbRecognitionCache: 'Recognition Cache',
|
recognitionCache: 'Recognition Cache',
|
||||||
totalCount: 'Total Count',
|
totalCount: 'Total Count',
|
||||||
siteCount: 'Site Count',
|
siteCount: 'Site Count',
|
||||||
recognized: 'Recognized',
|
recognized: 'Recognized',
|
||||||
@@ -2398,7 +2398,7 @@ export default {
|
|||||||
allStatuses: 'All Statuses',
|
allStatuses: 'All Statuses',
|
||||||
filterByTitle: 'Filter by Title',
|
filterByTitle: 'Filter by Title',
|
||||||
filterBySite: 'Filter by Site',
|
filterBySite: 'Filter by Site',
|
||||||
filterRecognitionCache: 'Search cache key, title, or TMDB ID',
|
filterRecognitionCache: 'Search cache key, title, or {source} ID',
|
||||||
selectSite: 'Select Site',
|
selectSite: 'Select Site',
|
||||||
loadingMore: 'Loading...',
|
loadingMore: 'Loading...',
|
||||||
refresh: 'Refresh Cache',
|
refresh: 'Refresh Cache',
|
||||||
@@ -2422,6 +2422,7 @@ export default {
|
|||||||
poster: 'Poster',
|
poster: 'Poster',
|
||||||
cacheKey: 'Recognition Request',
|
cacheKey: 'Recognition Request',
|
||||||
tmdbId: 'TMDB ID',
|
tmdbId: 'TMDB ID',
|
||||||
|
doubanId: 'Douban ID',
|
||||||
torrentTitle: 'Title',
|
torrentTitle: 'Title',
|
||||||
site: 'Site',
|
site: 'Site',
|
||||||
size: 'Size',
|
size: 'Size',
|
||||||
@@ -2432,7 +2433,7 @@ export default {
|
|||||||
unrecognized: 'Unrecognized',
|
unrecognized: 'Unrecognized',
|
||||||
noData: 'No cache data',
|
noData: 'No cache data',
|
||||||
noDataHint: 'Click "Refresh Cache" button to get the latest torrent cache',
|
noDataHint: 'Click "Refresh Cache" button to get the latest torrent cache',
|
||||||
noRecognitionCache: 'No TheMovieDb recognition cache',
|
noRecognitionCache: 'No {source} recognition cache',
|
||||||
noRecognitionCacheHint: 'Recognition records will appear here after media is identified',
|
noRecognitionCacheHint: 'Recognition records will appear here after media is identified',
|
||||||
reidentifyDialog: {
|
reidentifyDialog: {
|
||||||
title: 'Re-identify',
|
title: 'Re-identify',
|
||||||
@@ -2451,7 +2452,12 @@ export default {
|
|||||||
unknown: 'Unknown',
|
unknown: 'Unknown',
|
||||||
},
|
},
|
||||||
clearConfirm: 'Are you sure you want to clear all cache?',
|
clearConfirm: 'Are you sure you want to clear all cache?',
|
||||||
|
recognitionClearConfirm: 'Clear all {source} recognition cache?',
|
||||||
tmdbClearConfirm: 'Clear all TheMovieDb recognition cache?',
|
tmdbClearConfirm: 'Clear all TheMovieDb recognition cache?',
|
||||||
|
recognitionSource: {
|
||||||
|
themoviedb: 'TheMovieDb',
|
||||||
|
douban: 'Douban',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dialog: {
|
dialog: {
|
||||||
|
|||||||
@@ -2344,7 +2344,7 @@ export default {
|
|||||||
subtitle: '管理多类系统缓存',
|
subtitle: '管理多类系统缓存',
|
||||||
cacheType: '缓存类型',
|
cacheType: '缓存类型',
|
||||||
torrentCache: '资源缓存',
|
torrentCache: '资源缓存',
|
||||||
tmdbRecognitionCache: '识别缓存',
|
recognitionCache: '识别缓存',
|
||||||
totalCount: '总条数',
|
totalCount: '总条数',
|
||||||
siteCount: '站点数',
|
siteCount: '站点数',
|
||||||
recognized: '已识别',
|
recognized: '已识别',
|
||||||
@@ -2353,7 +2353,7 @@ export default {
|
|||||||
allStatuses: '全部状态',
|
allStatuses: '全部状态',
|
||||||
filterByTitle: '按标题筛选',
|
filterByTitle: '按标题筛选',
|
||||||
filterBySite: '按站点筛选',
|
filterBySite: '按站点筛选',
|
||||||
filterRecognitionCache: '搜索缓存键、标题或 TMDB ID',
|
filterRecognitionCache: '搜索缓存键、标题或 {source} ID',
|
||||||
selectSite: '选择站点',
|
selectSite: '选择站点',
|
||||||
loadingMore: '加载中...',
|
loadingMore: '加载中...',
|
||||||
refresh: '刷新缓存',
|
refresh: '刷新缓存',
|
||||||
@@ -2377,6 +2377,7 @@ export default {
|
|||||||
poster: '海报',
|
poster: '海报',
|
||||||
cacheKey: '识别请求',
|
cacheKey: '识别请求',
|
||||||
tmdbId: 'TMDB ID',
|
tmdbId: 'TMDB ID',
|
||||||
|
doubanId: '豆瓣 ID',
|
||||||
torrentTitle: '标题',
|
torrentTitle: '标题',
|
||||||
site: '站点',
|
site: '站点',
|
||||||
size: '大小',
|
size: '大小',
|
||||||
@@ -2387,7 +2388,7 @@ export default {
|
|||||||
unrecognized: '未识别',
|
unrecognized: '未识别',
|
||||||
noData: '暂无缓存数据',
|
noData: '暂无缓存数据',
|
||||||
noDataHint: '点击"刷新缓存"按钮获取最新的种子缓存',
|
noDataHint: '点击"刷新缓存"按钮获取最新的种子缓存',
|
||||||
noRecognitionCache: '暂无 TheMovieDb 识别缓存',
|
noRecognitionCache: '暂无 {source} 识别缓存',
|
||||||
noRecognitionCacheHint: '完成媒体识别后,缓存记录会显示在这里',
|
noRecognitionCacheHint: '完成媒体识别后,缓存记录会显示在这里',
|
||||||
reidentifyDialog: {
|
reidentifyDialog: {
|
||||||
title: '重新识别',
|
title: '重新识别',
|
||||||
@@ -2406,7 +2407,12 @@ export default {
|
|||||||
unknown: '未知',
|
unknown: '未知',
|
||||||
},
|
},
|
||||||
clearConfirm: '确认清空所有缓存吗?',
|
clearConfirm: '确认清空所有缓存吗?',
|
||||||
|
recognitionClearConfirm: '确认清空全部 {source} 识别缓存吗?',
|
||||||
tmdbClearConfirm: '确认清空全部 TheMovieDb 识别缓存吗?',
|
tmdbClearConfirm: '确认清空全部 TheMovieDb 识别缓存吗?',
|
||||||
|
recognitionSource: {
|
||||||
|
themoviedb: 'TheMovieDb',
|
||||||
|
douban: '豆瓣',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dialog: {
|
dialog: {
|
||||||
|
|||||||
@@ -2343,7 +2343,7 @@ export default {
|
|||||||
subtitle: '管理多類系統緩存',
|
subtitle: '管理多類系統緩存',
|
||||||
cacheType: '緩存類型',
|
cacheType: '緩存類型',
|
||||||
torrentCache: '資源緩存',
|
torrentCache: '資源緩存',
|
||||||
tmdbRecognitionCache: '識別緩存',
|
recognitionCache: '識別緩存',
|
||||||
totalCount: '總條數',
|
totalCount: '總條數',
|
||||||
siteCount: '站點數',
|
siteCount: '站點數',
|
||||||
recognized: '已識別',
|
recognized: '已識別',
|
||||||
@@ -2352,7 +2352,7 @@ export default {
|
|||||||
allStatuses: '全部狀態',
|
allStatuses: '全部狀態',
|
||||||
filterByTitle: '按標題篩選',
|
filterByTitle: '按標題篩選',
|
||||||
filterBySite: '按站點篩選',
|
filterBySite: '按站點篩選',
|
||||||
filterRecognitionCache: '搜索緩存鍵、標題或 TMDB ID',
|
filterRecognitionCache: '搜索緩存鍵、標題或 {source} ID',
|
||||||
selectSite: '選擇站點',
|
selectSite: '選擇站點',
|
||||||
loadingMore: '加載中...',
|
loadingMore: '加載中...',
|
||||||
refresh: '刷新緩存',
|
refresh: '刷新緩存',
|
||||||
@@ -2376,6 +2376,7 @@ export default {
|
|||||||
poster: '海報',
|
poster: '海報',
|
||||||
cacheKey: '識別請求',
|
cacheKey: '識別請求',
|
||||||
tmdbId: 'TMDB ID',
|
tmdbId: 'TMDB ID',
|
||||||
|
doubanId: '豆瓣 ID',
|
||||||
torrentTitle: '標題',
|
torrentTitle: '標題',
|
||||||
site: '站點',
|
site: '站點',
|
||||||
size: '大小',
|
size: '大小',
|
||||||
@@ -2386,7 +2387,7 @@ export default {
|
|||||||
unrecognized: '未識別',
|
unrecognized: '未識別',
|
||||||
noData: '暫無緩存數據',
|
noData: '暫無緩存數據',
|
||||||
noDataHint: '點擊"刷新緩存"按鈕獲取最新的種子緩存',
|
noDataHint: '點擊"刷新緩存"按鈕獲取最新的種子緩存',
|
||||||
noRecognitionCache: '暫無 TheMovieDb 識別緩存',
|
noRecognitionCache: '暫無 {source} 識別緩存',
|
||||||
noRecognitionCacheHint: '完成媒體識別後,緩存記錄會顯示在這裡',
|
noRecognitionCacheHint: '完成媒體識別後,緩存記錄會顯示在這裡',
|
||||||
reidentifyDialog: {
|
reidentifyDialog: {
|
||||||
title: '重新識別',
|
title: '重新識別',
|
||||||
@@ -2405,7 +2406,12 @@ export default {
|
|||||||
unknown: '未知',
|
unknown: '未知',
|
||||||
},
|
},
|
||||||
clearConfirm: '確認清空所有緩存嗎?',
|
clearConfirm: '確認清空所有緩存嗎?',
|
||||||
|
recognitionClearConfirm: '確認清空全部 {source} 識別緩存嗎?',
|
||||||
tmdbClearConfirm: '確認清空全部 TheMovieDb 識別緩存嗎?',
|
tmdbClearConfirm: '確認清空全部 TheMovieDb 識別緩存嗎?',
|
||||||
|
recognitionSource: {
|
||||||
|
themoviedb: 'TheMovieDb',
|
||||||
|
douban: '豆瓣',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dialog: {
|
dialog: {
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import { useGlobalSettingsStore } from '@/stores'
|
|||||||
import { usePWA } from '@/composables/usePWA'
|
import { usePWA } from '@/composables/usePWA'
|
||||||
import { openSharedDialog } from '@/composables/useSharedDialog'
|
import { openSharedDialog } from '@/composables/useSharedDialog'
|
||||||
import { useDisplay } from 'vuetify'
|
import { useDisplay } from 'vuetify'
|
||||||
import TmdbRecognitionCachePanel from '@/components/cache/TmdbRecognitionCachePanel.vue'
|
import RecognitionCachePanel from '@/components/cache/RecognitionCachePanel.vue'
|
||||||
|
|
||||||
const CacheReidentifyDialog = defineAsyncComponent(() => import('@/components/dialog/CacheReidentifyDialog.vue'))
|
const CacheReidentifyDialog = defineAsyncComponent(() => import('@/components/dialog/CacheReidentifyDialog.vue'))
|
||||||
|
|
||||||
type InfiniteScrollStatus = 'ok' | 'empty' | 'loading' | 'error'
|
type InfiniteScrollStatus = 'ok' | 'empty' | 'loading' | 'error'
|
||||||
type CacheManagerType = 'torrent' | 'tmdb'
|
type CacheManagerType = 'torrent' | 'recognition'
|
||||||
|
|
||||||
const MOBILE_CACHE_PAGE_SIZE = 20
|
const MOBILE_CACHE_PAGE_SIZE = 20
|
||||||
|
|
||||||
@@ -355,14 +355,14 @@ watch([titleFilter, siteFilter], () => {
|
|||||||
<VBtn value="torrent" prepend-icon="mdi-download-box-outline">
|
<VBtn value="torrent" prepend-icon="mdi-download-box-outline">
|
||||||
{{ t('setting.cache.torrentCache') }}
|
{{ t('setting.cache.torrentCache') }}
|
||||||
</VBtn>
|
</VBtn>
|
||||||
<VBtn value="tmdb" prepend-icon="mdi-movie-search-outline">
|
<VBtn value="recognition" prepend-icon="mdi-movie-search-outline">
|
||||||
{{ t('setting.cache.tmdbRecognitionCache') }}
|
{{ t('setting.cache.recognitionCache') }}
|
||||||
</VBtn>
|
</VBtn>
|
||||||
</VBtnToggle>
|
</VBtnToggle>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="cache-manager__content">
|
<div class="cache-manager__content">
|
||||||
<TmdbRecognitionCachePanel v-if="activeCacheType === 'tmdb'" />
|
<RecognitionCachePanel v-if="activeCacheType === 'recognition'" />
|
||||||
|
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<section v-if="isMobile" class="cache-mobile-page">
|
<section v-if="isMobile" class="cache-mobile-page">
|
||||||
@@ -869,6 +869,7 @@ watch([titleFilter, siteFilter], () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cache-manager__switcher :deep(.v-btn) {
|
.cache-manager__switcher :deep(.v-btn) {
|
||||||
|
align-items: center;
|
||||||
flex: 1 1 0;
|
flex: 1 1 0;
|
||||||
block-size: auto;
|
block-size: auto;
|
||||||
min-block-size: 48px;
|
min-block-size: 48px;
|
||||||
@@ -876,6 +877,18 @@ watch([titleFilter, siteFilter], () => {
|
|||||||
padding-block: 6px;
|
padding-block: 6px;
|
||||||
padding-inline: 10px;
|
padding-inline: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cache-manager__switcher :deep(.v-btn__prepend),
|
||||||
|
.cache-manager__switcher :deep(.v-btn__content) {
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cache-manager__switcher :deep(.v-btn__content) {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
min-block-size: 36px;
|
||||||
|
line-height: 1.25;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cache-mobile-page {
|
.cache-mobile-page {
|
||||||
|
|||||||
Reference in New Issue
Block a user